Adds full CLI support for the OVHcloud WebHosting API#168
Conversation
Signed-off-by: Arnaud Jost <arnaud.jost@ovhcloud.com>
Signed-off-by: Arnaud Jost <arnaud.jost@ovhcloud.com>
Signed-off-by: Arnaud Jost <arnaud.jost@ovhcloud.com>
Signed-off-by: Arnaud Jost <arnaud.jost@ovhcloud.com>
Signed-off-by: Arnaud Jost <arnaud.jost@ovhcloud.com>
Signed-off-by: Arnaud Jost <arnaud.jost@ovhcloud.com>
Signed-off-by: Arnaud Jost <arnaud.jost@ovhcloud.com>
Signed-off-by: Arnaud Jost <arnaud.jost@ovhcloud.com>
Signed-off-by: Arnaud Jost <arnaud.jost@ovhcloud.com>
Signed-off-by: Arnaud Jost <arnaud.jost@ovhcloud.com>
Signed-off-by: Arnaud Jost <arnaud.jost@ovhcloud.com>
Signed-off-by: Arnaud Jost <arnaud.jost@ovhcloud.com>
Signed-off-by: Arnaud Jost <arnaud.jost@ovhcloud.com>
Signed-off-by: Arnaud Jost <arnaud.jost@ovhcloud.com>
Signed-off-by: Arnaud Jost <arnaud.jost@ovhcloud.com>
Signed-off-by: Arnaud Jost <arnaud.jost@ovhcloud.com>
Signed-off-by: Arnaud Jost <arnaud.jost@ovhcloud.com>
Signed-off-by: Arnaud Jost <arnaud.jost@ovhcloud.com>
Signed-off-by: Arnaud Jost <arnaud.jost@ovhcloud.com>
Signed-off-by: Arnaud Jost <arnaud.jost@ovhcloud.com>
Signed-off-by: Arnaud Jost <arnaud.jost@ovhcloud.com>
Signed-off-by: Arnaud Jost <arnaud.jost@ovhcloud.com>
Signed-off-by: Arnaud Jost <arnaud.jost@ovhcloud.com>
Signed-off-by: Arnaud Jost <arnaud.jost@ovhcloud.com>
Signed-off-by: Arnaud Jost <arnaud.jost@ovhcloud.com>
Signed-off-by: Arnaud Jost <arnaud.jost@ovhcloud.com>
Signed-off-by: Arnaud Jost <arnaud.jost@ovhcloud.com>
Signed-off-by: Arnaud Jost <arnaud.jost@ovhcloud.com>
Signed-off-by: Arnaud Jost <arnaud.jost@ovhcloud.com>
Signed-off-by: Arnaud Jost <arnaud.jost@ovhcloud.com>
Signed-off-by: Arnaud Jost <arnaud.jost@ovhcloud.com>
Signed-off-by: Arnaud Jost <arnaud.jost@ovhcloud.com>
Signed-off-by: Arnaud Jost <arnaud.jost@ovhcloud.com>
Signed-off-by: Arnaud Jost <arnaud.jost@ovhcloud.com>
Signed-off-by: Arnaud Jost <arnaud.jost@ovhcloud.com>
6101349 to
2fbd89c
Compare
There was a problem hiding this comment.
Pull request overview
This pull request adds comprehensive CLI coverage for the OVHcloud WebHosting API surface by introducing many new command docs and interactive templates, plus a few supporting changes in display and filtering.
Changes:
- Added many new WebHosting interactive output templates (website, runtime, CDN, SSL, Local SEO, tasks, users, etc.).
- Added autogenerated CLI documentation pages for the new
ovhcloud webhosting ...command tree. - Extended filtering tests and introduced a new WebHosting “v2” schema asset file; added a wasm output helper (currently with behavioral issues).
Reviewed changes
Copilot reviewed 248 out of 249 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| internal/services/webhosting/templates/website.tmpl | Adds interactive template for “website get” output. |
| internal/services/webhosting/templates/website_deployment.tmpl | Adds interactive template for website deployment details. |
| internal/services/webhosting/templates/website_creation_capabilities.tmpl | Adds interactive template for website creation capabilities. |
| internal/services/webhosting/templates/vcs_webhooks.tmpl | Adds interactive template for VCS webhook URL output. |
| internal/services/webhosting/templates/user.tmpl | Adds interactive template for FTP/SSH user details. |
| internal/services/webhosting/templates/user_log.tmpl | Adds interactive template for user log details. |
| internal/services/webhosting/templates/token.tmpl | Adds interactive template for DNS verification token output. |
| internal/services/webhosting/templates/task.tmpl | Adds interactive template for task details output. |
| internal/services/webhosting/templates/ssl.tmpl | Adds interactive template for SSL details output. |
| internal/services/webhosting/templates/ssl_resource_certificates.tmpl | Adds interactive template for resource certificate listing output. |
| internal/services/webhosting/templates/ssh_key.tmpl | Adds interactive template for SSH public key output. |
| internal/services/webhosting/templates/runtime.tmpl | Adds interactive template for runtime details output. |
| internal/services/webhosting/templates/runtime_available_types.tmpl | Adds interactive template for available runtime types output. |
| internal/services/webhosting/templates/own_log.tmpl | Adds interactive template for own-log entry output. |
| internal/services/webhosting/templates/own_log_user.tmpl | Adds interactive template for own-log user output (dual-shape payload). |
| internal/services/webhosting/templates/ovh_config.tmpl | Adds interactive template for .ovhconfig entry output. |
| internal/services/webhosting/templates/ovh_config_recommended.tmpl | Adds interactive template for recommended .ovhconfig values. |
| internal/services/webhosting/templates/ovh_config_capabilities.tmpl | Adds interactive template for .ovhconfig capability matrix output. |
| internal/services/webhosting/templates/module_catalog.tmpl | Adds interactive template for module catalog entry output. |
| internal/services/webhosting/templates/local_seo_visibility_result.tmpl | Adds interactive template for Local SEO visibility results. |
| internal/services/webhosting/templates/local_seo_visibility_check.tmpl | Adds interactive template for Local SEO visibility check output. |
| internal/services/webhosting/templates/local_seo_location.tmpl | Adds interactive template for Local SEO location details. |
| internal/services/webhosting/templates/local_seo_email.tmpl | Adds interactive template for Local SEO email availability output. |
| internal/services/webhosting/templates/local_seo_directories.tmpl | Adds interactive template for Local SEO directory catalogs. |
| internal/services/webhosting/templates/local_seo_account.tmpl | Adds interactive template for Local SEO account details. |
| internal/services/webhosting/templates/extra_sql_service_info.tmpl | Adds interactive template for Extra SQL service info output. |
| internal/services/webhosting/templates/extra_sql_option.tmpl | Adds interactive template for Extra SQL option details output. |
| internal/services/webhosting/templates/env_var.tmpl | Adds interactive template for environment variable details output. |
| internal/services/webhosting/templates/email.tmpl | Adds interactive template for email settings output. |
| internal/services/webhosting/templates/email_option.tmpl | Adds interactive template for email option details output. |
| internal/services/webhosting/templates/email_option_service_info.tmpl | Adds interactive template for email option service info output. |
| internal/services/webhosting/templates/database.tmpl | Adds interactive template for database details output. |
| internal/services/webhosting/templates/database_dump.tmpl | Adds interactive template for database dump details output. |
| internal/services/webhosting/templates/database_copy.tmpl | Adds interactive template for database copy details output. |
| internal/services/webhosting/templates/database_capabilities.tmpl | Adds interactive template for DB capability flags output. |
| internal/services/webhosting/templates/database_available_versions.tmpl | Adds interactive template for DB available versions output. |
| internal/services/webhosting/templates/cron.tmpl | Adds interactive template for cron task details output. |
| internal/services/webhosting/templates/cdn.tmpl | Adds interactive template for CDN details output. |
| internal/services/webhosting/templates/cdn_operation.tmpl | Adds interactive template for CDN operation details output. |
| internal/services/webhosting/templates/cdn_domain.tmpl | Adds interactive template for CDN domain details output. |
| internal/services/webhosting/templates/cdn_domain_statistics.tmpl | Adds interactive template for CDN domain time series stats. |
| internal/services/webhosting/templates/cdn_domain_option.tmpl | Adds interactive template for CDN domain option details. |
| internal/services/webhosting/templates/cdn_available_options.tmpl | Adds interactive template for CDN available options output. |
| internal/services/webhosting/templates/boost_history.tmpl | Adds interactive template for boost history output. |
| internal/services/webhosting/templates/attached_domain.tmpl | Adds interactive template for attached domain details output. |
| internal/services/webhosting/templates/attached_domain_dig_status.tmpl | Adds interactive template for DNS dig-status output. |
| internal/services/webhosting/templates/abuse_state.tmpl | Adds interactive template for abuse-state output. |
| internal/filters/filters_test.go | Adds test coverage for wildcard-to-regex normalization in filters. |
| internal/display/display_wasm.go | Adds wasm OutputWithFormat helper (currently diverges from non-wasm behavior). |
| internal/assets/api-schemas/webhosting_v2.json | Adds a small v2 WebHosting schema fragment (currently not wired into embedded assets). |
| doc/ovhcloud_webhosting_website_update.md | New CLI doc page for webhosting website update. |
| doc/ovhcloud_webhosting_website_list.md | New CLI doc page for webhosting website list. |
| doc/ovhcloud_webhosting_website_get.md | New CLI doc page for webhosting website get. |
| doc/ovhcloud_webhosting_website_deployment.md | New CLI doc page for webhosting website deployment. |
| doc/ovhcloud_webhosting_website_deployment_logs.md | New CLI doc page for webhosting website deployment logs. |
| doc/ovhcloud_webhosting_website_deployment_get.md | New CLI doc page for webhosting website deployment get. |
| doc/ovhcloud_webhosting_website_deploy.md | New CLI doc page for webhosting website deploy. |
| doc/ovhcloud_webhosting_website_delete.md | New CLI doc page for webhosting website delete. |
| doc/ovhcloud_webhosting_website_creation-capabilities.md | New CLI doc page for webhosting website creation-capabilities. |
| doc/ovhcloud_webhosting_website_create.md | New CLI doc page for webhosting website create. |
| doc/ovhcloud_webhosting_vcs.md | New CLI doc page for webhosting vcs. |
| doc/ovhcloud_webhosting_vcs_webhooks.md | New CLI doc page for webhosting vcs webhooks. |
| doc/ovhcloud_webhosting_user_update.md | New CLI doc page for webhosting user update. |
| doc/ovhcloud_webhosting_user_list.md | New CLI doc page for webhosting user list. |
| doc/ovhcloud_webhosting_user_get.md | New CLI doc page for webhosting user get. |
| doc/ovhcloud_webhosting_user_delete.md | New CLI doc page for webhosting user delete. |
| doc/ovhcloud_webhosting_user_create.md | New CLI doc page for webhosting user create. |
| doc/ovhcloud_webhosting_user_change-password.md | New CLI doc page for webhosting user change-password. |
| doc/ovhcloud_webhosting_unblock-tcp-out.md | New CLI doc page for webhosting unblock-tcp-out. |
| doc/ovhcloud_webhosting_token.md | New CLI doc page for webhosting token. |
| doc/ovhcloud_webhosting_terminate.md | New CLI doc page for webhosting terminate. |
| doc/ovhcloud_webhosting_tasks.md | New CLI doc page for webhosting tasks. |
| doc/ovhcloud_webhosting_tasks_list.md | New CLI doc page for webhosting tasks list. |
| doc/ovhcloud_webhosting_tasks_get.md | New CLI doc page for webhosting tasks get. |
| doc/ovhcloud_webhosting_ssl.md | New CLI doc page for webhosting ssl. |
| doc/ovhcloud_webhosting_ssl_get.md | New CLI doc page for webhosting ssl get. |
| doc/ovhcloud_webhosting_ssl_domains.md | New CLI doc page for webhosting ssl domains. |
| doc/ovhcloud_webhosting_ssl_delete.md | New CLI doc page for webhosting ssl delete. |
| doc/ovhcloud_webhosting_ssl_create.md | New CLI doc page for webhosting ssl create. |
| doc/ovhcloud_webhosting_ssh-key.md | New CLI doc page for webhosting ssh-key. |
| doc/ovhcloud_webhosting_ssh-key_get.md | New CLI doc page for webhosting ssh-key get. |
| doc/ovhcloud_webhosting_ssh-key_create.md | New CLI doc page for webhosting ssh-key create. |
| doc/ovhcloud_webhosting_service-info.md | New CLI doc page for webhosting service-info. |
| doc/ovhcloud_webhosting_service-info_update.md | New CLI doc page for webhosting service-info update. |
| doc/ovhcloud_webhosting_service-info_get.md | New CLI doc page for webhosting service-info get. |
| doc/ovhcloud_webhosting_runtime_update.md | New CLI doc page for webhosting runtime update. |
| doc/ovhcloud_webhosting_runtime_list.md | New CLI doc page for webhosting runtime list. |
| doc/ovhcloud_webhosting_runtime_get.md | New CLI doc page for webhosting runtime get. |
| doc/ovhcloud_webhosting_runtime_domains.md | New CLI doc page for webhosting runtime domains. |
| doc/ovhcloud_webhosting_runtime_delete.md | New CLI doc page for webhosting runtime delete. |
| doc/ovhcloud_webhosting_runtime_create.md | New CLI doc page for webhosting runtime create. |
| doc/ovhcloud_webhosting_restore-snapshot.md | New CLI doc page for webhosting restore-snapshot. |
| doc/ovhcloud_webhosting_request-boost.md | New CLI doc page for webhosting request-boost. |
| doc/ovhcloud_webhosting_request-action.md | New CLI doc page for webhosting request-action. |
| doc/ovhcloud_webhosting_own-log.md | New CLI doc page for webhosting own-log. |
| doc/ovhcloud_webhosting_own-log_user_update.md | New CLI doc page for webhosting own-log user update. |
| doc/ovhcloud_webhosting_own-log_user_get.md | New CLI doc page for webhosting own-log user get. |
| doc/ovhcloud_webhosting_own-log_user_delete.md | New CLI doc page for webhosting own-log user delete. |
| doc/ovhcloud_webhosting_own-log_user_create.md | New CLI doc page for webhosting own-log user create. |
| doc/ovhcloud_webhosting_own-log_user_change-password.md | New CLI doc page for webhosting own-log user change-password. |
| doc/ovhcloud_webhosting_own-log_get.md | New CLI doc page for webhosting own-log get. |
| doc/ovhcloud_webhosting_ovh-config_rollback.md | New CLI doc page for webhosting ovh-config rollback. |
| doc/ovhcloud_webhosting_ovh-config_refresh.md | New CLI doc page for webhosting ovh-config refresh. |
| doc/ovhcloud_webhosting_ovh-config_recommended.md | New CLI doc page for webhosting ovh-config recommended. |
| doc/ovhcloud_webhosting_ovh-config_get.md | New CLI doc page for webhosting ovh-config get. |
| doc/ovhcloud_webhosting_offer.md | New CLI doc page for webhosting offer. |
| doc/ovhcloud_webhosting_offer_capabilities.md | New CLI doc page for webhosting offer capabilities. |
| doc/ovhcloud_webhosting_module.md | New CLI doc page for webhosting module. |
| doc/ovhcloud_webhosting_module_list.md | New CLI doc page for webhosting module list. |
| doc/ovhcloud_webhosting_module_install.md | New CLI doc page for webhosting module install. |
| doc/ovhcloud_webhosting_module_get.md | New CLI doc page for webhosting module get. |
| doc/ovhcloud_webhosting_module_delete.md | New CLI doc page for webhosting module delete. |
| doc/ovhcloud_webhosting_module_catalog.md | New CLI doc page for webhosting module catalog. |
| doc/ovhcloud_webhosting_module_catalog_get.md | New CLI doc page for webhosting module catalog get. |
| doc/ovhcloud_webhosting_local-seo_visibility-result.md | New CLI doc page for webhosting local-seo visibility-result. |
| doc/ovhcloud_webhosting_local-seo_visibility-check.md | New CLI doc page for webhosting local-seo visibility-check. |
| doc/ovhcloud_webhosting_local-seo_location_terminate.md | New CLI doc page for webhosting local-seo location terminate. |
| doc/ovhcloud_webhosting_local-seo_location_service-info.md | New CLI doc page for webhosting local-seo location service-info. |
| doc/ovhcloud_webhosting_local-seo_location_service-info_get.md | New CLI doc page for webhosting local-seo location service-info get. |
| doc/ovhcloud_webhosting_local-seo_location_get.md | New CLI doc page for webhosting local-seo location get. |
| doc/ovhcloud_webhosting_local-seo_email-availability.md | New CLI doc page for webhosting local-seo email-availability. |
| doc/ovhcloud_webhosting_local-seo_directories.md | New CLI doc page for webhosting local-seo directories. |
| doc/ovhcloud_webhosting_local-seo_account.md | New CLI doc page for webhosting local-seo account. |
| doc/ovhcloud_webhosting_local-seo_account_login.md | New CLI doc page for webhosting local-seo account login. |
| doc/ovhcloud_webhosting_local-seo_account_get.md | New CLI doc page for webhosting local-seo account get. |
| doc/ovhcloud_webhosting_incident.md | New CLI doc page for webhosting incident. |
| doc/ovhcloud_webhosting_extra-sql_terminate.md | New CLI doc page for webhosting extra-sql terminate. |
| doc/ovhcloud_webhosting_extra-sql_service-info.md | New CLI doc page for webhosting extra-sql service-info. |
| doc/ovhcloud_webhosting_extra-sql_service-info_get.md | New CLI doc page for webhosting extra-sql service-info get. |
| doc/ovhcloud_webhosting_extra-sql_get.md | New CLI doc page for webhosting extra-sql get. |
| doc/ovhcloud_webhosting_env.md | New CLI doc page for webhosting env. |
| doc/ovhcloud_webhosting_env_update.md | New CLI doc page for webhosting env update. |
| doc/ovhcloud_webhosting_env_list.md | New CLI doc page for webhosting env list. |
| doc/ovhcloud_webhosting_env_get.md | New CLI doc page for webhosting env get. |
| doc/ovhcloud_webhosting_env_delete.md | New CLI doc page for webhosting env delete. |
| doc/ovhcloud_webhosting_env_create.md | New CLI doc page for webhosting env create. |
| doc/ovhcloud_webhosting_email.md | New CLI doc page for webhosting email. |
| doc/ovhcloud_webhosting_email-option.md | New CLI doc page for webhosting email-option. |
| doc/ovhcloud_webhosting_email-option_terminate.md | New CLI doc page for webhosting email-option terminate. |
| doc/ovhcloud_webhosting_email-option_service-info.md | New CLI doc page for webhosting email-option service-info. |
| doc/ovhcloud_webhosting_email-option_get.md | New CLI doc page for webhosting email-option get. |
| doc/ovhcloud_webhosting_email_update.md | New CLI doc page for webhosting email update. |
| doc/ovhcloud_webhosting_email_request-action.md | New CLI doc page for webhosting email request-action. |
| doc/ovhcloud_webhosting_email_info.md | New CLI doc page for webhosting email info. |
| doc/ovhcloud_webhosting_email_bounces.md | New CLI doc page for webhosting email bounces. |
| doc/ovhcloud_webhosting_edit.md | Updates docs for webhosting edit to include --clear-display-name. |
| doc/ovhcloud_webhosting_domain_restart.md | New CLI doc page for webhosting domain restart. |
| doc/ovhcloud_webhosting_domain_purge-cache.md | New CLI doc page for webhosting domain purge-cache. |
| doc/ovhcloud_webhosting_domain_list.md | New CLI doc page for webhosting domain list. |
| doc/ovhcloud_webhosting_domain_get.md | New CLI doc page for webhosting domain get. |
| doc/ovhcloud_webhosting_domain_find.md | New CLI doc page for webhosting domain find. |
| doc/ovhcloud_webhosting_domain_dig-status.md | New CLI doc page for webhosting domain dig-status. |
| doc/ovhcloud_webhosting_domain_delete.md | New CLI doc page for webhosting domain delete. |
| doc/ovhcloud_webhosting_domain_available-offer.md | New CLI doc page for webhosting domain available-offer. |
| doc/ovhcloud_webhosting_db_restore.md | New CLI doc page for webhosting db restore. |
| doc/ovhcloud_webhosting_db_request-action.md | New CLI doc page for webhosting db request-action. |
| doc/ovhcloud_webhosting_db_list.md | New CLI doc page for webhosting db list. |
| doc/ovhcloud_webhosting_db_import.md | New CLI doc page for webhosting db import. |
| doc/ovhcloud_webhosting_db_get.md | New CLI doc page for webhosting db get. |
| doc/ovhcloud_webhosting_db_dump.md | New CLI doc page for webhosting db dump group. |
| doc/ovhcloud_webhosting_db_dump_restore.md | New CLI doc page for webhosting db dump restore. |
| doc/ovhcloud_webhosting_db_dump_get.md | New CLI doc page for webhosting db dump get. |
| doc/ovhcloud_webhosting_db_dump_delete.md | New CLI doc page for webhosting db dump delete. |
| doc/ovhcloud_webhosting_db_dump_create.md | New CLI doc page for webhosting db dump create. |
| doc/ovhcloud_webhosting_db_delete.md | New CLI doc page for webhosting db delete. |
| doc/ovhcloud_webhosting_db_copy.md | New CLI doc page for webhosting db copy group. |
| doc/ovhcloud_webhosting_db_copy_restore.md | New CLI doc page for webhosting db copy restore. |
| doc/ovhcloud_webhosting_db_copy_get.md | New CLI doc page for webhosting db copy get. |
| doc/ovhcloud_webhosting_db_copy_delete.md | New CLI doc page for webhosting db copy delete. |
| doc/ovhcloud_webhosting_db_copy_create.md | New CLI doc page for webhosting db copy create. |
| doc/ovhcloud_webhosting_db_change-password.md | New CLI doc page for webhosting db change-password. |
| doc/ovhcloud_webhosting_db_capabilities.md | New CLI doc page for webhosting db capabilities. |
| doc/ovhcloud_webhosting_db_available-version.md | New CLI doc page for webhosting db available-version. |
| doc/ovhcloud_webhosting_cron_update.md | New CLI doc page for webhosting cron update. |
| doc/ovhcloud_webhosting_cron_get.md | New CLI doc page for webhosting cron get. |
| doc/ovhcloud_webhosting_cron_delete.md | New CLI doc page for webhosting cron delete. |
| doc/ovhcloud_webhosting_cron_create.md | New CLI doc page for webhosting cron create. |
| doc/ovhcloud_webhosting_cron_available-languages.md | New CLI doc page for webhosting cron available-languages. |
| doc/ovhcloud_webhosting_cdn_service-info.md | New CLI doc page for webhosting cdn service-info. |
| doc/ovhcloud_webhosting_cdn_service-info_get.md | New CLI doc page for webhosting cdn service-info get. |
| doc/ovhcloud_webhosting_cdn_operation.md | New CLI doc page for webhosting cdn operation group. |
| doc/ovhcloud_webhosting_cdn_operation_get.md | New CLI doc page for webhosting cdn operation get. |
| doc/ovhcloud_webhosting_cdn_get.md | New CLI doc page for webhosting cdn get. |
| doc/ovhcloud_webhosting_cdn_domain_refresh.md | New CLI doc page for webhosting cdn domain refresh. |
| doc/ovhcloud_webhosting_cdn_domain_purge.md | New CLI doc page for webhosting cdn domain purge. |
| doc/ovhcloud_webhosting_cdn_domain_option_get.md | New CLI doc page for webhosting cdn domain option get. |
| doc/ovhcloud_webhosting_cdn_domain_option_delete.md | New CLI doc page for webhosting cdn domain option delete. |
| doc/ovhcloud_webhosting_cdn_domain_get.md | New CLI doc page for webhosting cdn domain get. |
| doc/ovhcloud_webhosting_api.md | New CLI doc page for webhosting api group. |
| doc/ovhcloud_webhosting_api_call.md | New CLI doc page for webhosting api call. |
| doc/ovhcloud_webhosting_abuse-state.md | New CLI doc page for webhosting abuse-state. |
Comments suppressed due to low confidence (1)
internal/services/webhosting/templates/cdn_domain_option.tmpl:27
- This user-facing hint mixes French with otherwise English CLI output ("pour afficher..."). For consistency (and to keep templates searchable/maintainable), please translate this line to English like the other templates.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| func OutputWithFormat(msg *OutputMessage, outputFormat *OutputFormat) { | ||
| if msg.Error { | ||
| exitError("%s", msg.Message) | ||
| return | ||
| } | ||
| if msg.Warning { | ||
| exitError("%s", msg.Message) | ||
| return | ||
| } | ||
|
|
||
| if msg.Details != nil { | ||
| if err := prettyPrintJSON(msg.Details); err != nil { | ||
| exitError("error displaying JSON results: %s", err) | ||
| } | ||
| return | ||
| } | ||
|
|
||
| outputf("%s", msg.Message) | ||
| } |
There was a problem hiding this comment.
In the wasm build, OutputWithFormat currently ignores outputFormat (yaml/custom/interactive) and treats warnings as errors by calling exitError, which sets ResultError. This behavior diverges from internal/display/display.go and can cause warnings to be surfaced as fatal errors or output to be formatted incorrectly. Consider implementing the same switch-on-format logic as the non-wasm version and setting ResultError only for msg.Error (and for msg.Warning without marking it as an error).
| - Status: {{with (index $ssl "status")}}{{.}}{{else}}N/A{{end}} | ||
| - Regenerable: {{with (index $ssl "regenerable")}}{{.}}{{else}}N/A{{end}} | ||
| - Report bound: {{with (index $ssl "isReportable")}}{{.}}{{else}}N/A{{end}} | ||
| - Task ID: {{with (index $ssl "taskId")}}{{.}}{{else}}N/A{{end}} |
There was a problem hiding this comment.
The label "Report bound" looks like a typo/inaccurate wording for the isReportable field. Renaming it to something like "Reportable" (or "Is reportable") would better match the underlying field and avoid confusing users.
| { | ||
| "/webhosting/resource/{name}/certificate": { | ||
| "get": { | ||
| "summary": "List SSL certificates for a hosting resource", | ||
| "description": "Beta endpoint returning certificates detected on a WebHosting resource.", |
There was a problem hiding this comment.
This new schema file is added under internal/assets/api-schemas, but it is not embedded/registered in internal/assets/assets.go (which explicitly lists embedded schemas). If any CLI code needs to load this spec at runtime, it won't be available in the compiled binary unless you add the corresponding go:embed entry and exported var (and wire it where needed).
Code Review:
|
| # | Severity | Issue | Location |
|---|---|---|---|
| 1 | Critical | website update sends path and vcsUrl — API only accepts vcsBranch |
webhosting.go:2250, cmd:948 |
| 2 | Critical | website deploy missing reset parameter |
webhosting.go:2285, cmd:967 |
| 3 | Critical | user update sends password — should use changePassword endpoint |
webhosting.go:2825, cmd:1238 |
| 4 | Medium | cron create/update missing --status flag |
webhosting.go:574, cmd:180 |
| 5 | Medium | user --ssh-state help text missing sftponly value |
cmd:1234 |
| 6 | Medium | own-log user create editor example contains stale ownLogsId field |
webhosting.go:322 |
| 7 | Medium | Service-level SSL endpoints not exposed (custom cert, regenerate, report) | webhosting.go:2356 |
Code review fixes
Test results
|
ac030ed to
16cf0d5
Compare
Signed-off-by: Arnaud Jost <arnaud.jost@ovhcloud.com>
16cf0d5 to
38cc973
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 255 out of 256 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| {{ end -}} | ||
| {{ end }} | ||
|
|
||
| 💡 Use option -o json or -o yaml pour afficher toutes les informations brutes |
There was a problem hiding this comment.
The help tip is partly in French ("pour afficher toutes les informations brutes"), while the rest of the CLI templates/docs are in English. Please translate this line to English to keep output consistent.
| { | ||
| "/webhosting/resource/{name}/certificate": { | ||
| "get": { | ||
| "summary": "List SSL certificates for a hosting resource", | ||
| "description": "Beta endpoint returning certificates detected on a WebHosting resource.", | ||
| "parameters": [ | ||
| { | ||
| "in": "path", | ||
| "name": "name", | ||
| "required": true, | ||
| "schema": { "type": "string" }, | ||
| "description": "Hosting service name" | ||
| } | ||
| ], | ||
| "responses": { | ||
| "200": { | ||
| "description": "List of certificates", | ||
| "content": { | ||
| "application/json": { | ||
| "schema": { | ||
| "type": "array", | ||
| "items": { "type": "object" } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
This schema file is added but appears unused in the compiled CLI: internal/assets/assets.go only embeds api-schemas/webhosting.json (no webhosting_v2.json), and there are no references to webhosting_v2.json/a corresponding embedded variable in internal/assets. If this schema is required at runtime, please embed it and wire it into the assets/openapi selection; otherwise consider removing it to avoid shipping an unused/forgotten schema.
Signed-off-by: Arnaud Jost <arnaud.jost@ovhcloud.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 254 out of 255 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Description
This PR adds full CLI support for the OVHcloud WebHosting API.
New commands
The ovhcloud webhosting command group now covers the entire WebHosting surface:
Type of change
Please delete options that are not relevant.
Checklist:
go mod tidyTests