diff --git a/VERSION b/VERSION index 7fdbfd6..605c095 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -v0.33.0 +v0.34.0 diff --git a/api/client/network/update_network_parameters.go b/api/client/network/update_network_parameters.go index 4d84ca5..5e9053f 100644 --- a/api/client/network/update_network_parameters.go +++ b/api/client/network/update_network_parameters.go @@ -14,6 +14,7 @@ import ( "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" "github.com/metal-stack/metal-go/api/models" ) @@ -66,6 +67,12 @@ type UpdateNetworkParams struct { // Body. Body *models.V1NetworkUpdateRequest + /* Force. + + if true update forcefully + */ + Force *bool + timeout time.Duration Context context.Context HTTPClient *http.Client @@ -83,7 +90,18 @@ func (o *UpdateNetworkParams) WithDefaults() *UpdateNetworkParams { // // All values with no default are reset to their zero value. func (o *UpdateNetworkParams) SetDefaults() { - // no default values defined for this parameter + var ( + forceDefault = bool(false) + ) + + val := UpdateNetworkParams{ + Force: &forceDefault, + } + + val.timeout = o.timeout + val.Context = o.Context + val.HTTPClient = o.HTTPClient + *o = val } // WithTimeout adds the timeout to the update network params @@ -130,6 +148,17 @@ func (o *UpdateNetworkParams) SetBody(body *models.V1NetworkUpdateRequest) { o.Body = body } +// WithForce adds the force to the update network params +func (o *UpdateNetworkParams) WithForce(force *bool) *UpdateNetworkParams { + o.SetForce(force) + return o +} + +// SetForce adds the force to the update network params +func (o *UpdateNetworkParams) SetForce(force *bool) { + o.Force = force +} + // WriteToRequest writes these params to a swagger request func (o *UpdateNetworkParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { @@ -143,6 +172,23 @@ func (o *UpdateNetworkParams) WriteToRequest(r runtime.ClientRequest, reg strfmt } } + if o.Force != nil { + + // query param force + var qrForce bool + + if o.Force != nil { + qrForce = *o.Force + } + qForce := swag.FormatBool(qrForce) + if qForce != "" { + + if err := r.SetQueryParam("force", qForce); err != nil { + return err + } + } + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } diff --git a/api/models/v1_network_create_request.go b/api/models/v1_network_create_request.go index ff914d1..660b4cc 100644 --- a/api/models/v1_network_create_request.go +++ b/api/models/v1_network_create_request.go @@ -19,6 +19,9 @@ import ( // swagger:model v1.NetworkCreateRequest type V1NetworkCreateRequest struct { + // list of cidrs which are added to the route maps per tenant private network, these are typically pod- and service cidrs, can only be set for private super networks + AdditionalAnnouncableCIDRs []string `json:"additionalAnnouncableCIDRs" yaml:"additionalAnnouncableCIDRs"` + // a description for this entity Description string `json:"description,omitempty" yaml:"description,omitempty"` diff --git a/api/models/v1_network_immutable.go b/api/models/v1_network_immutable.go index 0994040..039dc52 100644 --- a/api/models/v1_network_immutable.go +++ b/api/models/v1_network_immutable.go @@ -20,6 +20,9 @@ import ( // swagger:model v1.NetworkImmutable type V1NetworkImmutable struct { + // list of cidrs which are added to the route maps per tenant private network, these are typically pod- and service cidrs, can only be set for private super networks + AdditionalAnnouncableCIDRs []string `json:"additionalAnnouncableCIDRs" yaml:"additionalAnnouncableCIDRs"` + // the destination prefixes of this network // Required: true Destinationprefixes []string `json:"destinationprefixes" yaml:"destinationprefixes"` diff --git a/api/models/v1_network_response.go b/api/models/v1_network_response.go index 51433ea..216a634 100644 --- a/api/models/v1_network_response.go +++ b/api/models/v1_network_response.go @@ -19,6 +19,9 @@ import ( // swagger:model v1.NetworkResponse type V1NetworkResponse struct { + // list of cidrs which are added to the route maps per tenant private network, these are typically pod- and service cidrs, can only be set for private super networks + AdditionalAnnouncableCIDRs []string `json:"additionalAnnouncableCIDRs" yaml:"additionalAnnouncableCIDRs"` + // the last changed timestamp of this entity // Read Only: true // Format: date-time diff --git a/api/models/v1_network_update_request.go b/api/models/v1_network_update_request.go index ec7d62a..d69efde 100644 --- a/api/models/v1_network_update_request.go +++ b/api/models/v1_network_update_request.go @@ -19,6 +19,9 @@ import ( // swagger:model v1.NetworkUpdateRequest type V1NetworkUpdateRequest struct { + // list of cidrs which are added to the route maps per tenant private network, these are typically pod- and service cidrs, can only be set for private super networks + AdditionalAnnouncableCIDRs []string `json:"additionalAnnouncableCIDRs" yaml:"additionalAnnouncableCIDRs"` + // a description for this entity Description string `json:"description,omitempty" yaml:"description,omitempty"` diff --git a/metal-api.json b/metal-api.json index 221348f..3f5159d 100644 --- a/metal-api.json +++ b/metal-api.json @@ -3613,6 +3613,13 @@ }, "v1.NetworkCreateRequest": { "properties": { + "additionalAnnouncableCIDRs": { + "description": "list of cidrs which are added to the route maps per tenant private network, these are typically pod- and service cidrs, can only be set for private super networks", + "items": { + "type": "string" + }, + "type": "array" + }, "description": { "description": "a description for this entity", "type": "string" @@ -3746,6 +3753,13 @@ "v1.NetworkImmutable": { "description": "a network which contains prefixes from which IP addresses can be allocated\nprefixes that are reachable within this network", "properties": { + "additionalAnnouncableCIDRs": { + "description": "list of cidrs which are added to the route maps per tenant private network, these are typically pod- and service cidrs, can only be set for private super networks", + "items": { + "type": "string" + }, + "type": "array" + }, "destinationprefixes": { "description": "the destination prefixes of this network", "items": { @@ -3796,6 +3810,13 @@ }, "v1.NetworkResponse": { "properties": { + "additionalAnnouncableCIDRs": { + "description": "list of cidrs which are added to the route maps per tenant private network, these are typically pod- and service cidrs, can only be set for private super networks", + "items": { + "type": "string" + }, + "type": "array" + }, "changed": { "description": "the last changed timestamp of this entity", "format": "date-time", @@ -3895,6 +3916,13 @@ }, "v1.NetworkUpdateRequest": { "properties": { + "additionalAnnouncableCIDRs": { + "description": "list of cidrs which are added to the route maps per tenant private network, these are typically pod- and service cidrs, can only be set for private super networks", + "items": { + "type": "string" + }, + "type": "array" + }, "description": { "description": "a description for this entity", "type": "string" @@ -5472,7 +5500,7 @@ "url": "https://www.gnu.org/licenses/agpl-3.0.de.html" }, "title": "metal-api", - "version": "v0.33.0" + "version": "v0.34.0" }, "paths": { "/v1/audit/find": { @@ -7886,6 +7914,13 @@ ], "operationId": "updateNetwork", "parameters": [ + { + "default": false, + "description": "if true update forcefully", + "in": "query", + "name": "force", + "type": "boolean" + }, { "in": "body", "name": "body",