From 77a7d5a0fec242b929f62295a1b7d8e7700bfc35 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Sun, 25 Jul 2021 09:54:20 +0300 Subject: test: verify that "vmadm config" works Sponsored-by: author --- vmadm.md | 40 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 36 insertions(+), 4 deletions(-) (limited to 'vmadm.md') diff --git a/vmadm.md b/vmadm.md index 2d97876..34ba73f 100644 --- a/vmadm.md +++ b/vmadm.md @@ -55,6 +55,22 @@ authorized_keys: - ~/.ssh/id_rsa.pub ~~~ +~~~{#fullconfig.json .file .json} +{ + "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" + ] +} +~~~ + ~~~{#ssh_key_pub .file} ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQChZ6mVuGLBpW7SarFU/Tu6TemquNxatbMUZuTk8RqVtbkvTKeWFZ5h5tntWPHgST8ykYFaIrr8eYuKQkKdBxHW7H8kejTNwRu/rDbRYX5wxTn4jw4RVopGTpxMlGrWeu5CkWPoLAhQtIzzUAnrDGp9sqG6P1G4ohI61wZMFQta9R2uNxXnnes+e2r4Y78GxmlQH/o0ouI8fBnsxRK0IoSfFs2LutO6wjyzR59FdC9TT7wufd5kXMRzxsmPGeXzNcaqvHGxBvRucGFclCkqSRwk3GNEpXZQhlCIoTIoRu0IPAp/430tlx9zJMhhwDlZsOOXRrFYpdWVMSTAAKECLSYx liw@exolobe1 ~~~ @@ -202,6 +218,20 @@ when I invoke vmadm delete --config config.yaml smoke.yaml +# Dump config + +This scenario verifies that vmadm can show its actual configuration. + +~~~scenario +given an installed vmadm +given a Debian 10 OpenStack cloud image +given file .config/vmadm/config.yaml from config.yaml +given file fullconfig.json +when I run vmadm config +then stdout, as JSON, matches file fullconfig.json with tilde expansion +~~~ + + # Colophon This is a document meant to be processed with [Subplot][] into an HTML @@ -213,10 +243,12 @@ author: "Lars Wirzenius" template: python bindings: - subplot/vmadm.yaml - - subplot/vendored/files.yaml - - subplot/vendored/runcmd.yaml + - lib/files.yaml + - lib/runcmd.yaml functions: - subplot/vmadm.py - - subplot/vendored/files.py - - subplot/vendored/runcmd.py + - lib/files.py + - lib/runcmd.py +classes: +- json ... -- cgit v1.2.1