IBM / lmctl

Cloud Pak for Network Automation (CP4NA) (previously ALM/TNCO) command line tool
Apache License 2.0
4 stars 19 forks source link

Add commands in LMCTL to retry, rollback and cancel intent process. #164

Closed maheshlokhande1 closed 1 year ago

maheshlokhande1 commented 1 year ago

An intent process invoked by lmctl can subsequently be canceled, retried, or rolled back via the CP4NA GUI or its APIs. To support the rollback case, lmctl supports the processState, of the intent processes invoked by lmctl, being Rolling Back (as a transient state) or Rolled Back (as a terminal state).

cancel, retry or rollback can also be invoked using the following lmctl commands respectively, where the ID value is the processId value of the intent process.

lmctl cancel process [OPTIONS] ID lmctl retry process [OPTIONS] ID lmctl rollback process [OPTIONS] ID

(env) maheshlokhande@maheshs-mbp LMCTL1 % lmctl cancel process 2ae2c2cf-cb5b-4d70-8004-3f8870f19684 Accepted cancelling process : 2ae2c2cf-cb5b-4d70-8004-3f8870f19684 (env) maheshlokhande@maheshs-mbp LMCTL1 % lmctl retry process 2ae2c2cf-cb5b-4d70-8004-3f8870f19684 Accepted retrying process : 2ae2c2cf-cb5b-4d70-8004-3f8870f19684

Signed-off-by: maheshlokhande1 mahesh.lokhande@ibm.com

dvaccarosenna commented 1 year ago

Thanks for addressing everything so far @maheshlokhande1, it's great progress! Not sure if you've seen my comment in the request for changes about needing to add unit tests? It appears differently to code comments so could be easily missed.

maheshlokhande1 commented 1 year ago

Thanks for addressing everything so far @maheshlokhande1, it's great progress! Not sure if you've seen my comment in the request for changes about needing to add unit tests? It appears differently to code comments so could be easily missed.

Hi @dvaccarosenna, Added few unit tests.