summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2021-10-06 17:14:30 +0000
committerLars Wirzenius <liw@liw.fi>2021-10-06 17:14:30 +0000
commit4a31da1aea3305d8a452d87caf56ef48ef3122b0 (patch)
tree26d620c67f5b94d90ff40c4fdc58aedd94155a57
parent99d12b466852a72bce4f7d21bb0773bde583d92b (diff)
parent6323015d114553cc59a3db1292c3b5283db57f96 (diff)
downloadvmadm-4a31da1aea3305d8a452d87caf56ef48ef3122b0.tar.gz
Merge branch 'fix' into 'main'
fix things so tests pass See merge request larswirzenius/vmadm!45
-rw-r--r--subplot/vmadm.yaml42
-rw-r--r--vmadm.md34
2 files changed, 48 insertions, 28 deletions
diff --git a/subplot/vmadm.yaml b/subplot/vmadm.yaml
index c6c5ad1..4c64a9b 100644
--- a/subplot/vmadm.yaml
+++ b/subplot/vmadm.yaml
@@ -1,30 +1,50 @@
- given: "an installed vmadm"
- function: install_vmadm
+ impl:
+ python:
+ function: install_vmadm
- given: "a Debian 10 OpenStack cloud image"
- function: ensure_base_image
+ impl:
+ python:
+ function: ensure_base_image
- when: "I invoke vmadm cloud-init --config {config} {filename} {dirname}"
- function: invoke_cloud_init
+ impl:
+ python:
+ function: invoke_cloud_init
- when: "I invoke vmadm new --config {config} {filename}"
- function: create_vm
- cleanup: delete_vm
+ impl:
+ python:
+ function: create_vm
+ cleanup: delete_vm
- when: "I invoke vmadm delete --config {config} {filename}"
- function: delete_vm
+ impl:
+ python:
+ function: delete_vm
- when: "I invoke vmadm shutdown --config {config} {filename}"
- function: shutdown_vm
+ impl:
+ python:
+ function: shutdown_vm
- when: "I invoke vmadm start --config {config} {filename}"
- function: start_vm
+ impl:
+ python:
+ function: start_vm
- when: "I invoke ssh -F {config} {target} {args:text}"
- function: run_hostname_over_ssh
+ impl:
+ python:
+ function: run_hostname_over_ssh
- then: "directories {actual} and {expected} are identical"
- function: directories_match
+ impl:
+ python:
+ function: directories_match
- then: "stdout, as JSON, matches file {filename} with tilde expansion"
- function: stdout_json_matches
+ impl:
+ python:
+ function: stdout_json_matches
diff --git a/vmadm.md b/vmadm.md
index 77978b0..018950d 100644
--- a/vmadm.md
+++ b/vmadm.md
@@ -1,3 +1,19 @@
+---
+title: "vmadm &ndash; virtual machine administration"
+author: "Lars Wirzenius"
+template: python
+bindings:
+ - subplot/vmadm.yaml
+ - lib/files.yaml
+ - lib/runcmd.yaml
+functions:
+ - subplot/vmadm.py
+ - lib/files.py
+ - lib/runcmd.py
+classes:
+- json
+...
+
# Data files for scenarios
This section has some data files used by scenarios.
@@ -153,7 +169,7 @@ then directories actual/init-test and expected/init-test are identical
~~~{#init.yaml .file .yaml}
init-test:
ssh_key_files:
- - .ssh/id_rsa.pub
+ - .ssh/id_rsa.pub
rsa_host_key: rsa-private
rsa_host_cert: rsa-certificate
dsa_host_key: dsa-private
@@ -334,19 +350,3 @@ foo:
This is a document meant to be processed with [Subplot][] into an HTML
document, a PDF document, and an executable program.
-
----
-title: "vmadm &ndash; virtual machine administration"
-author: "Lars Wirzenius"
-template: python
-bindings:
- - subplot/vmadm.yaml
- - lib/files.yaml
- - lib/runcmd.yaml
-functions:
- - subplot/vmadm.py
- - lib/files.py
- - lib/runcmd.py
-classes:
-- json
-...