Skip to content

Lack of error messages with some commands that should error out #398

@fernando-villalba

Description

@fernando-villalba

Issue

Many commands that should error out, don't.

For example

civo kubernetes ls -o lefafa -f lefufu

There is no --output type lefafa or --field named lefufu

And yet the commands just goes ahead and works as if everything was fine:

% civo kubernetes ls -o lefafa -f lefufu                                                                                        
+--------------------------------------+----------+--------------+-------+-------+-------------------------------------+
| ID                                   | Name     | Cluster-Type | Nodes | Pools | Conditions                          |
+--------------------------------------+----------+--------------+-------+-------+-------------------------------------+
| e7747b8e-3fa7-4c2e-b6b8-e2473597a605 | test-app | k3s          |     1 |     1 | Control Plane Accessible: False     |
|                                      |          |              |       |       | All Workers Up: False               |
|                                      |          |              |       |       | Cluster On Desired Version: Unknown |
|                                      |          |              |       |       |                                     |
+--------------------------------------+----------+--------------+-------+-------+-------------------------------------+

Another example:

% civo kubernetes create --size g4s.kube.xsmall --nodes 1 test2 test3 test4 

The cluster test2 (524a3998-1639-4fed-995c-fcd6dc1aa2d0) has been created
fernandovillalba@Fernandos-MacBook-Pro-2 tempo-tutorial % civo k3s ls                                                               
+--------------------------------------+-------+--------------+-------+-------+-------------------------------------+
| ID                                   | Name  | Cluster-Type | Nodes | Pools | Conditions                          |
+--------------------------------------+-------+--------------+-------+-------+-------------------------------------+
| 524a3998-1639-4fed-995c-fcd6dc1aa2d0 | test2 | k3s          |     1 |     1 | Control Plane Accessible: False     |
|                                      |       |              |       |       | All Workers Up: False               |
|                                      |       |              |       |       | Cluster On Desired Version: Unknown |
|                                      |       |              |       |       |                                     |
+--------------------------------------+-------+--------------+-------+-------+-------------------------------------+

Despite giving multiple cluster names, it just goes ahead and creates the first one, ignoring all others. This should either error out, or allow the creation of multiple clusters with multitple parameters.

Acceptance Criteria

  1. Error out whenever the wrong --output flag value is passed. Same for --field
  2. Amend the behaviour of multiple name parameters for kubernetes to either create multiple clusters or failing saying that it expected just one parameter.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions