diff --git a/AGENTS.md b/AGENTS.md index 81a9e5e..3c62d8a 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -14,3 +14,21 @@ Always let the user review the proposed commit scope and commit message first, a ## ATVM Prep Script Guardrail - Do not run `/root/atvm_prep/atvm_prep.py` unless the operator explicitly asks for an `atvm_prep` task. + +## Exact VM Name Guardrail + +- For VM power or maintenance requests, act only on the exact VM names provided by the operator. +- If any requested VM name is not found, stop and report it; do not infer, substitute, or search for replacement VMs unless the operator explicitly asks for that discovery step. + +## ATVM Prep Mapping Defaults + +- For `atvm_prep` requests in this workspace, infer common options from operator shorthand when intent is clear. +- Datastore shorthand mapping for `-n`: + - `Gold` -> `AutomatedTest-VMBootImg-Gold` + - `Gold2` -> `AutomatedTest-VMBootImg-Gold-2` + - `ComputeMigration` (or `compute migration`) -> `AutomatedTest-VMBootImgComputeMigration-Gold` +- Client/ESXi pairing defaults: + - `CDS1-ESX165` <-> `192.168.1.165` + - `CDS1-ESX166` <-> `192.168.1.166` +- If only one of `-c` or `-e` is provided, auto-fill the paired value from this mapping. +- If both `-c` and `-e` are provided but conflict with mapping, stop and ask for confirmation before execution. diff --git a/atvm/AGENTS.md b/atvm/AGENTS.md index 0eca51a..9b3a647 100644 --- a/atvm/AGENTS.md +++ b/atvm/AGENTS.md @@ -101,6 +101,18 @@ This file defines how to operate and maintain the ATVM workspace in `/home/aw/co - If the operator asks for ATVM run status without mentioning Mattermost, respond locally only and do not post externally. - If the operator asks to send ATVM run status to Mattermost, use `MATTERMOST_ATVM_WEBHOOK` and `MATTERMOST_ATVM_CHANNEL` from `/home/aw/code/cds/.env.credentials.local` by default and send the final status only after the run has fully completed, whether the run passed or failed. - For vCenter VM snapshot requests, default the snapshot name to `VM Snapshot [m/d/yyyy], [h:mm:ss AM/PM]` in the local `America/New_York` timezone unless the operator explicitly requests a different name. +- For VM power, shutdown, startup, snapshot, or maintenance requests, operate only on the exact VM names provided by the operator. +- If any requested VM name is missing or not found, stop immediately and report the missing names; do not infer, substitute, or search for replacement VMs unless the operator explicitly requests a discovery/mapping step. +- For `atvm_prep` requests, infer common option values from operator shorthand when intent is clear. +- `atvm_prep` datastore shorthand mapping for `-n`: + - `Gold` -> `AutomatedTest-VMBootImg-Gold` + - `Gold2` -> `AutomatedTest-VMBootImg-Gold-2` + - `ComputeMigration` (or `compute migration`) -> `AutomatedTest-VMBootImgComputeMigration-Gold` +- `atvm_prep` client/ESXi pair mapping: + - `CDS1-ESX165` <-> `192.168.1.165` + - `CDS1-ESX166` <-> `192.168.1.166` +- When an `atvm_prep` request specifies only one side of the client/ESXi pair (`-c` or `-e`), auto-fill the other side from the mapping. +- If both `-c` and `-e` are provided but conflict with the mapping, stop and ask the operator to confirm the intended pair before any execution. - Do not call out expected, harmless `systemctl reset-failed ... unit not loaded` output in routine run updates; mention it only if it blocks startup or matters for debugging. - Treat `docs/automation/examples.md` as reference-only, not default operator intent. - Put reusable workflow rules in `guide.md` files. diff --git a/atvm/docs/automation/atvm-prep-reference.md b/atvm/docs/automation/atvm-prep-reference.md index c7b4ced..c5973f1 100644 --- a/atvm/docs/automation/atvm-prep-reference.md +++ b/atvm/docs/automation/atvm-prep-reference.md @@ -40,6 +40,22 @@ Notable arguments: - `-vp` / `--vcenter_password` - `-e` / `--esx_host_ip`: defaults to `192.168.1.165` +## Workspace Shorthand Mapping +For requests in this workspace, operator shorthand may be expanded as follows: + +1. Datastore/LUN shorthand for `-n` +- `Gold` -> `AutomatedTest-VMBootImg-Gold` +- `Gold2` -> `AutomatedTest-VMBootImg-Gold-2` +- `ComputeMigration` (or `compute migration`) -> `AutomatedTest-VMBootImgComputeMigration-Gold` + +2. Client/ESXi pairing (`-c` with `-e`) +- `CDS1-ESX165` <-> `192.168.1.165` +- `CDS1-ESX166` <-> `192.168.1.166` + +3. Inference rules +- If only one side of the pair is supplied (`-c` or `-e`), auto-fill the other side from this mapping. +- If both are supplied but conflict, stop and confirm before execution. + ## Operational Flow High-level behavior across modes: