Skip to content

Commit

Permalink
Updates destroy action
Browse files Browse the repository at this point in the history
Simplifies list-vms script via hardcoding

Tried to avoid hardcoding, but got too clever. We'll wait for when we
have tags for all VMs.
  • Loading branch information
Conor Schaefer committed Oct 17, 2018
1 parent bb8fd58 commit b1c5b50
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 9 deletions.
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,7 @@ remove-sd-svs: assert-dom0 ## Destroys SD SVS VM
remove-sd-gpg: assert-dom0 ## Destroys SD GPG keystore VM
@./scripts/destroy-vm sd-gpg

clean: assert-dom0 remove-sd-gpg remove-sd-svs remove-sd-journalist \
remove-sd-svs-disp remove-sd-whonix clean-salt ## Destroys all SD VMs
clean: assert-dom0 destroy-all clean-salt ## Destroys all SD VMs

test: assert-dom0 ## Runs all application tests (no integration tests yet)
python -m unittest discover tests
Expand Down
23 changes: 16 additions & 7 deletions scripts/list-vms
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,19 @@ set -e
set -u
set -o pipefail

# Search all top files for vm names declared as attributes
# assigned to dom0, strip out formatting.
grep dom0: dom0/*.top -A1 \
| grep -v dom0: \
| grep -v '^\-\-' \
| perl -lanE 'print $F[-1]' \
| sort
declare -a sd_workstation_vm_names=(
sd-gpg
sd-journalist
sd-journalist-template
sd-svs
sd-svs-template
sd-workstation-template
sd-whonix
sd-whonix-template
sd-svs-disp
sd-svs-disp-template
)

for vm in "${sd_workstation_vm_names[@]}" ; do
echo "$vm"
done

0 comments on commit b1c5b50

Please sign in to comment.