Skip to content

Implement command-line utility as specified #1

@jdickey

Description

@jdickey

Successfully implement and prove utility exercising all documented action (command and query) capabilities compliant with the usage documentation, including:

  1. All actions other than help or version require an environment variable, DO_API_TOKEN, to contain a Personal Access Token ("API key") belonging to the DigitalOcean user owning the resources being operated on (the Current User);
  2. Query and report a list of all Droplets owned by the Current User;
  3. Query and report a list of all Floating IPs owned by the Current User;
  4. Command the DigitalOcean API to assign an existing Floating IP to a Droplet other than the one to which it is presently assigned;
  5. Display summarised and per-command detailed help for each command in the utility. This is largely taken care of by the CLI builder being used;
  6. Query and report a summary of a specific Droplet;
  7. Command a specific Droplet to power off immediately and unconditionally;
  8. Command a specific Droplet to power on;
  9. Command the DigitalOcean API to rename a specific Droplet to a valid name specified on the command line;
  10. Command a specific Droplet to gracefully shut down and power itself off; and
  11. Display version information about the utility.

Each command which acts upon a Droplet requires the Droplet ID to be specified using a --droplet-id= or -d command-line parameter. Failing to specify a Droplet ID must produce an appropriately-informative error message without performing any API actions.

API actions which report errors must cause an appropriately-informative error message to be reported, including the detail (missing or invalid API key, Droplet ID, Floating IP, or name) as appropriate.

Unit tests for API actions must use stubs and mocks rather than perform live API calls. Separate integration tests must test correct execution as well as all known error conditions for each command.

Completion of each and all of these tasks is required before releasing Version 0.9.0 of the Gem. Release of Version 1.0.0 of the Gem requires that that release has been tested in actual use, and any new issues rectified.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions