From 233d46d1fb5ea8a8438058f86eedef821622964f Mon Sep 17 00:00:00 2001 From: "Mitch Harding (the weird one)" Date: Mon, 29 Jul 2024 16:43:56 -0400 Subject: [PATCH] CASMCMS-9067: Add new BOS v2 session_limit_required option (cherry-picked from commit 8ea0bfdf915b9b136ba335ffc39b7991e702fe0c) --- cray/modules/bos/openapi.yaml | 8 +++++++- cray/modules/bos/swagger3.json | 30 +++++++++++++++++++++++++++--- 2 files changed, 34 insertions(+), 4 deletions(-) diff --git a/cray/modules/bos/openapi.yaml b/cray/modules/bos/openapi.yaml index 827e429..a766b66 100644 --- a/cray/modules/bos/openapi.yaml +++ b/cray/modules/bos/openapi.yaml @@ -686,7 +686,8 @@ components: type: string V2SessionCreate: description: | - A Session Creation object + A Session Creation object. A UUID name is generated if a name is not provided. The limit parameter is + required if the session_limit_required option is true. type: object properties: name: @@ -721,6 +722,8 @@ components: A comma-separated of nodes, groups, or roles to which the session will be limited. Components are treated as OR operations unless preceded by "&" for AND or "!" for NOT. + + Alternatively, the limit can be set to "*", which means no limit. stage: type: boolean description: > @@ -1217,6 +1220,9 @@ components: example: 1000 minimum: 0 maximum: 131071 + session_limit_required: + type: boolean + description: If true, BOS v2 Sessions cannot be created without specifying the limit parameter. additionalProperties: true requestBodies: V2sessionCreateRequest: diff --git a/cray/modules/bos/swagger3.json b/cray/modules/bos/swagger3.json index 0750941..663685d 100644 --- a/cray/modules/bos/swagger3.json +++ b/cray/modules/bos/swagger3.json @@ -1258,7 +1258,7 @@ "type": "string" }, "V2SessionCreate": { - "description": "A Session Creation object\n", + "description": "A Session Creation object. A UUID name is generated if a name is not provided. The limit parameter is required if the session_limit_required option is true.\n", "type": "object", "properties": { "name": { @@ -1286,7 +1286,7 @@ }, "limit": { "type": "string", - "description": "A comma-separated of nodes, groups, or roles to which the session will be limited. Components are treated as OR operations unless preceded by \"&\" for AND or \"!\" for NOT.\n" + "description": "A comma-separated of nodes, groups, or roles to which the session will be limited. Components are treated as OR operations unless preceded by \"&\" for AND or \"!\" for NOT.\nAlternatively, the limit can be set to \"*\", which means no limit.\n" }, "stage": { "type": "boolean", @@ -2633,6 +2633,10 @@ "example": 1000, "minimum": 0, "maximum": 131071 + }, + "session_limit_required": { + "type": "boolean", + "description": "If true, BOS v2 Sessions cannot be created without specifying the limit parameter." } }, "additionalProperties": true @@ -2673,7 +2677,7 @@ }, "limit": { "type": "string", - "description": "A comma-separated of nodes, groups, or roles to which the session will be limited. Components are treated as OR operations unless preceded by \"&\" for AND or \"!\" for NOT.\n" + "description": "A comma-separated of nodes, groups, or roles to which the session will be limited. Components are treated as OR operations unless preceded by \"&\" for AND or \"!\" for NOT.\nAlternatively, the limit can be set to \"*\", which means no limit.\n" }, "stage": { "type": "boolean", @@ -3647,6 +3651,10 @@ "example": 1000, "minimum": 0, "maximum": 131071 + }, + "session_limit_required": { + "type": "boolean", + "description": "If true, BOS v2 Sessions cannot be created without specifying the limit parameter." } }, "additionalProperties": true @@ -5182,6 +5190,10 @@ "example": 1000, "minimum": 0, "maximum": 131071 + }, + "session_limit_required": { + "type": "boolean", + "description": "If true, BOS v2 Sessions cannot be created without specifying the limit parameter." } }, "additionalProperties": true @@ -14658,6 +14670,10 @@ "example": 1000, "minimum": 0, "maximum": 131071 + }, + "session_limit_required": { + "type": "boolean", + "description": "If true, BOS v2 Sessions cannot be created without specifying the limit parameter." } }, "additionalProperties": true @@ -14736,6 +14752,10 @@ "example": 1000, "minimum": 0, "maximum": 131071 + }, + "session_limit_required": { + "type": "boolean", + "description": "If true, BOS v2 Sessions cannot be created without specifying the limit parameter." } }, "additionalProperties": true @@ -14803,6 +14823,10 @@ "example": 1000, "minimum": 0, "maximum": 131071 + }, + "session_limit_required": { + "type": "boolean", + "description": "If true, BOS v2 Sessions cannot be created without specifying the limit parameter." } }, "additionalProperties": true