From 9a8931e7c1c3b13f56e2ddca6ceb97d8f9ef544c Mon Sep 17 00:00:00 2001 From: Michael Ou Date: Fri, 27 Dec 2024 15:34:58 +0000 Subject: [PATCH] Revert "update/changecontrol.v1: Add Step Info within CC Stage" This reverts commit 8233b23894e5c79991e1da6a8f5be3e00bf9983c. Reason for revert: Not ready to merge Change-Id: Ica9b7fde5dd225f9d5edf04fd2cc1dadcbc1762c --- .../changecontrol-changelog.yaml | 6 -- arista/changecontrol.v1/changecontrol.proto | 43 +------------- .../services.gen.swagger.json | 56 +------------------ 3 files changed, 4 insertions(+), 101 deletions(-) diff --git a/arista/changecontrol.v1/changecontrol-changelog.yaml b/arista/changecontrol.v1/changecontrol-changelog.yaml index f4f3f33..eb5da0b 100644 --- a/arista/changecontrol.v1/changecontrol-changelog.yaml +++ b/arista/changecontrol.v1/changecontrol-changelog.yaml @@ -7,12 +7,6 @@ # New entries go on top. Changes: - - date: 2024-12-18 - description: Define and add ActionSteps within ChangeControl stage. - version: 1.1.2 - cvaas: true - onprem: true - - date: 2024-10-09 description: add device_id_to_stage_ids map version: 1.1.1 diff --git a/arista/changecontrol.v1/changecontrol.proto b/arista/changecontrol.v1/changecontrol.proto index 2a84993..f0f6375 100644 --- a/arista/changecontrol.v1/changecontrol.proto +++ b/arista/changecontrol.v1/changecontrol.proto @@ -171,42 +171,6 @@ enum StageStatus { STAGE_STATUS_NOT_STARTED = 3; } -// StepStatus defines the possible execution statuses of a step within an action. -enum StepStatus { - // STEP_STATUS_UNSPECIFIED represents an unspecified state for a step within - // an action. Currently it is reserved for some future utility. - STEP_STATUS_UNSPECIFIED = 0; - // STEP_STATUS_NOT_STARTED represents that the step has not started execution. - STEP_STATUS_NOT_STARTED = 1; - // STEP_STATUS_RUNNING represents that the step is under execution. - STEP_STATUS_RUNNING = 2; - // STEP_STATUS_FINISHED represents that the step has finished execution. - STEP_STATUS_FINISHED = 3; - // STEP_STATUS_SKIPPED represents that the step has been skipped from execution. - STEP_STATUS_SKIPPED = 4; - // STEP_STATUS_FAILED represents that the step has failed its execution. - STEP_STATUS_FAILED = 5; -} - -// StepInfo contains the status details of an action step. -message StepInfo { - // name represents the name of the step. - google.protobuf.StringValue name = 1; - // status represents the present execution status of the step. - StepStatus status = 2; - // error captures any error that occurred. - google.protobuf.StringValue error = 3; - // message represents any relevant information associated with the step. - google.protobuf.StringValue message = 4; -} - -// ActionSteps tracks the status of each step within an action. -message ActionSteps { - // values maps each action step's execution sequence to its status information, - // represented by StepInfo. - map values = 1; -} - // Stage holds the configuration and status of a stage. message Stage { // name is the name of the stage. @@ -221,13 +185,10 @@ message Stage { // error is any error that occured during the execution // of the stage. google.protobuf.StringValue error = 5; - // start_time is the time when status change to Running. + // start_time is the time when status change to Running google.protobuf.Timestamp start_time = 6; - // end_time is the time when status change to Completed. + // end_time is the time when status change to Completed google.protobuf.Timestamp end_time = 7; - // steps represents the granular steps and their statuses - // associated with an action. - ActionSteps steps = 8; } // StageMap is a map from stage ID to `Stage`. This has essentially diff --git a/arista/changecontrol.v1/services.gen.swagger.json b/arista/changecontrol.v1/services.gen.swagger.json index cddd8cf..d90a57f 100644 --- a/arista/changecontrol.v1/services.gen.swagger.json +++ b/arista/changecontrol.v1/services.gen.swagger.json @@ -1654,19 +1654,6 @@ }, "description": "Action is an action to perform during the execution of\na stage of a change control. Available actions can be\nfetched using the \"action\" services." }, - "arista.changecontrol.v1.ActionSteps": { - "type": "object", - "properties": { - "values": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/arista.changecontrol.v1.StepInfo" - }, - "description": "values maps each action step's execution sequence to its status information,\nrepresented by StepInfo." - } - }, - "description": "ActionSteps tracks the status of each step within an action." - }, "arista.changecontrol.v1.ApproveConfig": { "type": "object", "properties": { @@ -2441,16 +2428,12 @@ "startTime": { "type": "string", "format": "date-time", - "description": "start_time is the time when status change to Running." + "title": "start_time is the time when status change to Running" }, "endTime": { "type": "string", "format": "date-time", - "description": "end_time is the time when status change to Completed." - }, - "steps": { - "$ref": "#/definitions/arista.changecontrol.v1.ActionSteps", - "description": "steps represents the granular steps and their statuses\nassociated with an action." + "title": "end_time is the time when status change to Completed" } }, "description": "Stage holds the configuration and status of a stage." @@ -2510,41 +2493,6 @@ "default": "STAGE_STATUS_UNSPECIFIED", "description": "StageStatus defines the possible execution statuses of a stage.\n\n - STAGE_STATUS_UNSPECIFIED: STAGE_STATUS_UNSPECIFIED means unknown stage status.\n - STAGE_STATUS_RUNNING: STAGE_STATUS_RUNNING means the stage has begun execution.\n - STAGE_STATUS_COMPLETED: STAGE_STATUS_COMPLETED means the stage has ceased execution.\nSuccess/failure of a stage cannot be inferred from this status\nalone but rather this status plus the stage error. That is, no\nerror implies success and some error implies failure.\n - STAGE_STATUS_NOT_STARTED: STAGE_STATUS_NOT_STARTED means the stage has not been started." }, - "arista.changecontrol.v1.StepInfo": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "name represents the name of the step." - }, - "status": { - "$ref": "#/definitions/arista.changecontrol.v1.StepStatus", - "description": "status represents the present execution status of the step." - }, - "error": { - "type": "string", - "description": "error captures any error that occurred." - }, - "message": { - "type": "string", - "description": "message represents any relevant information associated with the step." - } - }, - "description": "StepInfo contains the status details of an action step." - }, - "arista.changecontrol.v1.StepStatus": { - "type": "string", - "enum": [ - "STEP_STATUS_UNSPECIFIED", - "STEP_STATUS_NOT_STARTED", - "STEP_STATUS_RUNNING", - "STEP_STATUS_FINISHED", - "STEP_STATUS_SKIPPED", - "STEP_STATUS_FAILED" - ], - "default": "STEP_STATUS_UNSPECIFIED", - "description": "StepStatus defines the possible execution statuses of a step within an action.\n\n - STEP_STATUS_UNSPECIFIED: STEP_STATUS_UNSPECIFIED represents an unspecified state for a step within\nan action. Currently it is reserved for some future utility.\n - STEP_STATUS_NOT_STARTED: STEP_STATUS_NOT_STARTED represents that the step has not started execution.\n - STEP_STATUS_RUNNING: STEP_STATUS_RUNNING represents that the step is under execution.\n - STEP_STATUS_FINISHED: STEP_STATUS_FINISHED represents that the step has finished execution.\n - STEP_STATUS_SKIPPED: STEP_STATUS_SKIPPED represents that the step has been skipped from execution.\n - STEP_STATUS_FAILED: STEP_STATUS_FAILED represents that the step has failed its execution." - }, "arista.changecontrol.v1.TimestampFlag": { "type": "object", "properties": {