Skip to content

feat: implement the driver doctor hook - #59

Merged
tas50 merged 1 commit into
mainfrom
feat/doctor-hook
Aug 24, 2026
Merged

feat: implement the driver doctor hook#59
tas50 merged 1 commit into
mainfrom
feat/doctor-hook

Conversation

@tas50

@tas50 tas50 commented Aug 24, 2026

Copy link
Copy Markdown
Member

This driver declares no required_config at all, so nothing catches a missing endpoint or credential at finalize_config! time the way it does in most kitchen drivers. A missing cloudstack_api_key surfaces part way through create, after the run has already started. doctor moves that discovery to kitchen doctor.

Two groups of checks:

Settings the driver cannot deploy withoutcloudstack_api_url, cloudstack_api_key, cloudstack_secret_key, cloudstack_template_id, cloudstack_serviceoffering_id, cloudstack_zone_id. Each message says what the setting is for, not just that it is absent:

cloudstack_template_id is not set: CloudStack needs the template to build the instance from.

All of them are reported in one run. Reporting the first and stopping would mean six kitchen doctor invocations to configure a driver from scratch.

The endpoint actually works — the URL parses and has a host, and CloudStack accepts the keys (via a list_zones call, the cheapest authenticated request available).

The connectivity check is skipped when the endpoint or credentials are missing, since the first group already said so and "could not connect" on top of "no API key is set" is noise rather than information.

Verification

  • rake test69 examples, 0 failures (63 before; 6 new), rake exit 0
  • cookstyle --chefstyle — 9 files, no offenses
  • yard stats — 100% documented

@tas50
tas50 merged commit bf2c7ce into main Aug 24, 2026
8 checks passed
@tas50
tas50 deleted the feat/doctor-hook branch August 24, 2026 03:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant