()
| 124 | } |
| 125 | |
| 126 | func newCommunityScriptsPlanCmd() *cobra.Command { |
| 127 | cmd := &cobra.Command{ |
| 128 | Use: "plan <slug-or-name> --node <node>", |
| 129 | Short: "Show the planned community script install command", |
| 130 | Long: `Show the resolved node, script metadata, environment overrides, and |
| 131 | redacted remote command that would be used for a Community Scripts install.`, |
| 132 | Example: ` pvetui community-scripts plan grafana --node pve01 --yes --set var_hostname=grafana |
| 133 | pvetui community-scripts plan docker --node pve01 --set var_nesting=1 --output table`, |
| 134 | Args: cobra.ExactArgs(1), |
| 135 | RunE: runCommunityScriptsPlan, |
| 136 | ValidArgsFunction: completeCommunityScriptSlugs, |
| 137 | } |
| 138 | |
| 139 | addCommunityScriptDeployFlags(cmd) |
| 140 | _ = cmd.MarkFlagRequired("node") |
| 141 | |
| 142 | return cmd |
| 143 | } |
| 144 | |
| 145 | func addCommunityScriptDeployFlags(cmd *cobra.Command) { |
| 146 | cmd.Flags().String("node", "", "Target Proxmox node") |
no test coverage detected