diff --git a/swagger/gen/scylla/v2/client/config/config_client.go b/swagger/gen/scylla/v2/client/config/config_client.go index 213ef58ed6..1a093de9d8 100644 --- a/swagger/gen/scylla/v2/client/config/config_client.go +++ b/swagger/gen/scylla/v2/client/config/config_client.go @@ -295,8 +295,6 @@ type ClientService interface { FindConfigReduceCacheSizesAt(params *FindConfigReduceCacheSizesAtParams) (*FindConfigReduceCacheSizesAtOK, error) - FindConfigReplaceAddress(params *FindConfigReplaceAddressParams) (*FindConfigReplaceAddressOK, error) - FindConfigReplaceAddressFirstBoot(params *FindConfigReplaceAddressFirstBootParams) (*FindConfigReplaceAddressFirstBootOK, error) FindConfigReplaceNode(params *FindConfigReplaceNodeParams) (*FindConfigReplaceNodeOK, error) @@ -4975,39 +4973,6 @@ func (a *Client) FindConfigReduceCacheSizesAt(params *FindConfigReduceCacheSizes return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } -/* -FindConfigReplaceAddress The listen_address or broadcast_address of the dead node to replace. Same as -Dcassandra.replace_address. -*/ -func (a *Client) FindConfigReplaceAddress(params *FindConfigReplaceAddressParams) (*FindConfigReplaceAddressOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewFindConfigReplaceAddressParams() - } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "find_config_replace_address", - Method: "GET", - PathPattern: "/config/replace_address", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &FindConfigReplaceAddressReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - }) - if err != nil { - return nil, err - } - success, ok := result.(*FindConfigReplaceAddressOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*FindConfigReplaceAddressDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - /* FindConfigReplaceAddressFirstBoot Like replace_address option, but if the node has been bootstrapped successfully it will be ignored. Same as -Dcassandra.replace_address_first_boot. */ diff --git a/swagger/gen/scylla/v2/client/config/find_config_replace_address_parameters.go b/swagger/gen/scylla/v2/client/config/find_config_replace_address_parameters.go deleted file mode 100644 index 34b0577d4e..0000000000 --- a/swagger/gen/scylla/v2/client/config/find_config_replace_address_parameters.go +++ /dev/null @@ -1,113 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package config - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewFindConfigReplaceAddressParams creates a new FindConfigReplaceAddressParams object -// with the default values initialized. -func NewFindConfigReplaceAddressParams() *FindConfigReplaceAddressParams { - - return &FindConfigReplaceAddressParams{ - - timeout: cr.DefaultTimeout, - } -} - -// NewFindConfigReplaceAddressParamsWithTimeout creates a new FindConfigReplaceAddressParams object -// with the default values initialized, and the ability to set a timeout on a request -func NewFindConfigReplaceAddressParamsWithTimeout(timeout time.Duration) *FindConfigReplaceAddressParams { - - return &FindConfigReplaceAddressParams{ - - timeout: timeout, - } -} - -// NewFindConfigReplaceAddressParamsWithContext creates a new FindConfigReplaceAddressParams object -// with the default values initialized, and the ability to set a context for a request -func NewFindConfigReplaceAddressParamsWithContext(ctx context.Context) *FindConfigReplaceAddressParams { - - return &FindConfigReplaceAddressParams{ - - Context: ctx, - } -} - -// NewFindConfigReplaceAddressParamsWithHTTPClient creates a new FindConfigReplaceAddressParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewFindConfigReplaceAddressParamsWithHTTPClient(client *http.Client) *FindConfigReplaceAddressParams { - - return &FindConfigReplaceAddressParams{ - HTTPClient: client, - } -} - -/* -FindConfigReplaceAddressParams contains all the parameters to send to the API endpoint -for the find config replace address operation typically these are written to a http.Request -*/ -type FindConfigReplaceAddressParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithTimeout adds the timeout to the find config replace address params -func (o *FindConfigReplaceAddressParams) WithTimeout(timeout time.Duration) *FindConfigReplaceAddressParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the find config replace address params -func (o *FindConfigReplaceAddressParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the find config replace address params -func (o *FindConfigReplaceAddressParams) WithContext(ctx context.Context) *FindConfigReplaceAddressParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the find config replace address params -func (o *FindConfigReplaceAddressParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the find config replace address params -func (o *FindConfigReplaceAddressParams) WithHTTPClient(client *http.Client) *FindConfigReplaceAddressParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the find config replace address params -func (o *FindConfigReplaceAddressParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *FindConfigReplaceAddressParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/swagger/gen/scylla/v2/client/config/find_config_replace_address_responses.go b/swagger/gen/scylla/v2/client/config/find_config_replace_address_responses.go deleted file mode 100644 index 5460e69244..0000000000 --- a/swagger/gen/scylla/v2/client/config/find_config_replace_address_responses.go +++ /dev/null @@ -1,114 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package config - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - "strings" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/scylladb/scylla-manager/v3/swagger/gen/scylla/v2/models" -) - -// FindConfigReplaceAddressReader is a Reader for the FindConfigReplaceAddress structure. -type FindConfigReplaceAddressReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *FindConfigReplaceAddressReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewFindConfigReplaceAddressOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewFindConfigReplaceAddressDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewFindConfigReplaceAddressOK creates a FindConfigReplaceAddressOK with default headers values -func NewFindConfigReplaceAddressOK() *FindConfigReplaceAddressOK { - return &FindConfigReplaceAddressOK{} -} - -/* -FindConfigReplaceAddressOK handles this case with default header values. - -Config value -*/ -type FindConfigReplaceAddressOK struct { - Payload string -} - -func (o *FindConfigReplaceAddressOK) GetPayload() string { - return o.Payload -} - -func (o *FindConfigReplaceAddressOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewFindConfigReplaceAddressDefault creates a FindConfigReplaceAddressDefault with default headers values -func NewFindConfigReplaceAddressDefault(code int) *FindConfigReplaceAddressDefault { - return &FindConfigReplaceAddressDefault{ - _statusCode: code, - } -} - -/* -FindConfigReplaceAddressDefault handles this case with default header values. - -unexpected error -*/ -type FindConfigReplaceAddressDefault struct { - _statusCode int - - Payload *models.ErrorModel -} - -// Code gets the status code for the find config replace address default response -func (o *FindConfigReplaceAddressDefault) Code() int { - return o._statusCode -} - -func (o *FindConfigReplaceAddressDefault) GetPayload() *models.ErrorModel { - return o.Payload -} - -func (o *FindConfigReplaceAddressDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ErrorModel) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -func (o *FindConfigReplaceAddressDefault) Error() string { - return fmt.Sprintf("agent [HTTP %d] %s", o._statusCode, strings.TrimRight(o.Payload.Message, ".")) -} diff --git a/swagger/scylla_v2.json b/swagger/scylla_v2.json index bd77fd982b..9f78e5af0d 100644 --- a/swagger/scylla_v2.json +++ b/swagger/scylla_v2.json @@ -4008,33 +4008,6 @@ } } }, - "/config/replace_address": { - "get": { - "description": "The listen_address or broadcast_address of the dead node to replace. Same as -Dcassandra.replace_address.", - "operationId": "find_config_replace_address", - "produces": [ - "application/json" - ], - "tags": [ - "config" - ], - "parameters": [], - "responses": { - "200": { - "description": "Config value", - "schema": { - "type": "string" - } - }, - "default": { - "description": "unexpected error", - "schema": { - "$ref": "#/definitions/ErrorModel" - } - } - } - } - }, "/config/replace_address_first_boot": { "get": { "description": "Like replace_address option, but if the node has been bootstrapped successfully it will be ignored. Same as -Dcassandra.replace_address_first_boot.",