clusters.go | |
---|---|
|
|
Generated documentation is available at: https://pkg.go.dev/github.com/RedHatInsights/insights-operator-cli/commands Documentation in literate-programming-style is available at: https://redhatinsights.github.io/insights-operator-cli/packages/commands/clusters.html |
|
ListOfClusters function displays list of clusters gathered via REST API call to the controller service. Just basic information about clusters are displayed - mainly its internal ID, an official ID, and a name. |
|
try to read list of clusters and display error if something wrong happens |
|
check for any error |
|
list of clusters operation failed for some reason |
|
TODO: handle empty list of clusters |
|
list of clusters operation has been successful, let's display them |
|
DeleteClusterNoConfirm function deletes all info about selected cluster w/o asking for confirmation of this operation. Usually it function should not be called directly from user interface as some confirmation is required. |
|
DeleteCluster function deletes all info about selected cluster from database. Before this operation is performed, user is ask if it is really required (this additional operation can be disabled by command line option). |
|
the client has been configured to ask for additional confirmation display the confirmation dialog |
|
if answer is no, simply skip the rest of this function |
|
try to delete cluster and display error if something wrong happens |
|
check for any error |
|
error has been detected during REST API call or during DB operation |
|
everything's ok, cluster has been deleted |
|
AddCluster function inserts new cluster info into the database via REST API call to insights operator controller service. |
|
try to add new cluster and display error if something wrong happens |
|
check for any error |
|
error has been detected during REST API call or during DB operation |
|
everything's ok, cluster has been added |
|