From 3c384f66de8fb99621b1ac783e165dacf643d7ad Mon Sep 17 00:00:00 2001 From: Paul Lorenz Date: Thu, 7 Dec 2023 17:26:36 -0500 Subject: [PATCH] Add service max idle time --- client.yml | 9 ++++++- management.yml | 11 +++++++- rest_client_api_server/doc.go | 2 +- rest_client_api_server/embedded_spec.go | 24 +++++++++++++++-- rest_management_api_server/doc.go | 2 +- rest_management_api_server/embedded_spec.go | 30 +++++++++++++++++++-- rest_model/service_create.go | 3 +++ rest_model/service_detail.go | 25 +++++++++++++++++ rest_model/service_patch.go | 3 +++ rest_model/service_update.go | 3 +++ source/client.yml | 2 +- source/management.yml | 2 +- source/management/services.yml | 6 +++++ source/shared/services.yml | 3 +++ 14 files changed, 115 insertions(+), 10 deletions(-) diff --git a/client.yml b/client.yml index a255a6d7..d3bee594 100644 --- a/client.yml +++ b/client.yml @@ -15,7 +15,7 @@ info: license: name: Apache 2.0 url: https://www.apache.org/licenses/LICENSE-2.0.html - version: 0.26.1 + version: 0.26.2 host: demo.ziti.dev basePath: /edge/client/v1 paths: @@ -4725,6 +4725,7 @@ definitions: - type: object required: - name + - maxIdleTimeMillis - terminatorStrategy - roleAttributes - permissions @@ -4749,6 +4750,8 @@ definitions: description: Describes whether connections must support end-to-end encryption on both sides of the connection. Read-only property, set at create. type: boolean + maxIdleTimeMillis: + type: integer name: type: string permissions: @@ -4783,6 +4786,8 @@ definitions: description: Describes whether connections must support end-to-end encryption on both sides of the connection. Read-only property, set at create. type: boolean + maxIdleTimeMillis: + type: integer name: type: string roleAttributes: @@ -4806,6 +4811,8 @@ definitions: description: Describes whether connections must support end-to-end encryption on both sides of the connection. Read-only property, set at create. type: boolean + maxIdleTimeMillis: + type: integer name: type: string roleAttributes: diff --git a/management.yml b/management.yml index a60634c5..cf4a0bdc 100644 --- a/management.yml +++ b/management.yml @@ -15,7 +15,7 @@ info: license: name: Apache 2.0 url: https://www.apache.org/licenses/LICENSE-2.0.html - version: 0.26.1 + version: 0.26.2 host: demo.ziti.dev basePath: /edge/management/v1 paths: @@ -19130,6 +19130,8 @@ definitions: description: Describes whether connections must support end-to-end encryption on both sides of the connection. type: boolean + maxIdleTimeMillis: + type: integer name: type: string roleAttributes: @@ -19147,6 +19149,7 @@ definitions: - type: object required: - name + - maxIdleTimeMillis - terminatorStrategy - roleAttributes - permissions @@ -19171,6 +19174,8 @@ definitions: description: Describes whether connections must support end-to-end encryption on both sides of the connection. Read-only property, set at create. type: boolean + maxIdleTimeMillis: + type: integer name: type: string permissions: @@ -19272,6 +19277,8 @@ definitions: description: Describes whether connections must support end-to-end encryption on both sides of the connection. Read-only property, set at create. type: boolean + maxIdleTimeMillis: + type: integer name: type: string roleAttributes: @@ -19392,6 +19399,8 @@ definitions: description: Describes whether connections must support end-to-end encryption on both sides of the connection. Read-only property, set at create. type: boolean + maxIdleTimeMillis: + type: integer name: type: string roleAttributes: diff --git a/rest_client_api_server/doc.go b/rest_client_api_server/doc.go index e0104513..a8928c81 100644 --- a/rest_client_api_server/doc.go +++ b/rest_client_api_server/doc.go @@ -30,7 +30,7 @@ // https // Host: demo.ziti.dev // BasePath: /edge/client/v1 -// Version: 0.26.1 +// Version: 0.26.2 // License: Apache 2.0 https://www.apache.org/licenses/LICENSE-2.0.html // Contact: OpenZiti https://openziti.discourse.group // diff --git a/rest_client_api_server/embedded_spec.go b/rest_client_api_server/embedded_spec.go index 1ee8999b..9a6401ff 100644 --- a/rest_client_api_server/embedded_spec.go +++ b/rest_client_api_server/embedded_spec.go @@ -64,7 +64,7 @@ func init() { "name": "Apache 2.0", "url": "https://www.apache.org/licenses/LICENSE-2.0.html" }, - "version": "0.26.1" + "version": "0.26.2" }, "host": "demo.ziti.dev", "basePath": "/edge/client/v1", @@ -6625,6 +6625,7 @@ func init() { "type": "object", "required": [ "name", + "maxIdleTimeMillis", "terminatorStrategy", "roleAttributes", "permissions", @@ -6654,6 +6655,9 @@ func init() { "description": "Describes whether connections must support end-to-end encryption on both sides of the connection. Read-only property, set at create.", "type": "boolean" }, + "maxIdleTimeMillis": { + "type": "integer" + }, "name": { "type": "string" }, @@ -6706,6 +6710,9 @@ func init() { "description": "Describes whether connections must support end-to-end encryption on both sides of the connection. Read-only property, set at create.", "type": "boolean" }, + "maxIdleTimeMillis": { + "type": "integer" + }, "name": { "type": "string" }, @@ -6739,6 +6746,9 @@ func init() { "description": "Describes whether connections must support end-to-end encryption on both sides of the connection. Read-only property, set at create.", "type": "boolean" }, + "maxIdleTimeMillis": { + "type": "integer" + }, "name": { "type": "string" }, @@ -7051,7 +7061,7 @@ func init() { "name": "Apache 2.0", "url": "https://www.apache.org/licenses/LICENSE-2.0.html" }, - "version": "0.26.1" + "version": "0.26.2" }, "host": "demo.ziti.dev", "basePath": "/edge/client/v1", @@ -13695,6 +13705,7 @@ func init() { "type": "object", "required": [ "name", + "maxIdleTimeMillis", "terminatorStrategy", "roleAttributes", "permissions", @@ -13724,6 +13735,9 @@ func init() { "description": "Describes whether connections must support end-to-end encryption on both sides of the connection. Read-only property, set at create.", "type": "boolean" }, + "maxIdleTimeMillis": { + "type": "integer" + }, "name": { "type": "string" }, @@ -13776,6 +13790,9 @@ func init() { "description": "Describes whether connections must support end-to-end encryption on both sides of the connection. Read-only property, set at create.", "type": "boolean" }, + "maxIdleTimeMillis": { + "type": "integer" + }, "name": { "type": "string" }, @@ -13809,6 +13826,9 @@ func init() { "description": "Describes whether connections must support end-to-end encryption on both sides of the connection. Read-only property, set at create.", "type": "boolean" }, + "maxIdleTimeMillis": { + "type": "integer" + }, "name": { "type": "string" }, diff --git a/rest_management_api_server/doc.go b/rest_management_api_server/doc.go index c86dd9e7..441b8cbe 100644 --- a/rest_management_api_server/doc.go +++ b/rest_management_api_server/doc.go @@ -30,7 +30,7 @@ // https // Host: demo.ziti.dev // BasePath: /edge/management/v1 -// Version: 0.26.1 +// Version: 0.26.2 // License: Apache 2.0 https://www.apache.org/licenses/LICENSE-2.0.html // Contact: OpenZiti https://openziti.discourse.group // diff --git a/rest_management_api_server/embedded_spec.go b/rest_management_api_server/embedded_spec.go index bb7da72e..54b0040f 100644 --- a/rest_management_api_server/embedded_spec.go +++ b/rest_management_api_server/embedded_spec.go @@ -64,7 +64,7 @@ func init() { "name": "Apache 2.0", "url": "https://www.apache.org/licenses/LICENSE-2.0.html" }, - "version": "0.26.1" + "version": "0.26.2" }, "host": "demo.ziti.dev", "basePath": "/edge/management/v1", @@ -26636,6 +26636,9 @@ func init() { "description": "Describes whether connections must support end-to-end encryption on both sides of the connection.", "type": "boolean" }, + "maxIdleTimeMillis": { + "type": "integer" + }, "name": { "type": "string" }, @@ -26663,6 +26666,7 @@ func init() { "type": "object", "required": [ "name", + "maxIdleTimeMillis", "terminatorStrategy", "roleAttributes", "permissions", @@ -26692,6 +26696,9 @@ func init() { "description": "Describes whether connections must support end-to-end encryption on both sides of the connection. Read-only property, set at create.", "type": "boolean" }, + "maxIdleTimeMillis": { + "type": "integer" + }, "name": { "type": "string" }, @@ -26846,6 +26853,9 @@ func init() { "description": "Describes whether connections must support end-to-end encryption on both sides of the connection. Read-only property, set at create.", "type": "boolean" }, + "maxIdleTimeMillis": { + "type": "integer" + }, "name": { "type": "string" }, @@ -27024,6 +27034,9 @@ func init() { "description": "Describes whether connections must support end-to-end encryption on both sides of the connection. Read-only property, set at create.", "type": "boolean" }, + "maxIdleTimeMillis": { + "type": "integer" + }, "name": { "type": "string" }, @@ -27538,7 +27551,7 @@ func init() { "name": "Apache 2.0", "url": "https://www.apache.org/licenses/LICENSE-2.0.html" }, - "version": "0.26.1" + "version": "0.26.2" }, "host": "demo.ziti.dev", "basePath": "/edge/management/v1", @@ -54214,6 +54227,9 @@ func init() { "description": "Describes whether connections must support end-to-end encryption on both sides of the connection.", "type": "boolean" }, + "maxIdleTimeMillis": { + "type": "integer" + }, "name": { "type": "string" }, @@ -54241,6 +54257,7 @@ func init() { "type": "object", "required": [ "name", + "maxIdleTimeMillis", "terminatorStrategy", "roleAttributes", "permissions", @@ -54270,6 +54287,9 @@ func init() { "description": "Describes whether connections must support end-to-end encryption on both sides of the connection. Read-only property, set at create.", "type": "boolean" }, + "maxIdleTimeMillis": { + "type": "integer" + }, "name": { "type": "string" }, @@ -54424,6 +54444,9 @@ func init() { "description": "Describes whether connections must support end-to-end encryption on both sides of the connection. Read-only property, set at create.", "type": "boolean" }, + "maxIdleTimeMillis": { + "type": "integer" + }, "name": { "type": "string" }, @@ -54602,6 +54625,9 @@ func init() { "description": "Describes whether connections must support end-to-end encryption on both sides of the connection. Read-only property, set at create.", "type": "boolean" }, + "maxIdleTimeMillis": { + "type": "integer" + }, "name": { "type": "string" }, diff --git a/rest_model/service_create.go b/rest_model/service_create.go index b0cf5f45..6acca578 100644 --- a/rest_model/service_create.go +++ b/rest_model/service_create.go @@ -50,6 +50,9 @@ type ServiceCreate struct { // Required: true EncryptionRequired *bool `json:"encryptionRequired"` + // max idle time millis + MaxIdleTimeMillis int64 `json:"maxIdleTimeMillis,omitempty"` + // name // Required: true Name *string `json:"name"` diff --git a/rest_model/service_detail.go b/rest_model/service_detail.go index ca26c33c..d1af560b 100644 --- a/rest_model/service_detail.go +++ b/rest_model/service_detail.go @@ -57,6 +57,10 @@ type ServiceDetail struct { // Required: true EncryptionRequired *bool `json:"encryptionRequired"` + // max idle time millis + // Required: true + MaxIdleTimeMillis *int64 `json:"maxIdleTimeMillis"` + // name // Required: true Name *string `json:"name"` @@ -95,6 +99,8 @@ func (m *ServiceDetail) UnmarshalJSON(raw []byte) error { EncryptionRequired *bool `json:"encryptionRequired"` + MaxIdleTimeMillis *int64 `json:"maxIdleTimeMillis"` + Name *string `json:"name"` Permissions DialBindArray `json:"permissions"` @@ -115,6 +121,8 @@ func (m *ServiceDetail) UnmarshalJSON(raw []byte) error { m.EncryptionRequired = dataAO1.EncryptionRequired + m.MaxIdleTimeMillis = dataAO1.MaxIdleTimeMillis + m.Name = dataAO1.Name m.Permissions = dataAO1.Permissions @@ -144,6 +152,8 @@ func (m ServiceDetail) MarshalJSON() ([]byte, error) { EncryptionRequired *bool `json:"encryptionRequired"` + MaxIdleTimeMillis *int64 `json:"maxIdleTimeMillis"` + Name *string `json:"name"` Permissions DialBindArray `json:"permissions"` @@ -161,6 +171,8 @@ func (m ServiceDetail) MarshalJSON() ([]byte, error) { dataAO1.EncryptionRequired = m.EncryptionRequired + dataAO1.MaxIdleTimeMillis = m.MaxIdleTimeMillis + dataAO1.Name = m.Name dataAO1.Permissions = m.Permissions @@ -200,6 +212,10 @@ func (m *ServiceDetail) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateMaxIdleTimeMillis(formats); err != nil { + res = append(res, err) + } + if err := m.validateName(formats); err != nil { res = append(res, err) } @@ -273,6 +289,15 @@ func (m *ServiceDetail) validateEncryptionRequired(formats strfmt.Registry) erro return nil } +func (m *ServiceDetail) validateMaxIdleTimeMillis(formats strfmt.Registry) error { + + if err := validate.Required("maxIdleTimeMillis", "body", m.MaxIdleTimeMillis); err != nil { + return err + } + + return nil +} + func (m *ServiceDetail) validateName(formats strfmt.Registry) error { if err := validate.Required("name", "body", m.Name); err != nil { diff --git a/rest_model/service_patch.go b/rest_model/service_patch.go index 14649db7..971a3714 100644 --- a/rest_model/service_patch.go +++ b/rest_model/service_patch.go @@ -48,6 +48,9 @@ type ServicePatch struct { // Describes whether connections must support end-to-end encryption on both sides of the connection. Read-only property, set at create. EncryptionRequired bool `json:"encryptionRequired,omitempty"` + // max idle time millis + MaxIdleTimeMillis int64 `json:"maxIdleTimeMillis,omitempty"` + // name Name string `json:"name,omitempty"` diff --git a/rest_model/service_update.go b/rest_model/service_update.go index c06488ca..52c14065 100644 --- a/rest_model/service_update.go +++ b/rest_model/service_update.go @@ -49,6 +49,9 @@ type ServiceUpdate struct { // Describes whether connections must support end-to-end encryption on both sides of the connection. Read-only property, set at create. EncryptionRequired bool `json:"encryptionRequired,omitempty"` + // max idle time millis + MaxIdleTimeMillis int64 `json:"maxIdleTimeMillis,omitempty"` + // name // Required: true Name *string `json:"name"` diff --git a/source/client.yml b/source/client.yml index 54551045..4d5ca78b 100644 --- a/source/client.yml +++ b/source/client.yml @@ -1,7 +1,7 @@ --- swagger: '2.0' info: - version: 0.26.1 + version: 0.26.2 title: Ziti Edge Client description: OpenZiti Edge Client API contact: diff --git a/source/management.yml b/source/management.yml index d66e7dd9..dc620126 100644 --- a/source/management.yml +++ b/source/management.yml @@ -1,7 +1,7 @@ --- swagger: '2.0' info: - version: 0.26.1 + version: 0.26.2 title: Ziti Edge Management description: OpenZiti Edge Management API contact: diff --git a/source/management/services.yml b/source/management/services.yml index fed8344f..ab5109b0 100644 --- a/source/management/services.yml +++ b/source/management/services.yml @@ -323,6 +323,8 @@ definitions: properties: name: type: string + maxIdleTimeMillis: + type: integer terminatorStrategy: type: string roleAttributes: @@ -345,6 +347,8 @@ definitions: properties: name: type: string + maxIdleTimeMillis: + type: integer terminatorStrategy: type: string roleAttributes: @@ -365,6 +369,8 @@ definitions: properties: name: type: string + maxIdleTimeMillis: + type: integer terminatorStrategy: type: string roleAttributes: diff --git a/source/shared/services.yml b/source/shared/services.yml index 6a17fdf8..393d828b 100644 --- a/source/shared/services.yml +++ b/source/shared/services.yml @@ -42,6 +42,7 @@ definitions: - type: object required: - name + - maxIdleTimeMillis - terminatorStrategy - roleAttributes - permissions @@ -52,6 +53,8 @@ definitions: properties: name: type: string + maxIdleTimeMillis: + type: integer terminatorStrategy: type: string roleAttributes: