Skip to content

Commit

Permalink
New template Linux: qm config 1 (#2005)
Browse files Browse the repository at this point in the history
  • Loading branch information
evilmonkey19 authored Feb 11, 2025
1 parent ddec06a commit c5477d9
Show file tree
Hide file tree
Showing 4 changed files with 131 additions and 0 deletions.
1 change: 1 addition & 0 deletions ntc_templates/templates/index
Original file line number Diff line number Diff line change
Expand Up @@ -750,6 +750,7 @@ linux_ip_address_show.textfsm, .*, linux, ip a[[ddress]] [[show]]
linux_ip_route_show.textfsm, .*, linux, ip r[[oute]] [[show]]
linux_ip_link_show.textfsm, .*, linux, ip l[[ink]] [[show]]
linux_ip_vrf_show.textfsm, .*, linux, ip v[[rf]] [[show]]
linux_qm_config_1.textfsm, .*, linux, qm c[[onfig]] \d+
linux_arp_-a.textfsm, .*, linux, arp -a

mikrotik_routeros_routing_ospf_neighbor_print_terse_without-paging.textfsm, .*, mikrotik_routeros, [[/]]r[[outing]] o[[spf]] nei[[ghbor]] p[[rint]] t[[erse]] wi[[thout-paging]]
Expand Down
77 changes: 77 additions & 0 deletions ntc_templates/templates/linux_qm_config_1.textfsm
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
Value AGENT (\S+)
Value BALLOON (\S+)
Value BOOT (\S+)
Value CORES (\S+)
Value CPU (\S+)
Value CPU_LIMIT (\S+)
Value DESCRIPTION (\S+|\S.+\S)
Value AUDIO0 (\S+|\S.+\S)
Value IDE0 (\S+)
Value IDE1 (\S+)
Value IDE2 (\S+)
Value KEYBOARD (\S+)
Value LOCK (\S+)
Value MACHINE (\S+)
Value KVM (\S+)
Value MEMORY (\S+)
Value META (\S+)
Value NAME (\S+)
Value NET0 (\S+)
Value NET1 (\S+)
Value NET2 (\S+)
Value NET3 (\S+)
Value NUMA (\S+)
Value ONBOOT (\S+)
Value OSTYPE (\S+)
Value PARENT (\S+)
Value SCSI0 (\S+)
Value SCSI1 (\S+)
Value SERIAL0 (\S+)
Value SCSIHW (\S+)
Value SATA0 (\S+)
Value SATA1 (\S+)
Value SMBIOS1 (\S+)
Value SOCKETS (\S+)
Value VIRTIO0 (\S+)
Value VMGENID (\S+)
Value VGA (\S+)

Start
^\s*agent:\s*${AGENT}\s*$$
^\s*balloon:\s*${BALLOON}\s*$$
^\s*boot(?:disk)?:\s*${BOOT}\s*$$
^\s*cores:\s*${CORES}\s*$$
^\s*cpu:\s*${CPU}\s*$$
^\s*cpulimit:\s*${CPU_LIMIT}\s*$$
^\s*description:\s*${DESCRIPTION}\s*$$
^\s*audio0:\s*${AUDIO0}\s*$$
^\s*ide0:\s*${IDE0}\s*$$
^\s*ide1:\s*${IDE1}\s*$$
^\s*ide2:\s*${IDE2}\s*$$
^\s*keyboard:\s*${KEYBOARD}\s*$$
^\s*lock:\s*${LOCK}\s*$$
^\s*machine:\s*${MACHINE}\s*$$
^\s*kvm:\s*${KVM}\s*$$
^\s*memory:\s*${MEMORY}\s*$$
^\s*meta:\s*${META}\s*$$
^\s*name:\s*${NAME}\s*$$
^\s*net0:\s*${NET0}\s*$$
^\s*net1:\s*${NET1}\s*$$
^\s*net2:\s*${NET2}\s*$$
^\s*net3:\s*${NET3}\s*$$
^\s*numa:\s*${NUMA}\s*$$
^\s*onboot:\s*${ONBOOT}\s*$$
^\s*ostype:\s*${OSTYPE}\s*$$
^\s*parent:\s*${PARENT}\s*$$
^\s*sata0:\s*${SATA0}\s*$$
^\s*sata1:\s*${SATA1}\s*$$
^\s*scsi0:\s*${SCSI0}\s*$$
^\s*scsi1:\s*${SCSI1}\s*$$
^\s*serial0:\s*${SERIAL0}\s*$$
^\s*scsihw:\s*${SCSIHW}\s*$$
^\s*smbios1:\s*${SMBIOS1}\s*$$
^\s*sockets:\s*${SOCKETS}\s*$$
^\s*vga:\s*${VGA}\s*$$
^\s*virtio0:\s*${VIRTIO0}\s*$$
^\s*vmgenid:\s*${VMGENID}\s*$$
^. -> Error
14 changes: 14 additions & 0 deletions tests/linux/qm_config_1/linux_qm_config_1.raw
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

bootdisk: ide0
cores: 2
cpulimit: 1
ide0: local:111/vm-111-disk-0.qcow2,size=10G
ide2: local:iso/ubuntu-24.04-live-server-amd64.iso,media=cdrom
memory: 1111
name: Super-Linux-Proxmox
net0: e1000=AA:AA:AA:AA:AA:AA,bridge=vmbr0
numa: 0
onboot: 1
ostype: other
smbios1: uuid=00a0a000-0aa0-0a00-a0aa-0aa0a0000a00
sockets: 1
39 changes: 39 additions & 0 deletions tests/linux/qm_config_1/linux_qm_config_1.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
parsed_sample:
- agent: ""
audio0: ""
balloon: ""
boot: "ide0"
cores: "2"
cpu: ""
cpu_limit: "1"
description: ""
ide0: "local:111/vm-111-disk-0.qcow2,size=10G"
ide1: ""
ide2: "local:iso/ubuntu-24.04-live-server-amd64.iso,media=cdrom"
keyboard: ""
kvm: ""
lock: ""
machine: ""
memory: "1111"
meta: ""
name: "Super-Linux-Proxmox"
net0: "e1000=AA:AA:AA:AA:AA:AA,bridge=vmbr0"
net1: ""
net2: ""
net3: ""
numa: "0"
onboot: "1"
ostype: "other"
parent: ""
sata0: ""
sata1: ""
scsi0: ""
scsi1: ""
scsihw: ""
serial0: ""
smbios1: "uuid=00a0a000-0aa0-0a00-a0aa-0aa0a0000a00"
sockets: "1"
vga: ""
virtio0: ""
vmgenid: ""

0 comments on commit c5477d9

Please sign in to comment.