diff --git a/go.mod b/go.mod index c4b1517ed..25792761b 100644 --- a/go.mod +++ b/go.mod @@ -128,5 +128,6 @@ require ( replace ( github.com/gocql/gocql => github.com/scylladb/gocql v1.12.0 github.com/rclone/rclone => github.com/scylladb/rclone v1.54.1-0.20240312172628-afe1fd2aa65e + github.com/scylladb/scylla-manager/v3/pkg/util => ./v3/pkg/util google.golang.org/api v0.114.0 => github.com/scylladb/google-api-go-client v0.34.1-patched ) diff --git a/go.sum b/go.sum index 029df61dc..b4ab4b75d 100644 --- a/go.sum +++ b/go.sum @@ -1055,8 +1055,6 @@ github.com/scylladb/rclone v1.54.1-0.20240312172628-afe1fd2aa65e h1:lJRphCtu+nKd github.com/scylladb/rclone v1.54.1-0.20240312172628-afe1fd2aa65e/go.mod h1:JGZp4EvCUK+6AM1Fe1dye5xvihTc/Bk0WnHHSCJOePM= github.com/scylladb/scylla-manager/v3/pkg/managerclient v0.0.0-20240926142436-6d27036d615d h1:c2mlLf5LlsR3KvQnZODjjmebV0/Fe8/i1NQlr4TVOoU= github.com/scylladb/scylla-manager/v3/pkg/managerclient v0.0.0-20240926142436-6d27036d615d/go.mod h1:AQyWEkxdYc+zAEKofGOKOTPyvW2HhoL1+iMQrESFqdY= -github.com/scylladb/scylla-manager/v3/pkg/util v0.0.0-20240926142436-6d27036d615d h1:9hQ+509JUYSlNyR/1C2Iy1gc36Y4Z4V+On3pn2pzcqg= -github.com/scylladb/scylla-manager/v3/pkg/util v0.0.0-20240926142436-6d27036d615d/go.mod h1:+sPCx2oaOXmMpy/ODNNEDGJ7vCghBeKP4S7xEfMI+eA= github.com/scylladb/scylla-manager/v3/swagger v0.0.0-20240926142436-6d27036d615d h1:eR9FrNQLeaaBfHYlQxDJCQ3LS6Zo92ut0G+aYbzy7UQ= github.com/scylladb/scylla-manager/v3/swagger v0.0.0-20240926142436-6d27036d615d/go.mod h1:Oxfuz1XcXi9iV4ggSGfQdn+p6gPz6djPOegRMMe/6/s= github.com/scylladb/termtables v0.0.0-20191203121021-c4c0b6d42ff4 h1:8qmTC5ByIXO3GP/IzBkxcZ/99VITvnIETDhdFz/om7A= diff --git a/vendor/github.com/scylladb/scylla-manager/v3/pkg/util/LICENSE b/vendor/github.com/scylladb/scylla-manager/v3/pkg/util/LICENSE deleted file mode 100644 index a155a625f..000000000 --- a/vendor/github.com/scylladb/scylla-manager/v3/pkg/util/LICENSE +++ /dev/null @@ -1,62 +0,0 @@ -Scylla SOURCE AVAILABLE LICENSE (SSAL) AGREEMENT Last Update: June 30, 2021 - -This Agreement sets forth the terms on which the Licensor makes available the Software. BY INSTALLING, DOWNLOADING, ACCESSING, USING OR DISTRIBUTING ANY OF THE SOFTWARE, YOU AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT. IF YOU DO NOT AGREE TO SUCH TERMS AND CONDITIONS, YOU MUST NOT USE THE SOFTWARE. - -If you are receiving the Software on behalf of a legal entity, you represent and warrant that you have the actual authority to agree to the terms and conditions of this agreement on behalf of such entity. - -The terms below have the meanings set forth below for purposes of this Agreement: - -Agreement: this Scylla Source Available License Agreement. - -Database Product: any of the following products or services: - -(a) Scylla Manager; - -(b) a product or service exposing the Scylla Manager API - -License: the Scylla Source Available License described in Section 1. - -Licensor: as indicated in the source code license. - -Modification: a modification of the Software made by You under the License, Section 1.1(c). - -Scylla: the open source Scylla software as described in scylladb.com - -Software: certain software components designed to work with Scylla NoSQL Database and provided to you under this Agreement. - -You: the recipient of this Software, an individual, or the entity on whose behalf you are receiving the Software. - -Your Application: an application developed by or for You, where such application is not a Database Product. - -LICENSE GRANT AND CONDITIONS -1.1 Subject to the terms and conditions of this Section 1, Licensor hereby grants to You a non-exclusive, royalty-free, worldwide, non-transferable license during the term of this Agreement to: - -a) distribute or make available the Software or your Modifications under the terms of this -Agreement, only as part of Your Application, so long as you include the following notice on any copy you distribute: “This software is subject to the terms of the Scylla Source Available License Agreement”. - -(b) use the Software, or your Modifications, only as part of Your Application, but not in connection - -with any Database Product that is distributed or otherwise made available by any third party. - -(c) modify the Software, provided that Modifications remain subject to the terms of this License. - -(d) reproduce the Software as necessary for the above. - -1.3. Notices. - -On all copies of the Software that you make, you must retain all copyright or other proprietary notices. - -TERM AND TERMINATION. -This Agreement will continue unless and until earlier terminated as set forth herein. If You breach any of its conditions or obligations under this Agreement, this Agreement will terminate automatically and the licenses granted herein will terminate automatically. - -INTELLECTUAL PROPERTY. -As between the parties, Licensor retains all right, title, and interest in the Software, and to Scylla or other Licensor trademarks or service marks, and all intellectual property rights therein. Licensor hereby reserves all rights not expressly granted to You in this Agreement. - -DISCLAIMER. -TO THE EXTENT ALLOWABLE UNDER LAW, LICENSOR HEREBY DISCLAIMS ANY AND ALL WARRANTIES AND CONDITIONS, EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, AND SPECIFICALLY DISCLAIMS ANY WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, WITH RESPECT TO THE SOFTWARE. Licensor has no obligation to support the Software. - -LIMITATION OF LIABILITY. TO THE EXTENT ALLOWABLE UNDER LAW, LICENSOR WILL NOT BE LIABLE FOR ANY DAMAGES OF ANY KIND, INCLUDING BUT NOT LIMITED TO, LOST PROFITS OR ANY CONSEQUENTIAL, SPECIAL, INCIDENTAL, INDIRECT, OR DIRECT DAMAGES, ARISING OUT OF OR RELATING TO THIS AGREEMENT. -GENERAL. You are not authorized to assign Your rights under this Agreement to any third party. Licensor may freely assign its rights under this Agreement to any third party. This Agreement is the entire agreement between the parties on the subject matter hereof. No amendment or modification hereof will be valid or binding upon the parties unless made in writing and signed by the duly authorized representatives of both parties. In the event that any provision, including without limitation any condition, of this Agreement is held to be unenforceable, this Agreement and all licenses and rights granted hereunder will immediately terminate. Failure by Licensor to exercise any right hereunder will not be construed as a waiver of any subsequent breach of that right or as a waiver of any other right. This Agreement will be governed by and interpreted in accordance with the laws of the state of California, without reference to its conflict of laws principles. If You are located within the United States, all disputes arising out of this Agreement are subject to the exclusive jurisdiction of courts located in Santa Clara County, California. USA. If You are located outside of the United States, any dispute, controversy or claim arising out of or relating to this Agreement will be referred to and finally determined by arbitration in accordance with the JAMS before a single arbitrator in Santa Clara County, California. Judgment upon the award rendered by the arbitrator may be entered in any court having jurisdiction thereof. - -This license is base on REDIS SOURCE AVAILABLE LICENSE (RSAL) AGREEMENT with some updates -https://redislabs.com/wp-content/uploads/2019/09/redis-source-available-license.pdf diff --git a/vendor/github.com/scylladb/scylla-manager/v3/pkg/util/inexlist/dcfilter/dcfilter.go b/vendor/github.com/scylladb/scylla-manager/v3/pkg/util/inexlist/dcfilter/dcfilter.go index 24a931b18..22f7843ae 100644 --- a/vendor/github.com/scylladb/scylla-manager/v3/pkg/util/inexlist/dcfilter/dcfilter.go +++ b/vendor/github.com/scylladb/scylla-manager/v3/pkg/util/inexlist/dcfilter/dcfilter.go @@ -37,6 +37,29 @@ func Apply(dcMap map[string][]string, filters []string) ([]string, error) { return filtered, nil } +// Filter that lets you filter datacenters. +type Filter struct { + filters []string + inex inexlist.InExList +} + +func NewFilter(filters []string) (*Filter, error) { + // Decorate filters and create inexlist + inex, err := inexlist.ParseInExList(decorate(filters)) + if err != nil { + return nil, errors.Wrapf(err, "parse dc filter %v", filters) + } + return &Filter{ + filters: filters, + inex: inex, + }, nil +} + +// Check returns true iff dc matches filter. +func (f *Filter) Check(dc string) bool { + return len(f.inex.Filter([]string{dc})) > 0 +} + func decorate(filters []string) []string { if len(filters) == 0 { filters = append(filters, "*") diff --git a/vendor/modules.txt b/vendor/modules.txt index dd6fdccc5..3285113ed 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -399,7 +399,7 @@ github.com/scylladb/gocqlx/v2/table ## explicit; go 1.21.1 github.com/scylladb/scylla-manager/v3/pkg/managerclient github.com/scylladb/scylla-manager/v3/pkg/managerclient/table -# github.com/scylladb/scylla-manager/v3/pkg/util v0.0.0-20240926142436-6d27036d615d +# github.com/scylladb/scylla-manager/v3/pkg/util v0.0.0-20240926142436-6d27036d615d => ./v3/pkg/util ## explicit; go 1.21.1 github.com/scylladb/scylla-manager/v3/pkg/util github.com/scylladb/scylla-manager/v3/pkg/util/certutil @@ -758,3 +758,4 @@ gopkg.in/yaml.v2 gopkg.in/yaml.v3 # github.com/gocql/gocql => github.com/scylladb/gocql v1.12.0 # github.com/rclone/rclone => github.com/scylladb/rclone v1.54.1-0.20240312172628-afe1fd2aa65e +# github.com/scylladb/scylla-manager/v3/pkg/util => ./v3/pkg/util