summaryrefslogtreecommitdiff
path: root/vmadm.md
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2021-11-10 10:34:05 +0200
committerLars Wirzenius <liw@liw.fi>2021-11-10 10:34:05 +0200
commit22cc382f9e9aa38f3adad18acd426bf0292bbf00 (patch)
tree96a392797b77e98d3ce2b26358b9c250db65e1e2 /vmadm.md
parent96c3606757750dadfcf31ec5ccd7787292da9273 (diff)
downloadvmadm-22cc382f9e9aa38f3adad18acd426bf0292bbf00.tar.gz
feat: check that virtual network names are syntactically correct
Sponsored-by: author
Diffstat (limited to 'vmadm.md')
-rw-r--r--vmadm.md60
1 files changed, 60 insertions, 0 deletions
diff --git a/vmadm.md b/vmadm.md
index 6d0491a..85df349 100644
--- a/vmadm.md
+++ b/vmadm.md
@@ -346,6 +346,66 @@ foo:
- bridge=br1
~~~
+# Check that network name is OK
+
+vmadm must check that the virtual network name is OK. The scenarios
+in this chapter verify that for the configuration and spec files.
+
+## Check network name in config
+
+~~~scenario
+given an installed vmadm
+given a Debian 10 OpenStack cloud image
+given file .config/vmadm/config.yaml from bad-network-config.yaml
+given file ca_key
+given file .ssh/id_rsa from ssh_key
+given file .ssh/id_rsa.pub from ssh_key_pub
+given file .ssh/config from ssh_config
+given file .ssh/known_hosts from known_hosts
+when I try to run vmadm config
+then command fails
+then stderr contains ": br0"
+~~~
+
+~~~{#bad-network-config.yaml .file .yaml}
+image_directory: ~/images
+default_base_image: ~/base.qcow2
+default_image_gib: 5
+default_memory_mib: 2048
+default_cpus: 1
+default_generate_host_certificate: true
+default_autostart: true
+ca_key: ~/ca_key
+authorized_keys:
+ - ~/.ssh/id_rsa.pub
+default_networks:
+- br0
+~~~
+
+## Check network name in spec
+
+~~~scenario
+given an installed vmadm
+given a Debian 10 OpenStack cloud image
+given file .config/vmadm/config.yaml from config.yaml
+given file ca_key
+given file .ssh/id_rsa from ssh_key
+given file .ssh/id_rsa.pub from ssh_key_pub
+given file .ssh/config from ssh_config
+given file .ssh/known_hosts from known_hosts
+given file bad-network-spec.yaml
+when I try to run vmadm spec bad-network-spec.yaml
+then command fails
+then stderr contains ": br0"
+~~~
+
+~~~{#bad-network-spec.yaml .file .yaml}
+foo:
+ networks:
+ - br0
+~~~
+
+
# Colophon
This is a document meant to be processed with [Subplot][] into an HTML