From 6a62e0ed6fd2d74ae2fc42cd628e53ff68af03cb Mon Sep 17 00:00:00 2001 From: hgichon Date: Wed, 13 Oct 2021 17:10:26 +0900 Subject: [PATCH 1/4] GiantVM Startup Script --- scripts/load_cluster.sh | 110 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 scripts/load_cluster.sh diff --git a/scripts/load_cluster.sh b/scripts/load_cluster.sh new file mode 100644 index 0000000..80ba6da --- /dev/null +++ b/scripts/load_cluster.sh @@ -0,0 +1,110 @@ +#!/bin/bash + +####### Constant Setting ###### + +GVM_CMD="/root/ETRI/build/x86_64-softmmu/qemu-system-x86_64 " +IP_LIST=(100.0.0.100 100.0.0.101) [50/347] +IMG_PATH=/root/image/guest +#NUMA_CMD="taskset -c" +NUMA_CMD="numactl -C" + +# OS & DISK Image + +VM_IMAGE=$IMG_PATH/ubuntu-server2.img +DISK_IMG=/mnt/giant-vol/test.img +#DISK_IMG=/dev/centos00/home +KERNEL=$IMG_PATH/bzImage.mod +INITRD=$IMG_PATH/ramdisk.img.mod + +####### Constant End ###### + + +NODE_CNT=$1 +NODE_VCPU=$2 +MEM_SIZE=$3 +CMD_MODE=$4 + +if [ "$NODE_CNT" == "" ] || [ "$NODE_VCPU" == "" ] || \ + [ "$MEM_SIZE" == "" ]; then + echo + echo "usage: $0 {NODE_CNT} {NODE_VCPU} {MEM_SIZE} [CMD_MODE]" + echo + echo " NODE_CNT : total giant host count" + echo " NODE_VCPU : local cpu count" + echo " MEM_SIZE : local memory size" + echo " CMD_MODE : kill | start | status" + echo + echo " * HOST LIST : ${IP_LIST[*]}" + echo " * GVM IMAGE : $VM_IMAGE" + echo " * DISK IMG : $DISK_IMG" + echo " * KERNEL : $KERNEL" + echo " * INITRD : $INITRD" + + exit 1 +fi + +# Memory & CPU + +NUMA_RAM=$MEM_SIZE +CPU_CNT=$((NODE_VCPU * NODE_CNT)) +MEM_SIZE=$((NUMA_RAM * NODE_CNT * 1024)) + +# GiantVM Command Setting + +if [ ! -z $KERNEL ];then + COMMAND+="-kernel ${KERNEL} " + COMMAND+="-initrd ${INITRD} " + COMMAND+="-append \"text console=ttyS0 root=/dev/sda1 nokaslr transparent_hugepage=never \" " +fi + + +COMMAND+="--nographic --enable-kvm " +#COMMAND+="-hda ${VM_IMAGE} -hdb ${DISK_IMG} " +COMMAND+="-hda ${VM_IMAGE} -drive file=${DISK_IMG},cache=none,index=1 " +COMMAND+="-cpu host -machine kernel-irqchip=off " +COMMAND+="-smp ${CPU_CNT} -m ${MEM_SIZE} -serial mon:stdio " +COMMAND+="-monitor telnet:127.0.0.1:1234,server,nowait -vnc :0 " +COMMAND+="-vcpu pin-all=on " + +for id in $(seq 0 $NODE_CNT) +do + [ $id = $NODE_CNT ] && break + + TMP=$(($id * $NODE_VCPU))- + TMP+=$((($id+1) * $NODE_VCPU -1)) + COMMAND+="-object memory-backend-ram,size=${NUMA_RAM}G,id=ram${id} " + COMMAND+="-numa node,nodeid=${id},cpus=${TMP},memdev=ram${id} " +done + +for id in $(seq 0 $NODE_CNT) +do + echo + + if [ $id = $NODE_CNT ];then + exit + fi + + if [ ! -z $CMD_MODE ] && [ $CMD_MODE == "stop" ];then + echo "Stopping GVM-Qemu ${IP_LIST[$id]} ..." + ssh ${IP_LIST[$id]} "killall -9 $GVM_CMD" + continue + fi + if [ ! -z $CMD_MODE ] && [ $CMD_MODE == "status" ];then + echo "Status GVM-Qemu ${IP_LIST[$id]} ..." + ssh ${IP_LIST[$id]} "ps -ef | grep $GVM_CMD | grep -v numactl | grep -v grep" + ps -ef | grep qemu | grep -v grep + netstat -nap | grep 1234 + continue + fi + + EXTRA_CMD="-local-cpu ${NODE_VCPU},start=$((id * NODE_VCPU)),iplist=\"${IP_LIST[*]}\" " + echo "GiantVM-HOST($id) on ${IP_LIST[$id]} : $NUMA_CMD 0-$((NODE_VCPU -1)) $GVM_CMD $COMMAND $EXTRA_CMD" + + if [ ! -z $CMD_MODE ] && [ $CMD_MODE == "start" ];then + + echo "Start logging ... $id-${IP_LIST[$id]}" + ssh ${IP_LIST[$id]} "$NUMA_CMD 0-$((NODE_VCPU -1)) $GVM_CMD $COMMAND $EXTRA_CMD" \ + > $id-${IP_LIST[$id]}.log 2>&1 & + sleep 3 + fi +done From 7e34f016d10539534700988fa853a7ce169745b9 Mon Sep 17 00:00:00 2001 From: hgichon Date: Sun, 23 Oct 2022 15:49:41 +0900 Subject: [PATCH 2/4] update 4node giantvm management code --- scripts/load_cluster.sh | 319 +++++++++++++++++++++++++++++----------- 1 file changed, 236 insertions(+), 83 deletions(-) diff --git a/scripts/load_cluster.sh b/scripts/load_cluster.sh index 80ba6da..b9701ec 100644 --- a/scripts/load_cluster.sh +++ b/scripts/load_cluster.sh @@ -1,70 +1,226 @@ -#!/bin/bash - -####### Constant Setting ###### - -GVM_CMD="/root/ETRI/build/x86_64-softmmu/qemu-system-x86_64 " -IP_LIST=(100.0.0.100 100.0.0.101) [50/347] -IMG_PATH=/root/image/guest -#NUMA_CMD="taskset -c" -NUMA_CMD="numactl -C" - -# OS & DISK Image - -VM_IMAGE=$IMG_PATH/ubuntu-server2.img -DISK_IMG=/mnt/giant-vol/test.img -#DISK_IMG=/dev/centos00/home -KERNEL=$IMG_PATH/bzImage.mod -INITRD=$IMG_PATH/ramdisk.img.mod - -####### Constant End ###### - - -NODE_CNT=$1 -NODE_VCPU=$2 -MEM_SIZE=$3 -CMD_MODE=$4 - -if [ "$NODE_CNT" == "" ] || [ "$NODE_VCPU" == "" ] || \ - [ "$MEM_SIZE" == "" ]; then - echo - echo "usage: $0 {NODE_CNT} {NODE_VCPU} {MEM_SIZE} [CMD_MODE]" - echo - echo " NODE_CNT : total giant host count" - echo " NODE_VCPU : local cpu count" - echo " MEM_SIZE : local memory size" - echo " CMD_MODE : kill | start | status" - echo - echo " * HOST LIST : ${IP_LIST[*]}" - echo " * GVM IMAGE : $VM_IMAGE" - echo " * DISK IMG : $DISK_IMG" - echo " * KERNEL : $KERNEL" - echo " * INITRD : $INITRD" - - exit 1 -fi - -# Memory & CPU - -NUMA_RAM=$MEM_SIZE -CPU_CNT=$((NODE_VCPU * NODE_CNT)) -MEM_SIZE=$((NUMA_RAM * NODE_CNT * 1024)) - -# GiantVM Command Setting - -if [ ! -z $KERNEL ];then - COMMAND+="-kernel ${KERNEL} " - COMMAND+="-initrd ${INITRD} " - COMMAND+="-append \"text console=ttyS0 root=/dev/sda1 nokaslr transparent_hugepage=never \" " +#!/bin/bash + +####### Constant Setting ###### + +NUMA_CMD="numactl -C" +GVM_CMD="/root/GiantVM/qemu-build/x86_64-softmmu/qemu-system-x86_64 " +IMG_PATH=/root/GiantVM/guest +SHARE_PATH=/mnt/private/GVM/ +mkdir -p $SHARE_PATH + +# OS & DISK Image + +VM_IMAGE=$IMG_PATH/os2.qcow2 +DISK_IMAGE=$IMG_PATH/disk.qcow2 +KERNEL=$IMG_PATH/bzImage.mod +INITRD=$IMG_PATH/ramdisk.img.mod + +####### Constant End ###### + +CMD=$1 + +function help () +{ + echo + echo "usage: $0 {set|delete|guest|info|list|start|stop|status|restart|force-stop|dry-run|ib_list}" + echo + echo " ex) $0 set vm_name {ib_ip,...} {cpu_cnt} {mem_size} {cluster_pool} {cluster_volume} {cluster_net}" + echo " ex) $0 delete vm_name" + echo " ex) $0 guest vm_name {usage | uptime | network}" + echo " ex) $0 info vm_name" + echo " ex) $0 list" + echo " ex) $0 start vm_name" + echo " ex) $0 stop vm_name" + echo " ex) $0 restart vm_name" + echo " ex) $0 status vm_name" + echo " ex) $0 force-stop vm_name" + echo " ex) $0 dry-run vm_name" + echo " ex) $0 ib_list {set|get} [ib_ip,...]" + exit 1 +} + +function check_vm () +{ + VM_NAME=$1 + if [ ! -f "$SHARE_PATH/$VM_NAME" ]; then + echo "Can't found VM_NAME : $VM_NAME" + exit 1 + fi +} + +function get_vnc_num () +{ + VNC_LIST=() + + for vnc_num in `cd $SHARE_PATH && ls | grep -v ib_list | xargs cat | cut -d" " -f7` + do +# echo $vnc_num + VNC_LIST+=($vnc_num) + done + +# for value in "${VNC_LIST[@]}" +# do +# echo $value +# done + + + IFS=$'\n' sorted=($(sort -r <<<"${VNC_LIST[*]}")) + local count=0 + for vnc_hit in "${VNC_LIST[@]}" + do + if [ "$vnc_hit" != "$count" ]; then + echo $count + return 0 + else + count=`expr $count + 1` + fi + done + echo $count +} + +if [ "$CMD" == "set" ]; then + [ $# -lt 7 ] && help + VM_NAME=$2 + VM_IP=$3 + VM_CPU=$4 + VM_MEM=$5 + VM_POOL=$6 + VM_VOL=$7 + VM_NET=$8 + VM_VNC=$(get_vnc_num) + + echo "$VM_IP $VM_CPU $VM_MEM $VM_POOL $VM_VOL $VM_NET $VM_VNC" > $SHARE_PATH/$VM_NAME + + if [ $? -ne 0 ]; then + echo "VM config error : $VM_NAME" && exit 1 + else + exit 0 + fi +elif [ "$CMD" == "delete" ]; then + VM_NAME=$2 + check_vm $VM_NAME + rm -f $SHARE_PATH/$VM_NAME + [ $? -ne 0 ] && echo "VM delete error : $VM_NAME" && exit 1 + exit 0 +elif [ "$CMD" == "guest" ]; then + VM_NAME=$2 + check_vm $VM_NAME + + vnc_num=$(cut -d" " -f7 $SHARE_PATH/$VM_NAME) + [ $? -ne 0 ] && echo "VM guest error : $VM_NAME" && exit 1 + + ssh_port=`expr 20000 + $vnc_num` + ssh_status=$(netstat -nap | grep $ssh_port | grep sshd) + [ "$ssh_status" == "" ] && echo "VM guest error : $VM_NAME" && exit 1 + + GUEST_CMD=$3 + if [ "$GUEST_CMD" == "usage" ];then + echo not implemented yet + elif [ "$GUEST_CMD" == "uptime" ];then + uptime_str=$(ssh -p $ssh_port localhost uptime) + + if ( echo $uptime_str | grep day >/dev/null ); then + uptime_ret=$(echo $uptime_str | cut -d" " -f3 | cut -d"," -f1) + echo 0-${uptime_ret}:00 + elif ( echo $uptime_str | grep min >/dev/null); then + uptime_ret=$(echo $uptime_str | cut -d" " -f3 | cut -d"," -f1) + echo 0-00:${uptime_ret}:00 + else + uptime_ret=$(echo $uptime_str | cut -d" " -f3,6| cut -d"," -f1) + echo ${uptime_ret/ /-}:00 + fi + elif [ "$GUEST_CMD" == "network" ];then + network_str=$(ssh -p $ssh_port localhost "ip addr | grep 'inet ' | grep -v 127 | sed -e 's/^*//g'") + echo $(echo $network_str | cut -d' ' -f2) + else + help + fi + + exit 0 +elif [ "$CMD" == "info" ]; then + VM_NAME=$2 + check_vm $VM_NAME + cat $SHARE_PATH/$VM_NAME + [ $? -ne 0 ] && echo "VM info error : $VM_NAME" && exit 1 + exit 0 +elif [ "$CMD" == "list" ]; then + ls $SHARE_PATH/ | grep -v ib_list + [ $? -ne 0 ] && echo "VM list error" && exit 1 + exit 0 +elif [ "$CMD" == "start" ] || [ "$CMD" == "stop" ] || [ "$CMD" == "force-stop" ] \ + || [ "$CMD" == "status" ] || [ "$CMD" == "restart" ] || [ "$CMD" == "dry-run" ]; then + VM_NAME=$2 + check_vm $VM_NAME + IFS=" " read -ra VM_STR <<< `cat $SHARE_PATH/$VM_NAME` + VM_IP=${VM_STR[0]} + VM_CPU=${VM_STR[1]} + VM_MEM=${VM_STR[2]} + VM_POOL=${VM_STR[3]} + VM_VOL=${VM_STR[4]} + VM_NET=${VM_STR[5]} + VM_VNC=${VM_STR[6]} + +elif [ "$CMD" == "stop" ]; then + VM_NAME=$2 + check_vm $VM_NAME +elif [ "$CMD" == "status" ]; then + VM_NAME=$2 + check_vm $VM_NAME +elif [ "$CMD" == "restart" ]; then + VM_NAME=$2 + check_vm $VM_NAME +elif [ "$CMD" == "force-stop" ]; then + VM_NAME=$2 + check_vm $VM_NAME +elif [ "$CMD" == "dry-run" ]; then + VM_NAME=$2 + check_vm $VM_NAME +elif [ "$CMD" == "ib_list" ]; then + SUB_CMD=$2 + SUB_IPLIST=$3 + if [ "$SUB_CMD" == "set" ];then + echo $SUB_IPLIST > $SHARE_PATH/ib_list + elif [ "$SUB_CMD" == "get" ];then + cat $SHARE_PATH/ib_list + else + help + fi + exit 0 +else + help fi +####### Start / Stop / Status ... ###### + +IP_LIST=(`echo $VM_IP | tr "," " "`) +NODE_CNT=${#IP_LIST[@]} +NODE_VCPU=$VM_CPU +MEM_SIZE=$VM_MEM +CMD_MODE=$CMD + +# Memory & CPU +NUMA_RAM=$MEM_SIZE +CPU_CNT=$((NODE_VCPU * NODE_CNT)) +MEM_SIZE=$((NUMA_RAM * NODE_CNT * 1024)) + +# GiantVM Command Setting -COMMAND+="--nographic --enable-kvm " -#COMMAND+="-hda ${VM_IMAGE} -hdb ${DISK_IMG} " -COMMAND+="-hda ${VM_IMAGE} -drive file=${DISK_IMG},cache=none,index=1 " +if [ ! -z $KERNEL ];then + COMMAND+="-kernel ${KERNEL} " + COMMAND+="-initrd ${INITRD} " + COMMAND+="-append \"text console=ttyS0 root=/dev/sda1 nokaslr transparent_hugepage=never boot_delay=$VM_VNC \" " +fi + +COMMAND+="--nographic --enable-kvm -name $VM_NAME " +COMMAND+="-hda ${VM_IMAGE} -drive file=${DISK_IMAGE},cache=none,index=1 " COMMAND+="-cpu host -machine kernel-irqchip=off " COMMAND+="-smp ${CPU_CNT} -m ${MEM_SIZE} -serial mon:stdio " -COMMAND+="-monitor telnet:127.0.0.1:1234,server,nowait -vnc :0 " COMMAND+="-vcpu pin-all=on " +COMMAND+="-net nic -net tap,ifname=tap0 " +# QMP ==> virtio conflict +#COMMAND+="-chardev socket,path=/tmp/qga.sock,server=on,wait=off,id=qga0 " +#COMMAND+="-device virtio-serial " +#COMMAND+="-device virtserialport,chardev=qga0,name=org.qemu.guest_agent.0 " for id in $(seq 0 $NODE_CNT) do @@ -78,33 +234,30 @@ done for id in $(seq 0 $NODE_CNT) do - echo - - if [ $id = $NODE_CNT ];then - exit - fi - - if [ ! -z $CMD_MODE ] && [ $CMD_MODE == "stop" ];then - echo "Stopping GVM-Qemu ${IP_LIST[$id]} ..." - ssh ${IP_LIST[$id]} "killall -9 $GVM_CMD" - continue - fi - if [ ! -z $CMD_MODE ] && [ $CMD_MODE == "status" ];then - echo "Status GVM-Qemu ${IP_LIST[$id]} ..." - ssh ${IP_LIST[$id]} "ps -ef | grep $GVM_CMD | grep -v numactl | grep -v grep" - ps -ef | grep qemu | grep -v grep - netstat -nap | grep 1234 - continue - fi + [ $id = $NODE_CNT ] && exit EXTRA_CMD="-local-cpu ${NODE_VCPU},start=$((id * NODE_VCPU)),iplist=\"${IP_LIST[*]}\" " - echo "GiantVM-HOST($id) on ${IP_LIST[$id]} : $NUMA_CMD 0-$((NODE_VCPU -1)) $GVM_CMD $COMMAND $EXTRA_CMD" - - if [ ! -z $CMD_MODE ] && [ $CMD_MODE == "start" ];then +# EXTRA_CMD+="-monitor telnet:127.0.0.1:123${id},server,nowait " + [ $id = 0 ] && EXTRA_CMD+="-vnc :$VM_VNC " + if [ $CMD_MODE == "start" ];then echo "Start logging ... $id-${IP_LIST[$id]}" ssh ${IP_LIST[$id]} "$NUMA_CMD 0-$((NODE_VCPU -1)) $GVM_CMD $COMMAND $EXTRA_CMD" \ - > $id-${IP_LIST[$id]}.log 2>&1 & + > $id-${IP_LIST[$id]}-$VM_NAME.log 2>&1 & sleep 3 + elif [ $CMD_MODE == "force-stop" ] || [ $CMD_MODE == "stop" ];then + echo "Stopping GVM-Qemu : $VM_NAME ${IP_LIST[$id]} ..." + ssh ${IP_LIST[$id]} "ps -ef | grep \"\-name $VM_NAME \" | grep -v numactl | grep -v grep | tr -s ' ' | cut -d ' ' -f 2 | xargs kill -9" + continue + elif [ $CMD_MODE == "status" ];then + echo "Status GVM-Qemu ${IP_LIST[$id]} ..." + ssh ${IP_LIST[$id]} "ps -ef | grep \"\-name $VM_NAME \" | grep -v numactl | grep -v grep" + ssh ${IP_LIST[$id]} "ps -ef | grep \"\[qemu\-system\-x86_64\]\"" + continue + elif [ $CMD_MODE == "dry-run" ];then + echo "GiantVM-HOST($id) on ${IP_LIST[$id]} : $NUMA_CMD 0-$((NODE_VCPU -1)) $GVM_CMD $COMMAND $EXTRA_CMD" + continue + else + help fi done From 744742d3286f421c356dd3df39788cbf6839d7e3 Mon Sep 17 00:00:00 2001 From: hgichon Date: Sun, 23 Oct 2022 15:59:14 +0900 Subject: [PATCH 3/4] virtualization REST API added --- .../virtualization/ivmclusternetworks.yaml | 16 ++++ scripts/virtualization/ivms.yaml | 34 +++++++ scripts/virtualization/ivms/{IvmID}.yaml | 39 ++++++++ scripts/virtualization/ivms/{IvmID}/boot.yaml | 21 +++++ .../virtualization/ivms/{IvmID}/comment.yaml | 46 ++++++++++ .../virtualization/ivms/{IvmID}/console.yaml | 39 ++++++++ .../virtualization/ivms/{IvmID}/general.yaml | 32 +++++++ .../virtualization/ivms/{IvmID}/hardware.yaml | 28 ++++++ .../{IvmID}/hardware/clusternetworks.yaml | 23 +++++ .../clusternetworks/{ClusterNetworkID}.yaml | 27 ++++++ .../ivms/{IvmID}/hardware/clustervolumes.yaml | 23 +++++ .../clustervolumes/{ClusterVolumeID}.yaml | 27 ++++++ .../ivms/{IvmID}/hardware/cpu.yaml | 21 +++++ .../ivms/{IvmID}/hardware/memory.yaml | 21 +++++ .../virtualization/ivms/{IvmID}/history.yaml | 23 +++++ .../virtualization/ivms/{IvmID}/ivhosts.yaml | 23 +++++ .../ivms/{IvmID}/ivhosts/{IVHostID}.yaml | 27 ++++++ .../{IvmID}/ivhosts/{IVHostID}/overview.yaml | 45 ++++++++++ .../virtualization/ivms/{IvmID}/overview.yaml | 49 ++++++++++ .../ivms/{IvmID}/powercontrol.yaml | 28 ++++++ scripts/virtualization/ivmtree.yaml | 26 ++++++ scripts/virtualization/verify/ivm/disk.yaml | 33 +++++++ scripts/virtualization/verify/ivm/name.yaml | 33 +++++++ scripts/virtualization/verify/vm/disk.yaml | 35 ++++++++ scripts/virtualization/verify/vm/name.yaml | 35 ++++++++ scripts/virtualization/vmhosts.yaml | 16 ++++ scripts/virtualization/vmhosts/{HostID}.yaml | 21 +++++ .../vmhosts/{HostID}/general.yaml | 28 ++++++ .../vmhosts/{HostID}/hardware.yaml | 28 ++++++ .../vmhosts/{HostID}/overview.yaml | 50 +++++++++++ .../vmhosts/{HostID}/software.yaml | 28 ++++++ .../vmhosts/{HostID}/virtualnetwork.yaml | 28 ++++++ .../virtualization/vmhosts/{HostID}/vms.yaml | 60 +++++++++++++ .../vmhosts/{HostID}/vms/{VMID}.yaml | 57 ++++++++++++ .../vmhosts/{HostID}/vms/{VMID}/boot.yaml | 58 ++++++++++++ .../vmhosts/{HostID}/vms/{VMID}/comment.yaml | 58 ++++++++++++ .../vmhosts/{HostID}/vms/{VMID}/console.yaml | 51 +++++++++++ .../vmhosts/{HostID}/vms/{VMID}/general.yaml | 38 ++++++++ .../vmhosts/{HostID}/vms/{VMID}/hardware.yaml | 38 ++++++++ .../{HostID}/vms/{VMID}/hardware/cdrom.yaml | 38 ++++++++ .../vms/{VMID}/hardware/cdrom/mount.yaml | 55 ++++++++++++ .../{HostID}/vms/{VMID}/hardware/cpu.yaml | 58 ++++++++++++ .../{HostID}/vms/{VMID}/hardware/disks.yaml | 71 +++++++++++++++ .../vms/{VMID}/hardware/disks/{DiskID}.yaml | 89 +++++++++++++++++++ .../hardware/disks/{DiskID}/option.yaml | 70 +++++++++++++++ .../{HostID}/vms/{VMID}/hardware/memory.yaml | 58 ++++++++++++ .../vms/{VMID}/hardware/networks.yaml | 71 +++++++++++++++ .../{VMID}/hardware/networks/{NetworkID}.yaml | 74 +++++++++++++++ .../hardware/networks/{NetworkID}/device.yaml | 69 ++++++++++++++ .../hardware/networks/{NetworkID}/linkup.yaml | 60 +++++++++++++ .../vmhosts/{HostID}/vms/{VMID}/history.yaml | 29 ++++++ .../vmhosts/{HostID}/vms/{VMID}/overview.yaml | 56 ++++++++++++ .../{HostID}/vms/{VMID}/powercontrol.yaml | 34 +++++++ .../vmhosts/{HostID}/vmspowercontrol.yaml | 36 ++++++++ .../vmhosts/{HostID}/vmstatus.yaml | 28 ++++++ scripts/virtualization/vmisovols.yaml | 16 ++++ .../virtualization/vmisovols/{ISOvolID}.yaml | 21 +++++ .../vmisovols/{ISOvolID}/isos.yaml | 23 +++++ .../vmisovols/{ISOvolID}/isos/{ISOID}.yaml | 27 ++++++ scripts/virtualization/vmtree.yaml | 26 ++++++ scripts/virtualization/vmvols.yaml | 16 ++++ scripts/virtualization/vmvols/{VolID}.yaml | 21 +++++ .../virtualization/vmvols/{VolID}/disks.yaml | 29 ++++++ .../vmvols/{VolID}/disks/{VMdiskID}.yaml | 27 ++++++ 64 files changed, 2415 insertions(+) create mode 100644 scripts/virtualization/ivmclusternetworks.yaml create mode 100644 scripts/virtualization/ivms.yaml create mode 100644 scripts/virtualization/ivms/{IvmID}.yaml create mode 100644 scripts/virtualization/ivms/{IvmID}/boot.yaml create mode 100644 scripts/virtualization/ivms/{IvmID}/comment.yaml create mode 100644 scripts/virtualization/ivms/{IvmID}/console.yaml create mode 100644 scripts/virtualization/ivms/{IvmID}/general.yaml create mode 100644 scripts/virtualization/ivms/{IvmID}/hardware.yaml create mode 100644 scripts/virtualization/ivms/{IvmID}/hardware/clusternetworks.yaml create mode 100644 scripts/virtualization/ivms/{IvmID}/hardware/clusternetworks/{ClusterNetworkID}.yaml create mode 100644 scripts/virtualization/ivms/{IvmID}/hardware/clustervolumes.yaml create mode 100644 scripts/virtualization/ivms/{IvmID}/hardware/clustervolumes/{ClusterVolumeID}.yaml create mode 100644 scripts/virtualization/ivms/{IvmID}/hardware/cpu.yaml create mode 100644 scripts/virtualization/ivms/{IvmID}/hardware/memory.yaml create mode 100644 scripts/virtualization/ivms/{IvmID}/history.yaml create mode 100644 scripts/virtualization/ivms/{IvmID}/ivhosts.yaml create mode 100644 scripts/virtualization/ivms/{IvmID}/ivhosts/{IVHostID}.yaml create mode 100644 scripts/virtualization/ivms/{IvmID}/ivhosts/{IVHostID}/overview.yaml create mode 100644 scripts/virtualization/ivms/{IvmID}/overview.yaml create mode 100644 scripts/virtualization/ivms/{IvmID}/powercontrol.yaml create mode 100644 scripts/virtualization/ivmtree.yaml create mode 100644 scripts/virtualization/verify/ivm/disk.yaml create mode 100644 scripts/virtualization/verify/ivm/name.yaml create mode 100644 scripts/virtualization/verify/vm/disk.yaml create mode 100644 scripts/virtualization/verify/vm/name.yaml create mode 100644 scripts/virtualization/vmhosts.yaml create mode 100644 scripts/virtualization/vmhosts/{HostID}.yaml create mode 100644 scripts/virtualization/vmhosts/{HostID}/general.yaml create mode 100644 scripts/virtualization/vmhosts/{HostID}/hardware.yaml create mode 100644 scripts/virtualization/vmhosts/{HostID}/overview.yaml create mode 100644 scripts/virtualization/vmhosts/{HostID}/software.yaml create mode 100644 scripts/virtualization/vmhosts/{HostID}/virtualnetwork.yaml create mode 100644 scripts/virtualization/vmhosts/{HostID}/vms.yaml create mode 100644 scripts/virtualization/vmhosts/{HostID}/vms/{VMID}.yaml create mode 100644 scripts/virtualization/vmhosts/{HostID}/vms/{VMID}/boot.yaml create mode 100644 scripts/virtualization/vmhosts/{HostID}/vms/{VMID}/comment.yaml create mode 100644 scripts/virtualization/vmhosts/{HostID}/vms/{VMID}/console.yaml create mode 100644 scripts/virtualization/vmhosts/{HostID}/vms/{VMID}/general.yaml create mode 100644 scripts/virtualization/vmhosts/{HostID}/vms/{VMID}/hardware.yaml create mode 100644 scripts/virtualization/vmhosts/{HostID}/vms/{VMID}/hardware/cdrom.yaml create mode 100644 scripts/virtualization/vmhosts/{HostID}/vms/{VMID}/hardware/cdrom/mount.yaml create mode 100644 scripts/virtualization/vmhosts/{HostID}/vms/{VMID}/hardware/cpu.yaml create mode 100644 scripts/virtualization/vmhosts/{HostID}/vms/{VMID}/hardware/disks.yaml create mode 100644 scripts/virtualization/vmhosts/{HostID}/vms/{VMID}/hardware/disks/{DiskID}.yaml create mode 100644 scripts/virtualization/vmhosts/{HostID}/vms/{VMID}/hardware/disks/{DiskID}/option.yaml create mode 100644 scripts/virtualization/vmhosts/{HostID}/vms/{VMID}/hardware/memory.yaml create mode 100644 scripts/virtualization/vmhosts/{HostID}/vms/{VMID}/hardware/networks.yaml create mode 100644 scripts/virtualization/vmhosts/{HostID}/vms/{VMID}/hardware/networks/{NetworkID}.yaml create mode 100644 scripts/virtualization/vmhosts/{HostID}/vms/{VMID}/hardware/networks/{NetworkID}/device.yaml create mode 100644 scripts/virtualization/vmhosts/{HostID}/vms/{VMID}/hardware/networks/{NetworkID}/linkup.yaml create mode 100644 scripts/virtualization/vmhosts/{HostID}/vms/{VMID}/history.yaml create mode 100644 scripts/virtualization/vmhosts/{HostID}/vms/{VMID}/overview.yaml create mode 100644 scripts/virtualization/vmhosts/{HostID}/vms/{VMID}/powercontrol.yaml create mode 100644 scripts/virtualization/vmhosts/{HostID}/vmspowercontrol.yaml create mode 100644 scripts/virtualization/vmhosts/{HostID}/vmstatus.yaml create mode 100644 scripts/virtualization/vmisovols.yaml create mode 100644 scripts/virtualization/vmisovols/{ISOvolID}.yaml create mode 100644 scripts/virtualization/vmisovols/{ISOvolID}/isos.yaml create mode 100644 scripts/virtualization/vmisovols/{ISOvolID}/isos/{ISOID}.yaml create mode 100644 scripts/virtualization/vmtree.yaml create mode 100644 scripts/virtualization/vmvols.yaml create mode 100644 scripts/virtualization/vmvols/{VolID}.yaml create mode 100644 scripts/virtualization/vmvols/{VolID}/disks.yaml create mode 100644 scripts/virtualization/vmvols/{VolID}/disks/{VMdiskID}.yaml diff --git a/scripts/virtualization/ivmclusternetworks.yaml b/scripts/virtualization/ivmclusternetworks.yaml new file mode 100644 index 0000000..b6783ad --- /dev/null +++ b/scripts/virtualization/ivmclusternetworks.yaml @@ -0,0 +1,16 @@ + get: + x-mojo-to: 'Virtualization::Inverse::IVM#getIvmClusterNetwork' + description: '' + operationId: getIvmClusterNetwork + responses: + 200: + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/IvmClusterNetworks' + description: '' + summary: '' + tags: + - IVM_Machine \ No newline at end of file diff --git a/scripts/virtualization/ivms.yaml b/scripts/virtualization/ivms.yaml new file mode 100644 index 0000000..a47b850 --- /dev/null +++ b/scripts/virtualization/ivms.yaml @@ -0,0 +1,34 @@ + get: + summary: "" + description: "" + operationId: getIvmList + x-mojo-to: 'Virtualization::Inverse::IVM#getIvmBriefList' + responses: + 200: + description: "" + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/IvmInfoSummary' + tags: + - IVM_Machine + post: + summary: '' + description: '' + operationId: addIvm + x-mojo-to: Virtualization::Inverse::IVM#createIvm + requestBody: + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/IvmInfoAdd' + required: true + responses: + 200: + description: '' + content: {} + tags: + - IVM_Machine \ No newline at end of file diff --git a/scripts/virtualization/ivms/{IvmID}.yaml b/scripts/virtualization/ivms/{IvmID}.yaml new file mode 100644 index 0000000..0b965a5 --- /dev/null +++ b/scripts/virtualization/ivms/{IvmID}.yaml @@ -0,0 +1,39 @@ + get: + summary: "" + description: "" + operationId: getIvmInfo + x-mojo-to: 'Virtualization::Inverse::IVM#getIvmInfo' + parameters: + - name: IvmID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleIvmID' + responses: + 200: + description: "" + content: + application/json: + schema: + $ref: '#/components/schemas/IvmInfo' + tags: + - IVM_Machine + delete: + summary: '' + description: '' + operationId: delIvm + x-mojo-to: Virtualization::Inverse::IVM#removeIvm + parameters: + - description: '' + in: path + name: VMID + required: true + schema: + $ref: '#/components/schemas/RuleIvmID' + responses: + 200: + description: '' + content: {} + tags: + - IVM_Machine \ No newline at end of file diff --git a/scripts/virtualization/ivms/{IvmID}/boot.yaml b/scripts/virtualization/ivms/{IvmID}/boot.yaml new file mode 100644 index 0000000..250aa54 --- /dev/null +++ b/scripts/virtualization/ivms/{IvmID}/boot.yaml @@ -0,0 +1,21 @@ + get: + x-mojo-to: 'Virtualization::Inverse::IVM#getIvmBootOption' + summary: "" + description: "" + operationId: getIvmInfoBoot + parameters: + - name: IvmID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleIvmID' + responses: + 200: + description: "" + content: + application/json: + schema: + $ref: '#/components/schemas/IvmInfoBoot' + tags: + - IVM_Machine \ No newline at end of file diff --git a/scripts/virtualization/ivms/{IvmID}/comment.yaml b/scripts/virtualization/ivms/{IvmID}/comment.yaml new file mode 100644 index 0000000..e8cd67d --- /dev/null +++ b/scripts/virtualization/ivms/{IvmID}/comment.yaml @@ -0,0 +1,46 @@ + get: + x-mojo-to: 'Virtualization::Inverse::IVM#getIvmComment' + summary: "" + description: "" + operationId: getIvmInfoComment + parameters: + - name: IvmID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleIvmID' + responses: + 200: + description: "" + content: + application/json: + schema: + $ref: '#/components/schemas/IvmInfoComment' + tags: + - IVM_Machine + put: + x-mojo-to: 'Virtualization::Inverse::IVM#setIvmComment' + summary: "" + description: "" + operationId: updateIvmInfoComment + parameters: + - name: IvmID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleIvmID' + requestBody: + description: "" + content: + application/json: + schema: + $ref: '#/components/schemas/IvmInfoComment' + required: true + responses: + 200: + description: "" + content: {} + tags: + - IVM_Machine \ No newline at end of file diff --git a/scripts/virtualization/ivms/{IvmID}/console.yaml b/scripts/virtualization/ivms/{IvmID}/console.yaml new file mode 100644 index 0000000..2e71662 --- /dev/null +++ b/scripts/virtualization/ivms/{IvmID}/console.yaml @@ -0,0 +1,39 @@ + get: + x-mojo-to: 'Virtualization::Inverse::IVM#getIvmConsole' + summary: "" + description: "" + operationId: getIvmInfoConsole + parameters: + - name: IvmID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleIvmID' + responses: + 200: + description: "" + content: + application/json: + schema: + $ref: '#/components/schemas/IvmInfoConsole' + tags: + - IVM_Machine + delete: + x-mojo-to: 'Virtualization::Inverse::IVM#delIvmConsole' + summary: "" + description: "" + operationId: delIvmInfoConsole + parameters: + - name: IvmID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleIvmID' + responses: + 200: + description: "" + content: {} + tags: + - IVM_Machine \ No newline at end of file diff --git a/scripts/virtualization/ivms/{IvmID}/general.yaml b/scripts/virtualization/ivms/{IvmID}/general.yaml new file mode 100644 index 0000000..ad56a93 --- /dev/null +++ b/scripts/virtualization/ivms/{IvmID}/general.yaml @@ -0,0 +1,32 @@ + get: + x-mojo-to: 'Virtualization::Inverse::IVM#getIvmGeneral' + summary: "" + description: "" + operationId: getIvmInfoGeneral + parameters: + - name: IvmID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleIvmID' + responses: + 200: + description: "" + content: + application/json: + schema: + type: object + properties: + ID: + $ref: '#/components/schemas/RuleIvmID' + Name: + $ref: '#/components/schemas/RuleIvmName' + Hosts: + type: array + items: + $ref: '#/components/schemas/IVHostAbstract' + General: + $ref: '#/components/schemas/IvmInfoGeneral' + tags: + - IVM_Machine \ No newline at end of file diff --git a/scripts/virtualization/ivms/{IvmID}/hardware.yaml b/scripts/virtualization/ivms/{IvmID}/hardware.yaml new file mode 100644 index 0000000..8f0e7e5 --- /dev/null +++ b/scripts/virtualization/ivms/{IvmID}/hardware.yaml @@ -0,0 +1,28 @@ + get: + x-mojo-to: 'Virtualization::Inverse::IVM#getIvmHardware' + description: '' + operationId: getIvmInfoHardware + parameters: + - name: IvmID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleIvmID' + responses: + 200: + content: + application/json: + schema: + type: object + properties: + ID: + $ref: '#/components/schemas/RuleIvmID' + Name: + $ref: '#/components/schemas/RuleIvmName' + Hardware: + $ref: '#/components/schemas/IvmInfoHardware' + description: '' + summary: '' + tags: + - IVM_Machine \ No newline at end of file diff --git a/scripts/virtualization/ivms/{IvmID}/hardware/clusternetworks.yaml b/scripts/virtualization/ivms/{IvmID}/hardware/clusternetworks.yaml new file mode 100644 index 0000000..280d4d7 --- /dev/null +++ b/scripts/virtualization/ivms/{IvmID}/hardware/clusternetworks.yaml @@ -0,0 +1,23 @@ + get: + x-mojo-to: 'Virtualization::Inverse::IVM#getIvmHardwareClusterNetworks' + description: '' + operationId: getIvmInfoHardwareClusterNetwork + parameters: + - name: IvmID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleIvmID' + responses: + 200: + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/IvmInfoHardwareClusterNetwork' + description: '' + summary: '' + tags: + - IVM_Machine \ No newline at end of file diff --git a/scripts/virtualization/ivms/{IvmID}/hardware/clusternetworks/{ClusterNetworkID}.yaml b/scripts/virtualization/ivms/{IvmID}/hardware/clusternetworks/{ClusterNetworkID}.yaml new file mode 100644 index 0000000..5405478 --- /dev/null +++ b/scripts/virtualization/ivms/{IvmID}/hardware/clusternetworks/{ClusterNetworkID}.yaml @@ -0,0 +1,27 @@ + get: + x-mojo-to: 'Virtualization::Inverse::IVM#getIvmHardwareClusterNetworkInfo' + description: '' + operationId: getIvmInfoHardwareClusterNetworkInfo + parameters: + - name: IvmID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleIvmID' + - description: '' + in: path + name: ClusterNetworkID + required: true + schema: + $ref: '#/components/schemas/RuleIvmClusterNetworkID' + responses: + 200: + content: + application/json: + schema: + $ref: '#/components/schemas/IvmInfoHardwareClusterNetwork' + description: '' + summary: '' + tags: + - IVM_Machine \ No newline at end of file diff --git a/scripts/virtualization/ivms/{IvmID}/hardware/clustervolumes.yaml b/scripts/virtualization/ivms/{IvmID}/hardware/clustervolumes.yaml new file mode 100644 index 0000000..cd9ea87 --- /dev/null +++ b/scripts/virtualization/ivms/{IvmID}/hardware/clustervolumes.yaml @@ -0,0 +1,23 @@ + get: + x-mojo-to: 'Virtualization::Inverse::IVM#getIvmHardwareClusterVolumes' + description: '' + operationId: getIvmInfoHardwareClusterVolume + parameters: + - name: IvmID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleIvmID' + responses: + 200: + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/IvmInfoHardwareClusterVolume' + description: '' + summary: '' + tags: + - IVM_Machine \ No newline at end of file diff --git a/scripts/virtualization/ivms/{IvmID}/hardware/clustervolumes/{ClusterVolumeID}.yaml b/scripts/virtualization/ivms/{IvmID}/hardware/clustervolumes/{ClusterVolumeID}.yaml new file mode 100644 index 0000000..058684f --- /dev/null +++ b/scripts/virtualization/ivms/{IvmID}/hardware/clustervolumes/{ClusterVolumeID}.yaml @@ -0,0 +1,27 @@ + get: + x-mojo-to: 'Virtualization::Inverse::IVM#getIvmHardwareClusterVolumeInfo' + description: '' + operationId: getIvmInfoHardwareClusterVolumeInfo + parameters: + - name: IvmID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleIvmID' + - description: '' + in: path + name: ClusterVolumeID + required: true + schema: + $ref: '#/components/schemas/RuleIvmClusterVolumeID' + responses: + 200: + content: + application/json: + schema: + $ref: '#/components/schemas/IvmInfoHardwareClusterVolume' + description: '' + summary: '' + tags: + - IVM_Machine \ No newline at end of file diff --git a/scripts/virtualization/ivms/{IvmID}/hardware/cpu.yaml b/scripts/virtualization/ivms/{IvmID}/hardware/cpu.yaml new file mode 100644 index 0000000..207ce04 --- /dev/null +++ b/scripts/virtualization/ivms/{IvmID}/hardware/cpu.yaml @@ -0,0 +1,21 @@ + get: + x-mojo-to: 'Virtualization::Inverse::IVM#getIvmHardwareCPU' + description: '' + operationId: getIvmInfoHardwareCPU + parameters: + - name: IvmID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleIvmID' + responses: + 200: + content: + application/json: + schema: + $ref: '#/components/schemas/IvmInfoHardwareCPU' + description: '' + summary: '' + tags: + - IVM_Machine \ No newline at end of file diff --git a/scripts/virtualization/ivms/{IvmID}/hardware/memory.yaml b/scripts/virtualization/ivms/{IvmID}/hardware/memory.yaml new file mode 100644 index 0000000..eb6cf52 --- /dev/null +++ b/scripts/virtualization/ivms/{IvmID}/hardware/memory.yaml @@ -0,0 +1,21 @@ + get: + x-mojo-to: 'Virtualization::Inverse::IVM#getIvmHardwareMemory' + description: '' + operationId: getIvmInfoHardwareMemory + parameters: + - name: IvmID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleIvmID' + responses: + 200: + content: + application/json: + schema: + $ref: '#/components/schemas/IvmInfoHardwareMemory' + description: '' + summary: '' + tags: + - IVM_Machine \ No newline at end of file diff --git a/scripts/virtualization/ivms/{IvmID}/history.yaml b/scripts/virtualization/ivms/{IvmID}/history.yaml new file mode 100644 index 0000000..83db27e --- /dev/null +++ b/scripts/virtualization/ivms/{IvmID}/history.yaml @@ -0,0 +1,23 @@ + get: + x-mojo-to: 'Virtualization::Inverse::IVM#getIvmHistory' + summary: "" + description: "" + operationId: getIvmInfoHistory + parameters: + - name: IvmID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleIvmID' + responses: + 200: + description: "" + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/IvmInfoHistoryMsg' + tags: + - IVM_Machine \ No newline at end of file diff --git a/scripts/virtualization/ivms/{IvmID}/ivhosts.yaml b/scripts/virtualization/ivms/{IvmID}/ivhosts.yaml new file mode 100644 index 0000000..303ec97 --- /dev/null +++ b/scripts/virtualization/ivms/{IvmID}/ivhosts.yaml @@ -0,0 +1,23 @@ + get: + x-mojo-to: 'Virtualization::Inverse::IVHost#getIVHostList' + summary: "" + description: "" + operationId: getIVHostList + parameters: + - name: IvmID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleIvmID' + responses: + 200: + description: "" + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/IVHostInfoSummary' + tags: + - IVM_Host \ No newline at end of file diff --git a/scripts/virtualization/ivms/{IvmID}/ivhosts/{IVHostID}.yaml b/scripts/virtualization/ivms/{IvmID}/ivhosts/{IVHostID}.yaml new file mode 100644 index 0000000..1d68379 --- /dev/null +++ b/scripts/virtualization/ivms/{IvmID}/ivhosts/{IVHostID}.yaml @@ -0,0 +1,27 @@ + get: + x-mojo-to: 'Virtualization::Inverse::IVHost#getIVHostInfo' + summary: "" + description: "" + operationId: getIVHostInfo + parameters: + - name: IvmID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleIvmID' + - name: IVHostID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleIVHostID' + responses: + 200: + description: "" + content: + application/json: + schema: + $ref: '#/components/schemas/IVHostInfoSummary' + tags: + - IVM_Host \ No newline at end of file diff --git a/scripts/virtualization/ivms/{IvmID}/ivhosts/{IVHostID}/overview.yaml b/scripts/virtualization/ivms/{IvmID}/ivhosts/{IVHostID}/overview.yaml new file mode 100644 index 0000000..6559c4b --- /dev/null +++ b/scripts/virtualization/ivms/{IvmID}/ivhosts/{IVHostID}/overview.yaml @@ -0,0 +1,45 @@ + get: + x-mojo-to: 'Virtualization::Inverse::IVHost#getIVHostInfoOverview' + summary: "" + description: "" + operationId: getIVHostOverview + parameters: + - name: IvmID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleIvmID' + - name: IVHostID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleIVHostID' + responses: + 200: + description: "" + content: + application/json: + schema: + type: object + properties: + ID: + $ref: '#/components/schemas/RuleIVHostID' + HostName: + $ref: '#/components/schemas/RuleIVHostName' + IvmID: + $ref: '#/components/schemas/RuleIvmID' + IvmName: + $ref: '#/components/schemas/RuleIvmName' + General: + description: '' + items: + $ref: '#/components/schemas/OverviewFormat1String' + type: array + Resource: + type: array + items: + $ref: '#/components/schemas/OverviewFormat3Array' + tags: + - IVM_Host \ No newline at end of file diff --git a/scripts/virtualization/ivms/{IvmID}/overview.yaml b/scripts/virtualization/ivms/{IvmID}/overview.yaml new file mode 100644 index 0000000..5672040 --- /dev/null +++ b/scripts/virtualization/ivms/{IvmID}/overview.yaml @@ -0,0 +1,49 @@ + get: + x-mojo-to: 'Virtualization::Inverse::IVM#getIvmInfoOverview' + description: '' + summary: '' + operationId: getIvmInfoOverview + parameters: + - description: '' + in: path + name: IvmID + required: true + schema: + $ref: '#/components/schemas/RuleIvmID' + responses: + 200: + description: '' + content: + application/json: + schema: + properties: + ID: + $ref: '#/components/schemas/RuleIvmID' + Name: + $ref: '#/components/schemas/RuleIvmName' + Comment: + description: '' + items: + $ref: '#/components/schemas/IvmInfoComment' + type: array + General: + description: '' + items: + $ref: '#/components/schemas/OverviewFormat1String' + type: array + History: + description: '' + items: + $ref: '#/components/schemas/IvmInfoHistoryMsg' + type: array + Hosts: + type: array + items: + $ref: '#/components/schemas/IVHostAbstract' + Resource: + type: array + items: + $ref: '#/components/schemas/OverviewFormat3Array' + type: object + tags: + - IVM_Machine diff --git a/scripts/virtualization/ivms/{IvmID}/powercontrol.yaml b/scripts/virtualization/ivms/{IvmID}/powercontrol.yaml new file mode 100644 index 0000000..92ae00e --- /dev/null +++ b/scripts/virtualization/ivms/{IvmID}/powercontrol.yaml @@ -0,0 +1,28 @@ + post: + x-mojo-to: 'Virtualization::Inverse::IVM#controlIvmPower' + summary: "" + description: "" + operationId: ctlIvmPower + parameters: + - name: IvmID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleIvmID' + requestBody: + description: "" + content: + application/json: + schema: + type: object + properties: + Power: + $ref: '#/components/schemas/IvmPowerControl' + required: true + responses: + 200: + description: "" + content: {} + tags: + - IVM_Machine \ No newline at end of file diff --git a/scripts/virtualization/ivmtree.yaml b/scripts/virtualization/ivmtree.yaml new file mode 100644 index 0000000..eb239fc --- /dev/null +++ b/scripts/virtualization/ivmtree.yaml @@ -0,0 +1,26 @@ + get: + x-mojo-to: 'Virtualization::Inverse::IVM#getIvmsTree' + summary: "" + description: "" + operationId: getIvmTree + parameters: + - in: query + name: status + description: "" + required: false + schema: + $ref: '#/components/schemas/TreeStatusQuery' + responses: + 200: + description: "" + content: + application/json: + schema: + type: object + properties: + entity: + type: array + items: + $ref: '#/components/schemas/TreeIvmList' + tags: + - IVM_Topology \ No newline at end of file diff --git a/scripts/virtualization/verify/ivm/disk.yaml b/scripts/virtualization/verify/ivm/disk.yaml new file mode 100644 index 0000000..1cd7880 --- /dev/null +++ b/scripts/virtualization/verify/ivm/disk.yaml @@ -0,0 +1,33 @@ + post: + x-mojo-to: 'Virtualization::Inverse::IVM#checkIvmDiskNameVerify' + summary: "" + description: "" + operationId: getVerifyIvmDiskName + requestBody: + description: "" + content: + application/json: + schema: + type: object + allOf: + - $ref: '#/components/schemas/VmVerifyRequest' + properties: + Value: + example: "IVM-100_OS_Disk" + required: true + responses: + 200: + description: "" + content: + application/json: + schema: + type: object + allOf: + - $ref: '#/components/schemas/VmVerifyResponse' + properties: + Return: + example: false + ReturnMsg: + example: "The same name exists." + tags: + - IVM_Machine \ No newline at end of file diff --git a/scripts/virtualization/verify/ivm/name.yaml b/scripts/virtualization/verify/ivm/name.yaml new file mode 100644 index 0000000..631b84d --- /dev/null +++ b/scripts/virtualization/verify/ivm/name.yaml @@ -0,0 +1,33 @@ + post: + x-mojo-to: 'Virtualization::Inverse::IVM#checkIvmNameVerify' + summary: "" + description: "" + operationId: getVerifyIvmName + requestBody: + description: "" + content: + application/json: + schema: + type: object + allOf: + - $ref: '#/components/schemas/VmVerifyRequest' + properties: + Value: + example: "IVM-100" + required: true + responses: + 200: + description: "" + content: + application/json: + schema: + type: object + allOf: + - $ref: '#/components/schemas/VmVerifyResponse' + properties: + Return: + example: false + ReturnMsg: + example: "The same name exists." + tags: + - IVM_Machine \ No newline at end of file diff --git a/scripts/virtualization/verify/vm/disk.yaml b/scripts/virtualization/verify/vm/disk.yaml new file mode 100644 index 0000000..454b143 --- /dev/null +++ b/scripts/virtualization/verify/vm/disk.yaml @@ -0,0 +1,35 @@ + post: + x-mojo-to: 'Virtualization::VM#checkVmDiskNameVerify' + summary: "" + description: "" + operationId: getVerifyVmDiskName + requestBody: + description: "" + content: + application/json: + schema: + type: object + allOf: + - $ref: '#/components/schemas/VmVerifyRequest' + properties: + Value: + example: "VM-100_OS_Disk" + required: true + responses: + 200: + description: "" + content: + application/json: + schema: + type: object + allOf: + - $ref: '#/components/schemas/VmVerifyResponse' + properties: + Return: + example: false + ReturnCode: + example: 100 + ReturnMsg: + example: "The same name exists." + tags: + - VM_Machine diff --git a/scripts/virtualization/verify/vm/name.yaml b/scripts/virtualization/verify/vm/name.yaml new file mode 100644 index 0000000..05d6763 --- /dev/null +++ b/scripts/virtualization/verify/vm/name.yaml @@ -0,0 +1,35 @@ + post: + x-mojo-to: 'Virtualization::VM#checkVmNameVerify' + summary: "" + description: "" + operationId: getVerifyVmName + requestBody: + description: "" + content: + application/json: + schema: + type: object + allOf: + - $ref: '#/components/schemas/VmVerifyRequest' + properties: + Value: + example: "VM-100" + required: true + responses: + 200: + description: "" + content: + application/json: + schema: + type: object + allOf: + - $ref: '#/components/schemas/VmVerifyResponse' + properties: + Return: + example: false + ReturnCode: + example: 100 + ReturnMsg: + example: "The same name exists." + tags: + - VM_Machine diff --git a/scripts/virtualization/vmhosts.yaml b/scripts/virtualization/vmhosts.yaml new file mode 100644 index 0000000..f6002dc --- /dev/null +++ b/scripts/virtualization/vmhosts.yaml @@ -0,0 +1,16 @@ + get: + x-mojo-to: 'Virtualization::Host#getHostList' + summary: "" + description: "" + operationId: getHostList + responses: + 200: + description: "" + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/HostInfo' + tags: + - VM_Host diff --git a/scripts/virtualization/vmhosts/{HostID}.yaml b/scripts/virtualization/vmhosts/{HostID}.yaml new file mode 100644 index 0000000..548b2d8 --- /dev/null +++ b/scripts/virtualization/vmhosts/{HostID}.yaml @@ -0,0 +1,21 @@ + get: + x-mojo-to: 'Virtualization::Host#getHostInfo' + summary: "" + description: "" + operationId: getHostInfo + parameters: + - name: HostID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleHostID' + responses: + 200: + description: "" + content: + application/json: + schema: + $ref: '#/components/schemas/HostInfo' + tags: + - VM_Host diff --git a/scripts/virtualization/vmhosts/{HostID}/general.yaml b/scripts/virtualization/vmhosts/{HostID}/general.yaml new file mode 100644 index 0000000..1ed0956 --- /dev/null +++ b/scripts/virtualization/vmhosts/{HostID}/general.yaml @@ -0,0 +1,28 @@ + get: + x-mojo-to: 'Virtualization::Host#getHostGeneral' + summary: "" + description: "" + operationId: getHostInfoGeneral + parameters: + - name: HostID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleHostID' + responses: + 200: + description: "" + content: + application/json: + schema: + type: object + properties: + ID: + $ref: '#/components/schemas/RuleHostID' + HostName: + $ref: '#/components/schemas/RuleHostName' + General: + $ref: '#/components/schemas/HostInfoGeneral' + tags: + - VM_Host diff --git a/scripts/virtualization/vmhosts/{HostID}/hardware.yaml b/scripts/virtualization/vmhosts/{HostID}/hardware.yaml new file mode 100644 index 0000000..fddd024 --- /dev/null +++ b/scripts/virtualization/vmhosts/{HostID}/hardware.yaml @@ -0,0 +1,28 @@ + get: + x-mojo-to: 'Virtualization::Host#getHostHardware' + summary: "" + description: "" + operationId: getHostInfoHardware + parameters: + - name: HostID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleHostID' + responses: + 200: + description: "" + content: + application/json: + schema: + type: object + properties: + ID: + $ref: '#/components/schemas/RuleHostID' + HostName: + $ref: '#/components/schemas/RuleHostName' + Hardware: + $ref: '#/components/schemas/HostInfoHardware' + tags: + - VM_Host diff --git a/scripts/virtualization/vmhosts/{HostID}/overview.yaml b/scripts/virtualization/vmhosts/{HostID}/overview.yaml new file mode 100644 index 0000000..f0e6c8e --- /dev/null +++ b/scripts/virtualization/vmhosts/{HostID}/overview.yaml @@ -0,0 +1,50 @@ + get: + x-mojo-to: 'Virtualization::Host#getHostOverview' + summary: "" + description: "" + operationId: getHostInfoOverview + parameters: + - name: HostID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleHostID' + responses: + 200: + description: "" + content: + application/json: + schema: + type: object + properties: + ID: + $ref: '#/components/schemas/RuleHostID' + HostName: + $ref: '#/components/schemas/RuleHostName' + ManagementIp: + type: string + example: "192.168.61.25" + format: "ipv4" + General: + type: array + description: "" + items: + $ref: '#/components/schemas/OverviewFormat1String' + VMStatus: + $ref: '#/components/schemas/HostInfoVmStatus' + Resource: + type: array + description: "" + items: + allOf: + - $ref: '#/components/schemas/OverviewFormat3Array' + - type: object + properties: + Category: + type: string + enum: + - "Hardware" + - "Software" + tags: + - VM_Host diff --git a/scripts/virtualization/vmhosts/{HostID}/software.yaml b/scripts/virtualization/vmhosts/{HostID}/software.yaml new file mode 100644 index 0000000..e8b85a7 --- /dev/null +++ b/scripts/virtualization/vmhosts/{HostID}/software.yaml @@ -0,0 +1,28 @@ + get: + x-mojo-to: 'Virtualization::Host#getHostSoftware' + summary: "" + description: "" + operationId: getHostInfoSoftware + parameters: + - name: HostID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleHostID' + responses: + 200: + description: "" + content: + application/json: + schema: + type: object + properties: + ID: + $ref: '#/components/schemas/RuleHostID' + HostName: + $ref: '#/components/schemas/RuleHostName' + Software: + $ref: '#/components/schemas/HostInfoSoftware' + tags: + - VM_Host diff --git a/scripts/virtualization/vmhosts/{HostID}/virtualnetwork.yaml b/scripts/virtualization/vmhosts/{HostID}/virtualnetwork.yaml new file mode 100644 index 0000000..3d9e338 --- /dev/null +++ b/scripts/virtualization/vmhosts/{HostID}/virtualnetwork.yaml @@ -0,0 +1,28 @@ + get: + x-mojo-to: 'Virtualization::Host#getHostVirtualNetwork' + summary: "" + description: "" + operationId: getHostInfoVirtualNetwork + parameters: + - name: HostID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleHostID' + responses: + 200: + description: "" + content: + application/json: + schema: + type: object + properties: + ID: + $ref: '#/components/schemas/RuleHostID' + HostName: + $ref: '#/components/schemas/RuleHostName' + VitrualNetworks: + $ref: '#/components/schemas/HostInfoVirtualNetwork' + tags: + - VM_Host diff --git a/scripts/virtualization/vmhosts/{HostID}/vms.yaml b/scripts/virtualization/vmhosts/{HostID}/vms.yaml new file mode 100644 index 0000000..8aa7f57 --- /dev/null +++ b/scripts/virtualization/vmhosts/{HostID}/vms.yaml @@ -0,0 +1,60 @@ + get: + x-mojo-to: 'Virtualization::VM#getVmBriefList' + summary: "" + description: "" + operationId: getHostInfoVms + parameters: + - in: query + name: name + description: "" + required: false + schema: + $ref: '#/components/schemas/VmSearchNameQuery' + - in: query + name: status + description: "" + required: false + schema: + $ref: '#/components/schemas/VmSearchStatusQuery' + - name: HostID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleHostID' + responses: + 200: + description: "" + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/VmInfoSummary' + tags: + - VM_Host + post: + x-mojo-to: 'Virtualization::VM#createVm' + summary: "" + description: "" + operationId: addHostVm + parameters: + - name: HostID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleHostID' + requestBody: + description: "" + content: + application/json: + schema: + $ref: '#/components/schemas/VmInfoAdd' + required: true + responses: + 200: + description: "" + content: {} + tags: + - VM_Host diff --git a/scripts/virtualization/vmhosts/{HostID}/vms/{VMID}.yaml b/scripts/virtualization/vmhosts/{HostID}/vms/{VMID}.yaml new file mode 100644 index 0000000..f26e9a2 --- /dev/null +++ b/scripts/virtualization/vmhosts/{HostID}/vms/{VMID}.yaml @@ -0,0 +1,57 @@ + get: + x-mojo-to: 'Virtualization::VM#getVmInfo' + summary: "" + description: "" + operationId: getHostVmInfo + parameters: + - name: HostID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleHostID' + - name: VMID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleVMID' + responses: + 200: + description: "" + content: + application/json: + schema: + $ref: '#/components/schemas/VmInfo' + tags: + - VM_Machine + delete: + x-mojo-to: 'Virtualization::VM#removeVm' + summary: "" + description: "" + operationId: delHostVm + parameters: + - name: HostID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleHostID' + - name: VMID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleVMID' + - in: query + name: remove + description: "" + required: false + schema: + $ref: '#/components/schemas/delHostVmOpt' + responses: + 200: + description: "" + content: {} + tags: + - VM_Host diff --git a/scripts/virtualization/vmhosts/{HostID}/vms/{VMID}/boot.yaml b/scripts/virtualization/vmhosts/{HostID}/vms/{VMID}/boot.yaml new file mode 100644 index 0000000..a3857e3 --- /dev/null +++ b/scripts/virtualization/vmhosts/{HostID}/vms/{VMID}/boot.yaml @@ -0,0 +1,58 @@ + get: + x-mojo-to: 'Virtualization::VM#getVmBootOption' + summary: "" + description: "" + operationId: getHostVmInfoBoot + parameters: + - name: HostID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleHostID' + - name: VMID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleVMID' + responses: + 200: + description: "" + content: + application/json: + schema: + $ref: '#/components/schemas/VmInfoBoot' + tags: + - VM_Machine + put: + x-mojo-to: 'Virtualization::VM#setVmBootOption' + summary: "" + description: "" + operationId: updateHostVmInfoBoot + parameters: + - name: HostID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleHostID' + - name: VMID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleVMID' + requestBody: + description: "" + content: + application/json: + schema: + $ref: '#/components/schemas/VmInfoBoot' + required: true + responses: + 200: + description: "" + content: {} + tags: + - VM_Machine diff --git a/scripts/virtualization/vmhosts/{HostID}/vms/{VMID}/comment.yaml b/scripts/virtualization/vmhosts/{HostID}/vms/{VMID}/comment.yaml new file mode 100644 index 0000000..869313d --- /dev/null +++ b/scripts/virtualization/vmhosts/{HostID}/vms/{VMID}/comment.yaml @@ -0,0 +1,58 @@ + get: + x-mojo-to: 'Virtualization::VM#getVmComment' + summary: "" + description: "" + operationId: getHostVmInfoComment + parameters: + - name: HostID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleHostID' + - name: VMID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleVMID' + responses: + 200: + description: "" + content: + application/json: + schema: + $ref: '#/components/schemas/VmInfoComment' + tags: + - VM_Machine + put: + x-mojo-to: 'Virtualization::VM#setVmComment' + summary: "" + description: "" + operationId: updateHostVmInfoComment + parameters: + - name: HostID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleHostID' + - name: VMID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleVMID' + requestBody: + description: "" + content: + application/json: + schema: + $ref: '#/components/schemas/VmInfoComment' + required: true + responses: + 200: + description: "" + content: {} + tags: + - VM_Machine diff --git a/scripts/virtualization/vmhosts/{HostID}/vms/{VMID}/console.yaml b/scripts/virtualization/vmhosts/{HostID}/vms/{VMID}/console.yaml new file mode 100644 index 0000000..b0fdf5d --- /dev/null +++ b/scripts/virtualization/vmhosts/{HostID}/vms/{VMID}/console.yaml @@ -0,0 +1,51 @@ + get: + x-mojo-to: 'Virtualization::VM#getVmConsole' + summary: "" + description: "" + operationId: getHostVmInfoConsole + parameters: + - name: HostID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleHostID' + - name: VMID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleVMID' + responses: + 200: + description: "" + content: + application/json: + schema: + $ref: '#/components/schemas/VmInfoConsole' + tags: + - VM_Machine + delete: + x-mojo-to: 'Virtualization::VM#delVmConsole' + summary: "" + description: "" + operationId: delHostVmInfoConsole + parameters: + - name: HostID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleHostID' + - name: VMID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleVMID' + responses: + 200: + description: "" + content: {} + tags: + - VM_Machine diff --git a/scripts/virtualization/vmhosts/{HostID}/vms/{VMID}/general.yaml b/scripts/virtualization/vmhosts/{HostID}/vms/{VMID}/general.yaml new file mode 100644 index 0000000..93e63ed --- /dev/null +++ b/scripts/virtualization/vmhosts/{HostID}/vms/{VMID}/general.yaml @@ -0,0 +1,38 @@ + get: + x-mojo-to: 'Virtualization::VM#getVmGeneral' + summary: "" + description: "" + operationId: getHostVmInfoGeneral + parameters: + - name: HostID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleHostID' + - name: VMID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleVMID' + responses: + 200: + description: "" + content: + application/json: + schema: + type: object + properties: + ID: + $ref: '#/components/schemas/RuleVMID' + Name: + $ref: '#/components/schemas/RuleVMName' + HostID: + $ref: '#/components/schemas/RuleHostID' + HostName: + $ref: '#/components/schemas/RuleHostName' + General: + $ref: '#/components/schemas/VmInfoGeneral' + tags: + - VM_Machine diff --git a/scripts/virtualization/vmhosts/{HostID}/vms/{VMID}/hardware.yaml b/scripts/virtualization/vmhosts/{HostID}/vms/{VMID}/hardware.yaml new file mode 100644 index 0000000..46b0ff4 --- /dev/null +++ b/scripts/virtualization/vmhosts/{HostID}/vms/{VMID}/hardware.yaml @@ -0,0 +1,38 @@ + get: + x-mojo-to: 'Virtualization::VM#getVmHardware' + summary: "" + description: "" + operationId: getHostVmInfoHardware + parameters: + - name: HostID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleHostID' + - name: VMID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleVMID' + responses: + 200: + description: "" + content: + application/json: + schema: + type: object + properties: + ID: + $ref: '#/components/schemas/RuleVMID' + Name: + $ref: '#/components/schemas/RuleVMName' + HostID: + $ref: '#/components/schemas/RuleHostID' + HostName: + $ref: '#/components/schemas/RuleHostName' + Hardware: + $ref: '#/components/schemas/VmInfoHardware' + tags: + - VM_Machine diff --git a/scripts/virtualization/vmhosts/{HostID}/vms/{VMID}/hardware/cdrom.yaml b/scripts/virtualization/vmhosts/{HostID}/vms/{VMID}/hardware/cdrom.yaml new file mode 100644 index 0000000..a77f1a1 --- /dev/null +++ b/scripts/virtualization/vmhosts/{HostID}/vms/{VMID}/hardware/cdrom.yaml @@ -0,0 +1,38 @@ + get: + x-mojo-to: 'Virtualization::VM#getVmHardwareCDROM' + summary: "" + description: "" + operationId: getHostVmInfoHardwareCDROM + parameters: + - name: HostID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleHostID' + - name: VMID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleVMID' + responses: + 200: + description: "" + content: + application/json: + schema: + type: object + properties: + ID: + $ref: '#/components/schemas/RuleVMID' + Name: + $ref: '#/components/schemas/RuleVMName' + HostID: + $ref: '#/components/schemas/RuleHostID' + HostName: + $ref: '#/components/schemas/RuleHostName' + ISOmount: + $ref: '#/components/schemas/VmInfoHardwareCDROM' + tags: + - VM_Machine diff --git a/scripts/virtualization/vmhosts/{HostID}/vms/{VMID}/hardware/cdrom/mount.yaml b/scripts/virtualization/vmhosts/{HostID}/vms/{VMID}/hardware/cdrom/mount.yaml new file mode 100644 index 0000000..50c6a5b --- /dev/null +++ b/scripts/virtualization/vmhosts/{HostID}/vms/{VMID}/hardware/cdrom/mount.yaml @@ -0,0 +1,55 @@ + post: + x-mojo-to: 'Virtualization::VM#mountVmHardwareCDROM' + summary: "" + description: "" + operationId: mountHostVmInfoHardwareISOimage + parameters: + - name: HostID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleHostID' + - name: VMID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleVMID' + requestBody: + description: "" + content: + application/json: + schema: + $ref: '#/components/schemas/VmInfoHardwareISOimageMount' + required: true + responses: + 200: + description: "" + content: {} + tags: + - VM_Machine + delete: + x-mojo-to: 'Virtualization::VM#unmountVmHardwareCDROM' + summary: "" + description: "" + operationId: unmountHostVmInfoHardwareISOimage + parameters: + - name: HostID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleHostID' + - name: VMID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleVMID' + responses: + 200: + description: "" + content: {} + tags: + - VM_Machine diff --git a/scripts/virtualization/vmhosts/{HostID}/vms/{VMID}/hardware/cpu.yaml b/scripts/virtualization/vmhosts/{HostID}/vms/{VMID}/hardware/cpu.yaml new file mode 100644 index 0000000..58be57c --- /dev/null +++ b/scripts/virtualization/vmhosts/{HostID}/vms/{VMID}/hardware/cpu.yaml @@ -0,0 +1,58 @@ + get: + x-mojo-to: 'Virtualization::VM#getVmHardwareCPU' + summary: "" + description: "" + operationId: getHostVmInfoHardwareCPU + parameters: + - name: HostID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleHostID' + - name: VMID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleVMID' + responses: + 200: + description: "" + content: + application/json: + schema: + $ref: '#/components/schemas/VmInfoHardwareCPU' + tags: + - VM_Machine + put: + x-mojo-to: 'Virtualization::VM#setVmHardwareCPU' + summary: "" + description: "" + operationId: updateHostVmInfoHardwareCPU + parameters: + - name: HostID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleHostID' + - name: VMID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleVMID' + requestBody: + description: "" + content: + application/json: + schema: + $ref: '#/components/schemas/VmInfoHardwareCPU' + required: true + responses: + 200: + description: "" + content: {} + tags: + - VM_Machine diff --git a/scripts/virtualization/vmhosts/{HostID}/vms/{VMID}/hardware/disks.yaml b/scripts/virtualization/vmhosts/{HostID}/vms/{VMID}/hardware/disks.yaml new file mode 100644 index 0000000..5124bcf --- /dev/null +++ b/scripts/virtualization/vmhosts/{HostID}/vms/{VMID}/hardware/disks.yaml @@ -0,0 +1,71 @@ + get: + x-mojo-to: 'Virtualization::VM#getVmHardwareDisks' + summary: "" + description: "" + operationId: getHostVmInfoHardwareDiskList + parameters: + - name: HostID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleHostID' + - name: VMID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleVMID' + responses: + 200: + description: "" + content: + application/json: + schema: + type: object + properties: + ID: + $ref: '#/components/schemas/RuleVMID' + Name: + $ref: '#/components/schemas/RuleVMName' + HostID: + $ref: '#/components/schemas/RuleHostID' + HostName: + $ref: '#/components/schemas/RuleHostName' + Disks: + type: array + items: + $ref: '#/components/schemas/VmInfoHardwareDisk' + tags: + - VM_Machine + post: + x-mojo-to: 'Virtualization::VM#createVmHardwareDisk' + summary: "" + description: "" + operationId: addHostVmDisk + parameters: + - name: HostID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleHostID' + - name: VMID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleVMID' + requestBody: + description: "" + content: + application/json: + schema: + $ref: '#/components/schemas/VmInfoHardwareDiskAdd' + required: true + responses: + 200: + description: "" + content: {} + tags: + - VM_Machine diff --git a/scripts/virtualization/vmhosts/{HostID}/vms/{VMID}/hardware/disks/{DiskID}.yaml b/scripts/virtualization/vmhosts/{HostID}/vms/{VMID}/hardware/disks/{DiskID}.yaml new file mode 100644 index 0000000..e851bd3 --- /dev/null +++ b/scripts/virtualization/vmhosts/{HostID}/vms/{VMID}/hardware/disks/{DiskID}.yaml @@ -0,0 +1,89 @@ + get: + x-mojo-to: 'Virtualization::VM#getVmHardwareDiskInfo' + summary: "" + description: "" + operationId: getHostVmInfoHardwareDiskInfo + parameters: + - name: HostID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleHostID' + - name: VMID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleVMID' + - name: DiskID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleDiskID' + responses: + 200: + description: "" + content: + application/json: + schema: + type: object + properties: + ID: + $ref: '#/components/schemas/RuleVMID' + Name: + $ref: '#/components/schemas/RuleVMName' + HostID: + $ref: '#/components/schemas/RuleHostID' + HostName: + $ref: '#/components/schemas/RuleHostName' + Disk: + type: object + allOf: + - $ref: '#/components/schemas/VmInfoHardwareDisk' + properties: + Volume: + example: "Storage" + DiskName: + example: "VM-100_OS_Disk" + Capacity: + example: "100 GB" + tags: + - VM_Machine + delete: + x-mojo-to: 'Virtualization::VM#removeVmHardwareDisk' + summary: "" + description: "" + operationId: delHostVmInfoHardwareDisk + parameters: + - name: HostID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleHostID' + - name: VMID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleVMID' + - name: DiskID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleDiskID' + - in: query + name: remove + description: "" + required: false + schema: + $ref: '#/components/schemas/delHostVmInfoHardwareDiskOpt' + responses: + 200: + description: "" + content: {} + tags: + - VM_Machine diff --git a/scripts/virtualization/vmhosts/{HostID}/vms/{VMID}/hardware/disks/{DiskID}/option.yaml b/scripts/virtualization/vmhosts/{HostID}/vms/{VMID}/hardware/disks/{DiskID}/option.yaml new file mode 100644 index 0000000..4b35ee1 --- /dev/null +++ b/scripts/virtualization/vmhosts/{HostID}/vms/{VMID}/hardware/disks/{DiskID}/option.yaml @@ -0,0 +1,70 @@ + get: + x-mojo-to: 'Virtualization::VM#getVmHardwareDiskOption' + summary: "" + description: "" + operationId: getHostVmInfoHardwareDiskInfoOption + parameters: + - name: HostID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleHostID' + - name: VMID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleVMID' + - name: DiskID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleDiskID' + responses: + 200: + description: "" + content: + application/json: + schema: + $ref: '#/components/schemas/VmInfoHardwareDiskOption' + tags: + - VM_Machine + put: + x-mojo-to: 'Virtualization::VM#setVmHardwareDiskOption' + summary: "" + description: "" + operationId: updateHostVmInfoHardwareDiskInfoOption + parameters: + - name: HostID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleHostID' + - name: VMID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleVMID' + - name: DiskID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleDiskID' + requestBody: + description: "" + content: + application/json: + schema: + $ref: '#/components/schemas/VmInfoHardwareDiskOption' + required: true + responses: + 200: + description: "" + content: {} + tags: + - VM_Machine diff --git a/scripts/virtualization/vmhosts/{HostID}/vms/{VMID}/hardware/memory.yaml b/scripts/virtualization/vmhosts/{HostID}/vms/{VMID}/hardware/memory.yaml new file mode 100644 index 0000000..7996ae9 --- /dev/null +++ b/scripts/virtualization/vmhosts/{HostID}/vms/{VMID}/hardware/memory.yaml @@ -0,0 +1,58 @@ + get: + x-mojo-to: 'Virtualization::VM#getVmHardwareMemory' + summary: "" + description: "" + operationId: getHostVmInfoHardwareMemory + parameters: + - name: HostID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleHostID' + - name: VMID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleVMID' + responses: + 200: + description: "" + content: + application/json: + schema: + $ref: '#/components/schemas/VmInfoHardwareMemory' + tags: + - VM_Machine + put: + x-mojo-to: 'Virtualization::VM#setVmHardwareMemory' + summary: "" + description: "" + operationId: updateHostVmInfoHardwareMemory + parameters: + - name: HostID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleHostID' + - name: VMID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleVMID' + requestBody: + description: "" + content: + application/json: + schema: + $ref: '#/components/schemas/VmInfoHardwareMemory' + required: true + responses: + 200: + description: "" + content: {} + tags: + - VM_Machine diff --git a/scripts/virtualization/vmhosts/{HostID}/vms/{VMID}/hardware/networks.yaml b/scripts/virtualization/vmhosts/{HostID}/vms/{VMID}/hardware/networks.yaml new file mode 100644 index 0000000..8108bd5 --- /dev/null +++ b/scripts/virtualization/vmhosts/{HostID}/vms/{VMID}/hardware/networks.yaml @@ -0,0 +1,71 @@ + get: + x-mojo-to: 'Virtualization::VM#getVmHardwareNetworks' + summary: "" + description: "" + operationId: getHostVmInfoHardwareNetworkList + parameters: + - name: HostID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleHostID' + - name: VMID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleVMID' + responses: + 200: + description: "" + content: + application/json: + schema: + type: object + properties: + ID: + $ref: '#/components/schemas/RuleVMID' + Name: + $ref: '#/components/schemas/RuleVMName' + HostID: + $ref: '#/components/schemas/RuleHostID' + HostName: + $ref: '#/components/schemas/RuleHostName' + Networks: + type: array + items: + $ref: '#/components/schemas/VmInfoHardwareNetwork' + tags: + - VM_Machine + post: + x-mojo-to: 'Virtualization::VM#createVmHardwareNetwork' + summary: "" + description: "" + operationId: addHostVmNetwork + parameters: + - name: HostID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleHostID' + - name: VMID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleVMID' + requestBody: + description: "" + content: + application/json: + schema: + $ref: '#/components/schemas/VmInfoHardwareNetworkAdd' + required: true + responses: + 200: + description: "" + content: {} + tags: + - VM_Machine diff --git a/scripts/virtualization/vmhosts/{HostID}/vms/{VMID}/hardware/networks/{NetworkID}.yaml b/scripts/virtualization/vmhosts/{HostID}/vms/{VMID}/hardware/networks/{NetworkID}.yaml new file mode 100644 index 0000000..4a4ad9f --- /dev/null +++ b/scripts/virtualization/vmhosts/{HostID}/vms/{VMID}/hardware/networks/{NetworkID}.yaml @@ -0,0 +1,74 @@ + get: + x-mojo-to: 'Virtualization::VM#getVmHardwareNetworkInfo' + summary: "" + description: "" + operationId: getHostVmInfoHardwareNetworkInfo + parameters: + - name: HostID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleHostID' + - name: VMID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleVMID' + - name: NetworkID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleNetworkID' + responses: + 200: + description: "" + content: + application/json: + schema: + type: object + properties: + ID: + $ref: '#/components/schemas/RuleVMID' + Name: + $ref: '#/components/schemas/RuleVMName' + HostID: + $ref: '#/components/schemas/RuleHostID' + HostName: + $ref: '#/components/schemas/RuleHostName' + Network: + $ref: '#/components/schemas/VmInfoHardwareNetwork' + tags: + - VM_Machine + delete: + x-mojo-to: 'Virtualization::VM#removeVmHardwareNetwork' + summary: "" + description: "" + operationId: delHostVmInfoHardwareNetwork + parameters: + - name: HostID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleHostID' + - name: VMID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleVMID' + - name: NetworkID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleNetworkID' + responses: + 200: + description: "" + content: {} + tags: + - VM_Machine diff --git a/scripts/virtualization/vmhosts/{HostID}/vms/{VMID}/hardware/networks/{NetworkID}/device.yaml b/scripts/virtualization/vmhosts/{HostID}/vms/{VMID}/hardware/networks/{NetworkID}/device.yaml new file mode 100644 index 0000000..b4fa345 --- /dev/null +++ b/scripts/virtualization/vmhosts/{HostID}/vms/{VMID}/hardware/networks/{NetworkID}/device.yaml @@ -0,0 +1,69 @@ + get: + x-mojo-to: 'Virtualization::VM#getVmHardwareNetworkOption' + summary: "" + description: "" + operationId: getHostVmInfoHardwareNetworkInfoDevice + parameters: + - name: HostID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleHostID' + - name: VMID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleVMID' + - name: NetworkID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleNetworkID' + responses: + 200: + description: "" + content: + application/json: + schema: + $ref: '#/components/schemas/VmInfoHardwareNetworkDevice' + tags: + - VM_Machine + put: + x-mojo-to: 'Virtualization::VM#setVmHardwareNetworkOption' + summary: "" + description: "" + operationId: updateHostVmInfoHardwareNetworkDevice + parameters: + - name: HostID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleHostID' + - name: VMID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleVMID' + - name: NetworkID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleNetworkID' + requestBody: + description: "" + content: + application/json: + schema: + $ref: '#/components/schemas/VmInfoHardwareNetworkDevice' + responses: + 200: + description: "" + content: {} + tags: + - VM_Machine diff --git a/scripts/virtualization/vmhosts/{HostID}/vms/{VMID}/hardware/networks/{NetworkID}/linkup.yaml b/scripts/virtualization/vmhosts/{HostID}/vms/{VMID}/hardware/networks/{NetworkID}/linkup.yaml new file mode 100644 index 0000000..b9be494 --- /dev/null +++ b/scripts/virtualization/vmhosts/{HostID}/vms/{VMID}/hardware/networks/{NetworkID}/linkup.yaml @@ -0,0 +1,60 @@ + post: + x-mojo-to: 'Virtualization::VM#linkupVmHardwareNetwork' + summary: "" + description: "" + operationId: updateHostVmInfoHardwareNetworkInfoLinkUp + parameters: + - name: HostID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleHostID' + - name: VMID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleVMID' + - name: NetworkID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleNetworkID' + responses: + 200: + description: "" + content: {} + tags: + - VM_Machine + delete: + x-mojo-to: 'Virtualization::VM#linkdownVmHardwareNetwork' + summary: "" + description: "" + operationId: updateHostVmInfoHardwareNetworkInfoLinkDown + parameters: + - name: HostID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleHostID' + - name: VMID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleVMID' + - name: NetworkID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleNetworkID' + responses: + 200: + description: "" + content: {} + tags: + - VM_Machine diff --git a/scripts/virtualization/vmhosts/{HostID}/vms/{VMID}/history.yaml b/scripts/virtualization/vmhosts/{HostID}/vms/{VMID}/history.yaml new file mode 100644 index 0000000..a824d84 --- /dev/null +++ b/scripts/virtualization/vmhosts/{HostID}/vms/{VMID}/history.yaml @@ -0,0 +1,29 @@ + get: + x-mojo-to: 'Virtualization::VM#getVmHistory' + summary: "" + description: "" + operationId: getHostVmInfoHistory + parameters: + - name: HostID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleHostID' + - name: VMID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleVMID' + responses: + 200: + description: "" + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/VmInfoHistoryMsg' + tags: + - VM_Machine diff --git a/scripts/virtualization/vmhosts/{HostID}/vms/{VMID}/overview.yaml b/scripts/virtualization/vmhosts/{HostID}/vms/{VMID}/overview.yaml new file mode 100644 index 0000000..d2881b3 --- /dev/null +++ b/scripts/virtualization/vmhosts/{HostID}/vms/{VMID}/overview.yaml @@ -0,0 +1,56 @@ + get: + x-mojo-to: 'Virtualization::VM#getVmOverview' + summary: "" + description: "" + operationId: getHostVmInfoOverview + parameters: + - name: HostID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleHostID' + - name: VMID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleVMID' + responses: + 200: + description: "" + content: + application/json: + schema: + type: object + properties: + ID: + $ref: '#/components/schemas/RuleVMID' + Name: + $ref: '#/components/schemas/RuleVMName' + HostID: + $ref: '#/components/schemas/RuleHostID' + HostName: + $ref: '#/components/schemas/RuleHostName' + General: + type: array + description: "" + items: + $ref: '#/components/schemas/OverviewFormat1String' + Resource: + type: array + description: "" + items: + $ref: '#/components/schemas/OverviewFormat3Array' + History: + type: array + description: "" + items: + $ref: '#/components/schemas/VmInfoHistoryMsg' + Comment: + type: array + description: "" + items: + $ref: '#/components/schemas/VmInfoComment' + tags: + - VM_Machine diff --git a/scripts/virtualization/vmhosts/{HostID}/vms/{VMID}/powercontrol.yaml b/scripts/virtualization/vmhosts/{HostID}/vms/{VMID}/powercontrol.yaml new file mode 100644 index 0000000..406c778 --- /dev/null +++ b/scripts/virtualization/vmhosts/{HostID}/vms/{VMID}/powercontrol.yaml @@ -0,0 +1,34 @@ + post: + x-mojo-to: 'Virtualization::VM#controlVmPower' + summary: "" + description: "" + operationId: ctlHostVmPower + parameters: + - name: HostID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleHostID' + - name: VMID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleVMID' + requestBody: + description: "" + content: + application/json: + schema: + type: object + properties: + Power: + $ref: '#/components/schemas/HostVmPowerControl' + required: true + responses: + 200: + description: "" + content: {} + tags: + - VM_Machine diff --git a/scripts/virtualization/vmhosts/{HostID}/vmspowercontrol.yaml b/scripts/virtualization/vmhosts/{HostID}/vmspowercontrol.yaml new file mode 100644 index 0000000..8e364a8 --- /dev/null +++ b/scripts/virtualization/vmhosts/{HostID}/vmspowercontrol.yaml @@ -0,0 +1,36 @@ + post: + x-mojo-to: 'Virtualization::VM#controlHostVmsPower' + summary: "" + description: "" + operationId: ctlHostVmsPower + parameters: + - name: HostID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleHostID' + requestBody: + description: "" + content: + application/json: + schema: + type: object + properties: + AllVms: + type: boolean + description: "" + example: false + VMIDs: + type: array + items: + $ref: '#/components/schemas/RuleVMID' + Power: + $ref: '#/components/schemas/HostVmPowerControl' + required: true + responses: + 200: + description: "" + content: {} + tags: + - VM_Host diff --git a/scripts/virtualization/vmhosts/{HostID}/vmstatus.yaml b/scripts/virtualization/vmhosts/{HostID}/vmstatus.yaml new file mode 100644 index 0000000..21d2073 --- /dev/null +++ b/scripts/virtualization/vmhosts/{HostID}/vmstatus.yaml @@ -0,0 +1,28 @@ + get: + x-mojo-to: 'Virtualization::Host#getHostVmstatus' + summary: "" + description: "" + operationId: getHostInfoVmStatus + parameters: + - name: HostID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleHostID' + responses: + 200: + description: "" + content: + application/json: + schema: + type: object + properties: + ID: + $ref: '#/components/schemas/RuleHostID' + HostName: + $ref: '#/components/schemas/RuleHostName' + VMStatus: + $ref: '#/components/schemas/HostInfoVmStatus' + tags: + - VM_Host diff --git a/scripts/virtualization/vmisovols.yaml b/scripts/virtualization/vmisovols.yaml new file mode 100644 index 0000000..aca7ba3 --- /dev/null +++ b/scripts/virtualization/vmisovols.yaml @@ -0,0 +1,16 @@ + get: + x-mojo-to: 'Virtualization::VMiso#getHostISOvolumeListForVM' + summary: "" + description: "" + operationId: getVmCDisoVolList + responses: + 200: + description: "" + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/VmCDisoVolume' + tags: + - VM_ISO diff --git a/scripts/virtualization/vmisovols/{ISOvolID}.yaml b/scripts/virtualization/vmisovols/{ISOvolID}.yaml new file mode 100644 index 0000000..1b3a188 --- /dev/null +++ b/scripts/virtualization/vmisovols/{ISOvolID}.yaml @@ -0,0 +1,21 @@ + get: + x-mojo-to: 'Virtualization::VMiso#getHostISOvolumeInfoForVM' + summary: "" + description: "" + operationId: getVmCDisoVolInfo + parameters: + - name: ISOvolID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleISOvolID' + responses: + 200: + description: "" + content: + application/json: + schema: + $ref: '#/components/schemas/VmCDisoVolume' + tags: + - VM_ISO diff --git a/scripts/virtualization/vmisovols/{ISOvolID}/isos.yaml b/scripts/virtualization/vmisovols/{ISOvolID}/isos.yaml new file mode 100644 index 0000000..d5c5ef0 --- /dev/null +++ b/scripts/virtualization/vmisovols/{ISOvolID}/isos.yaml @@ -0,0 +1,23 @@ + get: + x-mojo-to: 'Virtualization::VMiso#getHostISOlistForVM' + summary: "" + description: "" + operationId: getVmCDisoList + parameters: + - name: ISOvolID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleISOvolID' + responses: + 200: + description: "" + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/VmCDisoInfo' + tags: + - VM_ISO diff --git a/scripts/virtualization/vmisovols/{ISOvolID}/isos/{ISOID}.yaml b/scripts/virtualization/vmisovols/{ISOvolID}/isos/{ISOID}.yaml new file mode 100644 index 0000000..a6ef088 --- /dev/null +++ b/scripts/virtualization/vmisovols/{ISOvolID}/isos/{ISOID}.yaml @@ -0,0 +1,27 @@ + get: + x-mojo-to: 'Virtualization::VMiso#getHostISOinfoForVM' + summary: "" + description: "" + operationId: getVmCDisoInfo + parameters: + - name: ISOvolID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleISOvolID' + - name: ISOID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleISOID' + responses: + 200: + description: "" + content: + application/json: + schema: + $ref: '#/components/schemas/VmCDisoInfo' + tags: + - VM_ISO diff --git a/scripts/virtualization/vmtree.yaml b/scripts/virtualization/vmtree.yaml new file mode 100644 index 0000000..c32e65a --- /dev/null +++ b/scripts/virtualization/vmtree.yaml @@ -0,0 +1,26 @@ + get: + x-mojo-to: 'Virtualization::Host#getVmsTree' + summary: "" + description: "" + operationId: getVmTree + parameters: + - in: query + name: status + description: "" + required: false + schema: + $ref: '#/components/schemas/TreeStatusQuery' + responses: + 200: + description: "" + content: + application/json: + schema: + type: object + properties: + entity: + type: array + items: + $ref: '#/components/schemas/TreeHostList' + tags: + - VM_Topology \ No newline at end of file diff --git a/scripts/virtualization/vmvols.yaml b/scripts/virtualization/vmvols.yaml new file mode 100644 index 0000000..8b61dbe --- /dev/null +++ b/scripts/virtualization/vmvols.yaml @@ -0,0 +1,16 @@ + get: + x-mojo-to: 'Virtualization::VMdisk#getHostVolumeListForVM' + summary: "" + description: "" + operationId: getVmVolumeList + responses: + 200: + description: "" + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/VmVolumeInfo' + tags: + - VM_Disk diff --git a/scripts/virtualization/vmvols/{VolID}.yaml b/scripts/virtualization/vmvols/{VolID}.yaml new file mode 100644 index 0000000..8947c51 --- /dev/null +++ b/scripts/virtualization/vmvols/{VolID}.yaml @@ -0,0 +1,21 @@ + get: + x-mojo-to: 'Virtualization::VMdisk#getHostVolumeInfoForVM' + summary: "" + description: "" + operationId: getVmVolumeInfo + parameters: + - name: VolID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleVolID' + responses: + 200: + description: "" + content: + application/json: + schema: + $ref: '#/components/schemas/VmVolumeInfo' + tags: + - VM_Disk diff --git a/scripts/virtualization/vmvols/{VolID}/disks.yaml b/scripts/virtualization/vmvols/{VolID}/disks.yaml new file mode 100644 index 0000000..00d1f13 --- /dev/null +++ b/scripts/virtualization/vmvols/{VolID}/disks.yaml @@ -0,0 +1,29 @@ + get: + x-mojo-to: 'Virtualization::VMdisk#getHostVolumeDiskListForVM' + summary: "" + description: "" + operationId: getVmVolumeInfoDiskList + parameters: + - name: VolID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleVolID' + - in: query + name: status + description: "" + required: false + schema: + $ref: '#/components/schemas/VmVolumeStatusQuery' + responses: + 200: + description: "" + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/VmVolumeInfoDisk' + tags: + - VM_Disk diff --git a/scripts/virtualization/vmvols/{VolID}/disks/{VMdiskID}.yaml b/scripts/virtualization/vmvols/{VolID}/disks/{VMdiskID}.yaml new file mode 100644 index 0000000..6d647b5 --- /dev/null +++ b/scripts/virtualization/vmvols/{VolID}/disks/{VMdiskID}.yaml @@ -0,0 +1,27 @@ + get: + x-mojo-to: 'Virtualization::VMdisk#getHostVolumeDiskInfoForVM' + summary: "" + description: "" + operationId: getVmVolumeInfoDiskInfo + parameters: + - name: VolID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleVolID' + - name: VMdiskID + in: path + description: "" + required: true + schema: + $ref: '#/components/schemas/RuleVMdiskID' + responses: + 200: + description: "" + content: + application/json: + schema: + $ref: '#/components/schemas/VmVolumeInfoDisk' + tags: + - VM_Disk From bb670e16f6a30da5cbec6e1b9d5d606af1e5781d Mon Sep 17 00:00:00 2001 From: hgichon Date: Sun, 23 Oct 2022 16:12:39 +0900 Subject: [PATCH 4/4] virtualization api schema yaml added --- .../schema/virtualization/DataSizeUnit.yaml | 7 +++ scripts/schema/virtualization/HostInfo.yaml | 16 +++++++ .../virtualization/HostInfoGeneral.yaml | 14 ++++++ .../virtualization/HostInfoHardware.yaml | 14 ++++++ .../virtualization/HostInfoHardwareCPU.yaml | 17 ++++++++ .../HostInfoHardwareMemory.yaml | 23 ++++++++++ .../HostInfoHardwareNetwork.yaml | 11 +++++ .../HostInfoHardwareStorage.yaml | 41 ++++++++++++++++++ .../virtualization/HostInfoSoftware.yaml | 43 +++++++++++++++++++ .../HostInfoSoftwareNetworkIP.yaml | 16 +++++++ .../HostInfoVirtualNetwork.yaml | 4 ++ .../virtualization/HostInfoVmStatus.yaml | 11 +++++ .../virtualization/HostVmPowerControl.yaml | 7 +++ .../virtualization/OverviewFormat1String.yaml | 8 ++++ .../virtualization/OverviewFormat3Array.yaml | 13 ++++++ scripts/schema/virtualization/RuleDiskID.yaml | 4 ++ scripts/schema/virtualization/RuleHostID.yaml | 4 ++ .../schema/virtualization/RuleHostName.yaml | 3 ++ scripts/schema/virtualization/RuleISOID.yaml | 4 ++ .../schema/virtualization/RuleISOvolID.yaml | 4 ++ .../schema/virtualization/RuleNetworkID.yaml | 4 ++ scripts/schema/virtualization/RuleVMID.yaml | 4 ++ scripts/schema/virtualization/RuleVMName.yaml | 3 ++ .../schema/virtualization/RuleVMStatus.yaml | 6 +++ .../schema/virtualization/RuleVMdiskID.yaml | 4 ++ scripts/schema/virtualization/RuleVolID.yaml | 4 ++ .../schema/virtualization/TreeHostList.yaml | 33 ++++++++++++++ .../virtualization/TreeStatusQuery.yaml | 6 +++ scripts/schema/virtualization/TreeVmList.yaml | 27 ++++++++++++ .../schema/virtualization/VmCDisoInfo.yaml | 18 ++++++++ .../schema/virtualization/VmCDisoVolume.yaml | 12 ++++++ scripts/schema/virtualization/VmInfo.yaml | 22 ++++++++++ scripts/schema/virtualization/VmInfoAdd.yaml | 28 ++++++++++++ scripts/schema/virtualization/VmInfoBoot.yaml | 5 +++ .../schema/virtualization/VmInfoComment.yaml | 4 ++ .../schema/virtualization/VmInfoConsole.yaml | 9 ++++ .../schema/virtualization/VmInfoGeneral.yaml | 8 ++++ .../schema/virtualization/VmInfoHardware.yaml | 16 +++++++ .../virtualization/VmInfoHardwareCDROM.yaml | 9 ++++ .../virtualization/VmInfoHardwareCPU.yaml | 8 ++++ .../virtualization/VmInfoHardwareDisk.yaml | 20 +++++++++ .../virtualization/VmInfoHardwareDiskAdd.yaml | 27 ++++++++++++ .../VmInfoHardwareDiskOption.yaml | 7 +++ .../VmInfoHardwareISOimageMount.yaml | 6 +++ .../virtualization/VmInfoHardwareMemory.yaml | 8 ++++ .../virtualization/VmInfoHardwareNetwork.yaml | 26 +++++++++++ .../VmInfoHardwareNetworkAdd.yaml | 10 +++++ .../VmInfoHardwareNetworkDevice.yaml | 7 +++ .../virtualization/VmInfoHistoryMsg.yaml | 15 +++++++ .../schema/virtualization/VmInfoSummary.yaml | 32 ++++++++++++++ .../virtualization/VmSearchFieldQuery.yaml | 4 ++ .../virtualization/VmSearchNameQuery.yaml | 2 + .../virtualization/VmSearchStatusQuery.yaml | 6 +++ .../virtualization/VmSearchValueQuery.yaml | 1 + .../virtualization/VmVerifyRequest.yaml | 9 ++++ .../virtualization/VmVerifyResponse.yaml | 8 ++++ .../schema/virtualization/VmVolumeInfo.yaml | 16 +++++++ .../virtualization/VmVolumeInfoDisk.yaml | 30 +++++++++++++ .../virtualization/VmVolumeStatusQuery.yaml | 6 +++ .../delHostVmInfoHardwareDiskOpt.yaml | 3 ++ .../schema/virtualization/delHostVmOpt.yaml | 3 ++ 61 files changed, 740 insertions(+) create mode 100644 scripts/schema/virtualization/DataSizeUnit.yaml create mode 100644 scripts/schema/virtualization/HostInfo.yaml create mode 100644 scripts/schema/virtualization/HostInfoGeneral.yaml create mode 100644 scripts/schema/virtualization/HostInfoHardware.yaml create mode 100644 scripts/schema/virtualization/HostInfoHardwareCPU.yaml create mode 100644 scripts/schema/virtualization/HostInfoHardwareMemory.yaml create mode 100644 scripts/schema/virtualization/HostInfoHardwareNetwork.yaml create mode 100644 scripts/schema/virtualization/HostInfoHardwareStorage.yaml create mode 100644 scripts/schema/virtualization/HostInfoSoftware.yaml create mode 100644 scripts/schema/virtualization/HostInfoSoftwareNetworkIP.yaml create mode 100644 scripts/schema/virtualization/HostInfoVirtualNetwork.yaml create mode 100644 scripts/schema/virtualization/HostInfoVmStatus.yaml create mode 100644 scripts/schema/virtualization/HostVmPowerControl.yaml create mode 100644 scripts/schema/virtualization/OverviewFormat1String.yaml create mode 100644 scripts/schema/virtualization/OverviewFormat3Array.yaml create mode 100644 scripts/schema/virtualization/RuleDiskID.yaml create mode 100644 scripts/schema/virtualization/RuleHostID.yaml create mode 100644 scripts/schema/virtualization/RuleHostName.yaml create mode 100644 scripts/schema/virtualization/RuleISOID.yaml create mode 100644 scripts/schema/virtualization/RuleISOvolID.yaml create mode 100644 scripts/schema/virtualization/RuleNetworkID.yaml create mode 100644 scripts/schema/virtualization/RuleVMID.yaml create mode 100644 scripts/schema/virtualization/RuleVMName.yaml create mode 100644 scripts/schema/virtualization/RuleVMStatus.yaml create mode 100644 scripts/schema/virtualization/RuleVMdiskID.yaml create mode 100644 scripts/schema/virtualization/RuleVolID.yaml create mode 100644 scripts/schema/virtualization/TreeHostList.yaml create mode 100644 scripts/schema/virtualization/TreeStatusQuery.yaml create mode 100644 scripts/schema/virtualization/TreeVmList.yaml create mode 100644 scripts/schema/virtualization/VmCDisoInfo.yaml create mode 100644 scripts/schema/virtualization/VmCDisoVolume.yaml create mode 100644 scripts/schema/virtualization/VmInfo.yaml create mode 100644 scripts/schema/virtualization/VmInfoAdd.yaml create mode 100644 scripts/schema/virtualization/VmInfoBoot.yaml create mode 100644 scripts/schema/virtualization/VmInfoComment.yaml create mode 100644 scripts/schema/virtualization/VmInfoConsole.yaml create mode 100644 scripts/schema/virtualization/VmInfoGeneral.yaml create mode 100644 scripts/schema/virtualization/VmInfoHardware.yaml create mode 100644 scripts/schema/virtualization/VmInfoHardwareCDROM.yaml create mode 100644 scripts/schema/virtualization/VmInfoHardwareCPU.yaml create mode 100644 scripts/schema/virtualization/VmInfoHardwareDisk.yaml create mode 100644 scripts/schema/virtualization/VmInfoHardwareDiskAdd.yaml create mode 100644 scripts/schema/virtualization/VmInfoHardwareDiskOption.yaml create mode 100644 scripts/schema/virtualization/VmInfoHardwareISOimageMount.yaml create mode 100644 scripts/schema/virtualization/VmInfoHardwareMemory.yaml create mode 100644 scripts/schema/virtualization/VmInfoHardwareNetwork.yaml create mode 100644 scripts/schema/virtualization/VmInfoHardwareNetworkAdd.yaml create mode 100644 scripts/schema/virtualization/VmInfoHardwareNetworkDevice.yaml create mode 100644 scripts/schema/virtualization/VmInfoHistoryMsg.yaml create mode 100644 scripts/schema/virtualization/VmInfoSummary.yaml create mode 100644 scripts/schema/virtualization/VmSearchFieldQuery.yaml create mode 100644 scripts/schema/virtualization/VmSearchNameQuery.yaml create mode 100644 scripts/schema/virtualization/VmSearchStatusQuery.yaml create mode 100644 scripts/schema/virtualization/VmSearchValueQuery.yaml create mode 100644 scripts/schema/virtualization/VmVerifyRequest.yaml create mode 100644 scripts/schema/virtualization/VmVerifyResponse.yaml create mode 100644 scripts/schema/virtualization/VmVolumeInfo.yaml create mode 100644 scripts/schema/virtualization/VmVolumeInfoDisk.yaml create mode 100644 scripts/schema/virtualization/VmVolumeStatusQuery.yaml create mode 100644 scripts/schema/virtualization/delHostVmInfoHardwareDiskOpt.yaml create mode 100644 scripts/schema/virtualization/delHostVmOpt.yaml diff --git a/scripts/schema/virtualization/DataSizeUnit.yaml b/scripts/schema/virtualization/DataSizeUnit.yaml new file mode 100644 index 0000000..7ee3618 --- /dev/null +++ b/scripts/schema/virtualization/DataSizeUnit.yaml @@ -0,0 +1,7 @@ + type: string + enum: + - "B" + - "KiB" + - "MiB" + - "GiB" + - "TiB" diff --git a/scripts/schema/virtualization/HostInfo.yaml b/scripts/schema/virtualization/HostInfo.yaml new file mode 100644 index 0000000..4cc76c5 --- /dev/null +++ b/scripts/schema/virtualization/HostInfo.yaml @@ -0,0 +1,16 @@ + type: object + properties: + ID: + $ref: '#/components/schemas/RuleHostID' + HostName: + $ref: '#/components/schemas/RuleHostName' + General: + $ref: '#/components/schemas/HostInfoGeneral' + Hardware: + $ref: '#/components/schemas/HostInfoHardware' + Software: + $ref: '#/components/schemas/HostInfoSoftware' + VMStatus: + $ref: '#/components/schemas/HostInfoVmStatus' + VirtualNetworks: + $ref: '#/components/schemas/HostInfoVirtualNetwork' diff --git a/scripts/schema/virtualization/HostInfoGeneral.yaml b/scripts/schema/virtualization/HostInfoGeneral.yaml new file mode 100644 index 0000000..7f3f88b --- /dev/null +++ b/scripts/schema/virtualization/HostInfoGeneral.yaml @@ -0,0 +1,14 @@ + type: object + properties: + OSversion: + type: string + description: "" + example: "AnyStor-E-3.0.6" + EVversion: + type: string + description: "" + example: "1.0" + Uptime: + type: string + description: "" + example: "240 day, 22 hour, 23 minute" diff --git a/scripts/schema/virtualization/HostInfoHardware.yaml b/scripts/schema/virtualization/HostInfoHardware.yaml new file mode 100644 index 0000000..fdf30ea --- /dev/null +++ b/scripts/schema/virtualization/HostInfoHardware.yaml @@ -0,0 +1,14 @@ + type: object + properties: + CPU: + $ref: '#/components/schemas/HostInfoHardwareCPU' + Memory: + $ref: '#/components/schemas/HostInfoHardwareMemory' + Networks: + type: array + items: + $ref: '#/components/schemas/HostInfoHardwareNetwork' + Storages: + type: array + items: + $ref: '#/components/schemas/HostInfoHardwareStorage' diff --git a/scripts/schema/virtualization/HostInfoHardwareCPU.yaml b/scripts/schema/virtualization/HostInfoHardwareCPU.yaml new file mode 100644 index 0000000..e0bb409 --- /dev/null +++ b/scripts/schema/virtualization/HostInfoHardwareCPU.yaml @@ -0,0 +1,17 @@ + type: object + properties: + Architecture: + type: string + example: "x86_64" + Model: + type: string + example: "Intel(R) Xeon(R) Silver 4210 CPU @ 2.20GHz" + CPUs: + type: integer + example: 40 + MaxCPUs: + type: integer + example: 240 + Clocks: + type: string + example: "999 MHz" diff --git a/scripts/schema/virtualization/HostInfoHardwareMemory.yaml b/scripts/schema/virtualization/HostInfoHardwareMemory.yaml new file mode 100644 index 0000000..607fd40 --- /dev/null +++ b/scripts/schema/virtualization/HostInfoHardwareMemory.yaml @@ -0,0 +1,23 @@ + type: object + properties: + Total: + type: number + format: float + example: 65536 + Used: + type: number + format: float + example: 55536 + Free: + type: number + format: float + example: 15536 + Unit: + type: string + enum: + - "B" + - "KiB" + - "MiB" + - "GiB" + default: "MiB" + example: "MiB" diff --git a/scripts/schema/virtualization/HostInfoHardwareNetwork.yaml b/scripts/schema/virtualization/HostInfoHardwareNetwork.yaml new file mode 100644 index 0000000..f0bc373 --- /dev/null +++ b/scripts/schema/virtualization/HostInfoHardwareNetwork.yaml @@ -0,0 +1,11 @@ + type: object + properties: + Name: + type: string + example: "default" + Status: + type: string + enum: + - "active" + - "inactive" + example: "active" diff --git a/scripts/schema/virtualization/HostInfoHardwareStorage.yaml b/scripts/schema/virtualization/HostInfoHardwareStorage.yaml new file mode 100644 index 0000000..f142278 --- /dev/null +++ b/scripts/schema/virtualization/HostInfoHardwareStorage.yaml @@ -0,0 +1,41 @@ + type: object + properties: + Name: + type: string + example: "ISO" + Status: + type: string + example: "running" + AutoStart: + type: boolean + example: true + Persistent: + type: boolean + example: true + Capacity: + type: object + properties: + Total: + type: string + example: "3.12" + TotalUnit: + allOf: + - $ref: '#/components/schemas/DataSizeUnit' + example: "TiB" + Used: + type: string + example: "35.91" + UsedUnit: + allOf: + - $ref: '#/components/schemas/DataSizeUnit' + example: "GiB" + Free: + type: string + example: "2.96" + FreeUnit: + allOf: + - $ref: '#/components/schemas/DataSizeUnit' + example: "TiB" + UseRate: + type: string + example: "2.20" diff --git a/scripts/schema/virtualization/HostInfoSoftware.yaml b/scripts/schema/virtualization/HostInfoSoftware.yaml new file mode 100644 index 0000000..705ed79 --- /dev/null +++ b/scripts/schema/virtualization/HostInfoSoftware.yaml @@ -0,0 +1,43 @@ + type: object + properties: + NetworkIPaddr: + $ref: '#/components/schemas/HostInfoSoftwareNetworkIP' + Package: + type: object + properties: + CompiledAgainstLibrary: + type: object + properties: + Name: + type: string + example: "Compiled Against Library" + Version: + type: string + example: "libvirt 4.5.0" + RunningHypervisor: + type: object + properties: + Name: + type: string + example: "Running Hypervisor" + Version: + type: string + example: "QEMU 1.5.3" + UsingAPI: + type: object + properties: + Name: + type: string + example: "Using API" + Version: + type: string + example: "QEMU 4.5.0" + UsingLibrary: + type: object + properties: + Name: + type: string + example: "Using Library" + Version: + type: string + example: "libvirt 4.5.0" diff --git a/scripts/schema/virtualization/HostInfoSoftwareNetworkIP.yaml b/scripts/schema/virtualization/HostInfoSoftwareNetworkIP.yaml new file mode 100644 index 0000000..654eab1 --- /dev/null +++ b/scripts/schema/virtualization/HostInfoSoftwareNetworkIP.yaml @@ -0,0 +1,16 @@ + type: object + properties: + Management: + type: string + example: "192.168.61.25" + format: "ipv4" + Service: + type: array + items: + type: string + example: "20.20.20.25" + format: "ipv4" + Storage: + type: string + example: "10.10.10.25" + format: "ipv4" diff --git a/scripts/schema/virtualization/HostInfoVirtualNetwork.yaml b/scripts/schema/virtualization/HostInfoVirtualNetwork.yaml new file mode 100644 index 0000000..691c1df --- /dev/null +++ b/scripts/schema/virtualization/HostInfoVirtualNetwork.yaml @@ -0,0 +1,4 @@ + type: array + items: + type: string + example: "virtual-network" diff --git a/scripts/schema/virtualization/HostInfoVmStatus.yaml b/scripts/schema/virtualization/HostInfoVmStatus.yaml new file mode 100644 index 0000000..5b20845 --- /dev/null +++ b/scripts/schema/virtualization/HostInfoVmStatus.yaml @@ -0,0 +1,11 @@ + type: object + properties: + Total: + type: integer + example: 5 + Running: + type: integer + example: 4 + Stopped: + type: integer + example: 1 diff --git a/scripts/schema/virtualization/HostVmPowerControl.yaml b/scripts/schema/virtualization/HostVmPowerControl.yaml new file mode 100644 index 0000000..be7d9d2 --- /dev/null +++ b/scripts/schema/virtualization/HostVmPowerControl.yaml @@ -0,0 +1,7 @@ + type: string + enum: + - "on" + - "off" + - "reboot" + - "shutdown" + - "recycle" diff --git a/scripts/schema/virtualization/OverviewFormat1String.yaml b/scripts/schema/virtualization/OverviewFormat1String.yaml new file mode 100644 index 0000000..5bf7b10 --- /dev/null +++ b/scripts/schema/virtualization/OverviewFormat1String.yaml @@ -0,0 +1,8 @@ + type: object + properties: + Type: + type: string + description: "" + Value: + type: string + description: "" diff --git a/scripts/schema/virtualization/OverviewFormat3Array.yaml b/scripts/schema/virtualization/OverviewFormat3Array.yaml new file mode 100644 index 0000000..a78d0a4 --- /dev/null +++ b/scripts/schema/virtualization/OverviewFormat3Array.yaml @@ -0,0 +1,13 @@ + type: object + properties: + Category: + type: string + description: "" + Type: + type: string + description: "" + Values: + type: array + description: "" + items: + type: string diff --git a/scripts/schema/virtualization/RuleDiskID.yaml b/scripts/schema/virtualization/RuleDiskID.yaml new file mode 100644 index 0000000..ba794ab --- /dev/null +++ b/scripts/schema/virtualization/RuleDiskID.yaml @@ -0,0 +1,4 @@ + type: string + pattern: '^disk\d+$' + description: "" + example: 'disk1' diff --git a/scripts/schema/virtualization/RuleHostID.yaml b/scripts/schema/virtualization/RuleHostID.yaml new file mode 100644 index 0000000..ec87922 --- /dev/null +++ b/scripts/schema/virtualization/RuleHostID.yaml @@ -0,0 +1,4 @@ + type: string + pattern: '^host\d+$' + description: "" + example: 'host1' diff --git a/scripts/schema/virtualization/RuleHostName.yaml b/scripts/schema/virtualization/RuleHostName.yaml new file mode 100644 index 0000000..35f490c --- /dev/null +++ b/scripts/schema/virtualization/RuleHostName.yaml @@ -0,0 +1,3 @@ + type: string + description: "" + example: 'anystor-1' diff --git a/scripts/schema/virtualization/RuleISOID.yaml b/scripts/schema/virtualization/RuleISOID.yaml new file mode 100644 index 0000000..0d8e1aa --- /dev/null +++ b/scripts/schema/virtualization/RuleISOID.yaml @@ -0,0 +1,4 @@ + type: string + pattern: '^iso\d+$' + description: "" + example: 'iso1' diff --git a/scripts/schema/virtualization/RuleISOvolID.yaml b/scripts/schema/virtualization/RuleISOvolID.yaml new file mode 100644 index 0000000..5574aa3 --- /dev/null +++ b/scripts/schema/virtualization/RuleISOvolID.yaml @@ -0,0 +1,4 @@ + type: string + pattern: '^isov\d+$' + description: "" + example: 'isov1' diff --git a/scripts/schema/virtualization/RuleNetworkID.yaml b/scripts/schema/virtualization/RuleNetworkID.yaml new file mode 100644 index 0000000..c15f255 --- /dev/null +++ b/scripts/schema/virtualization/RuleNetworkID.yaml @@ -0,0 +1,4 @@ + type: string + pattern: '^net\d+$' + description: "" + example: 'net1' diff --git a/scripts/schema/virtualization/RuleVMID.yaml b/scripts/schema/virtualization/RuleVMID.yaml new file mode 100644 index 0000000..e263801 --- /dev/null +++ b/scripts/schema/virtualization/RuleVMID.yaml @@ -0,0 +1,4 @@ + type: string + pattern: '^vm\d+$' + description: "" + example: 'vm1' diff --git a/scripts/schema/virtualization/RuleVMName.yaml b/scripts/schema/virtualization/RuleVMName.yaml new file mode 100644 index 0000000..76ac2e5 --- /dev/null +++ b/scripts/schema/virtualization/RuleVMName.yaml @@ -0,0 +1,3 @@ + type: string + description: "" + example: 'vm-1' diff --git a/scripts/schema/virtualization/RuleVMStatus.yaml b/scripts/schema/virtualization/RuleVMStatus.yaml new file mode 100644 index 0000000..7dabeae --- /dev/null +++ b/scripts/schema/virtualization/RuleVMStatus.yaml @@ -0,0 +1,6 @@ + type: string + description: "" + enum: + - "running" + - "stopped" + example: "running" diff --git a/scripts/schema/virtualization/RuleVMdiskID.yaml b/scripts/schema/virtualization/RuleVMdiskID.yaml new file mode 100644 index 0000000..59eeac6 --- /dev/null +++ b/scripts/schema/virtualization/RuleVMdiskID.yaml @@ -0,0 +1,4 @@ + type: string + pattern: '^vmd\d+$' + description: "" + example: 'vmd1' diff --git a/scripts/schema/virtualization/RuleVolID.yaml b/scripts/schema/virtualization/RuleVolID.yaml new file mode 100644 index 0000000..44eed2d --- /dev/null +++ b/scripts/schema/virtualization/RuleVolID.yaml @@ -0,0 +1,4 @@ + type: string + pattern: '^vol\d+$' + description: "" + example: 'vol1' diff --git a/scripts/schema/virtualization/TreeHostList.yaml b/scripts/schema/virtualization/TreeHostList.yaml new file mode 100644 index 0000000..9e92065 --- /dev/null +++ b/scripts/schema/virtualization/TreeHostList.yaml @@ -0,0 +1,33 @@ + type: object + properties: + id: + $ref: '#/components/schemas/RuleHostID' + key: + type: string + description: "{Host_ID}" + example: "host1" + text: + $ref: '#/components/schemas/RuleHostName' + ManagementIp: + type: string + example: "192.168.61.25" + format: "ipv4" + entity: + type: array + description: "Virtual Machine List" + items: + $ref: '#/components/schemas/TreeVmList' + iconCls: + type: string + description: " Web UI Icon info." + enum: + - "t-icon-host" + example: "t-icon-host" + Type: + type: string + description: "Machine Type" + default: "host" + expanded: + type: boolean + description: "Web UI Tree" + example: true diff --git a/scripts/schema/virtualization/TreeStatusQuery.yaml b/scripts/schema/virtualization/TreeStatusQuery.yaml new file mode 100644 index 0000000..9479fea --- /dev/null +++ b/scripts/schema/virtualization/TreeStatusQuery.yaml @@ -0,0 +1,6 @@ + type: string + enum: + - "all" + - "running" + - "stopped" + default: "all" diff --git a/scripts/schema/virtualization/TreeVmList.yaml b/scripts/schema/virtualization/TreeVmList.yaml new file mode 100644 index 0000000..3ce51c9 --- /dev/null +++ b/scripts/schema/virtualization/TreeVmList.yaml @@ -0,0 +1,27 @@ + type: object + properties: + id: + $ref: '#/components/schemas/RuleVMID' + key: + type: string + description: "{Host_ID}-{VM_ID}" + example: "host1-vm1" + text: + $ref: '#/components/schemas/RuleVMName' + Status: + $ref: '#/components/schemas/RuleVMStatus' + Type: + type: string + description: "Machine Type" + default: "machine" + iconCls: + type: string + description: "Web UI Icon info." + enum: + - "t-icon-vm-on" + - "t-icon-vm-off" + example: "t-icon-vm-on" + leaf: + type: boolean + description: "Web UI Tree" + example: true diff --git a/scripts/schema/virtualization/VmCDisoInfo.yaml b/scripts/schema/virtualization/VmCDisoInfo.yaml new file mode 100644 index 0000000..c575fa9 --- /dev/null +++ b/scripts/schema/virtualization/VmCDisoInfo.yaml @@ -0,0 +1,18 @@ + type: object + properties: + ID: + $ref: '#/components/schemas/RuleISOID' + Name: + type: string + description: "" + example: "Linux_CentOS7_ISO" + VolID: + $ref: '#/components/schemas/RuleISOvolID' + VolName: + type: string + description: "" + example: "Storage" + Summary: + type: string + description: "" + example: "VM-Linux_CentOS7_ISO" diff --git a/scripts/schema/virtualization/VmCDisoVolume.yaml b/scripts/schema/virtualization/VmCDisoVolume.yaml new file mode 100644 index 0000000..f8f8739 --- /dev/null +++ b/scripts/schema/virtualization/VmCDisoVolume.yaml @@ -0,0 +1,12 @@ + type: object + properties: + ID: + $ref: '#/components/schemas/RuleISOvolID' + Name: + type: string + description: "" + example: "Storage" + Summary: + type: string + description: "" + example: "Storage (100T,Cluster)" diff --git a/scripts/schema/virtualization/VmInfo.yaml b/scripts/schema/virtualization/VmInfo.yaml new file mode 100644 index 0000000..adac431 --- /dev/null +++ b/scripts/schema/virtualization/VmInfo.yaml @@ -0,0 +1,22 @@ + type: object + properties: + ID: + $ref: '#/components/schemas/RuleVMID' + Name: + $ref: '#/components/schemas/RuleVMName' + HostID: + $ref: '#/components/schemas/RuleHostID' + HostName: + $ref: '#/components/schemas/RuleHostName' + General: + $ref: '#/components/schemas/VmInfoGeneral' + Hardware: + $ref: '#/components/schemas/VmInfoHardware' + BootOption: + $ref: '#/components/schemas/VmInfoBoot' + Histories: + type: array + items: + $ref: '#/components/schemas/VmInfoHistoryMsg' + Comment: + $ref: '#/components/schemas/VmInfoComment' diff --git a/scripts/schema/virtualization/VmInfoAdd.yaml b/scripts/schema/virtualization/VmInfoAdd.yaml new file mode 100644 index 0000000..b245289 --- /dev/null +++ b/scripts/schema/virtualization/VmInfoAdd.yaml @@ -0,0 +1,28 @@ + type: object + properties: + Name: + $ref: '#/components/schemas/RuleVMName' + HostID: + $ref: '#/components/schemas/RuleHostID' + BasicCPU: + type: number + description: "" + example: 2 + MaxCPU: + type: number + description: "" + example: 4 + BasicMemG: + type: number + description: "" + example: 4 + MaxMemG: + type: number + description: "" + example: 8 + OSdisk: + $ref: '#/components/schemas/VmInfoHardwareDiskAdd' + Network: + $ref: '#/components/schemas/VmInfoHardwareNetworkAdd' + CDROM: + $ref: '#/components/schemas/VmInfoHardwareCDROM' diff --git a/scripts/schema/virtualization/VmInfoBoot.yaml b/scripts/schema/virtualization/VmInfoBoot.yaml new file mode 100644 index 0000000..4116bbb --- /dev/null +++ b/scripts/schema/virtualization/VmInfoBoot.yaml @@ -0,0 +1,5 @@ + type: object + properties: + AutoStart: + type: boolean + default: false diff --git a/scripts/schema/virtualization/VmInfoComment.yaml b/scripts/schema/virtualization/VmInfoComment.yaml new file mode 100644 index 0000000..10a53d1 --- /dev/null +++ b/scripts/schema/virtualization/VmInfoComment.yaml @@ -0,0 +1,4 @@ + type: array + items: + type: string + example: "This is Memo" diff --git a/scripts/schema/virtualization/VmInfoConsole.yaml b/scripts/schema/virtualization/VmInfoConsole.yaml new file mode 100644 index 0000000..6be159b --- /dev/null +++ b/scripts/schema/virtualization/VmInfoConsole.yaml @@ -0,0 +1,9 @@ + type: object + properties: + token: + type: string + format: "7afJ3282nFEh" + url: + type: string + example: "http://192.168.61.25/path=?t2F7ewrf7eSHneH" + format: url diff --git a/scripts/schema/virtualization/VmInfoGeneral.yaml b/scripts/schema/virtualization/VmInfoGeneral.yaml new file mode 100644 index 0000000..e9b7a73 --- /dev/null +++ b/scripts/schema/virtualization/VmInfoGeneral.yaml @@ -0,0 +1,8 @@ + type: object + properties: + Status: + $ref: '#/components/schemas/RuleVMStatus' + Uptime: + type: string + description: "" + example: "240 day, 22 hour, 23 minute" diff --git a/scripts/schema/virtualization/VmInfoHardware.yaml b/scripts/schema/virtualization/VmInfoHardware.yaml new file mode 100644 index 0000000..25bfbe7 --- /dev/null +++ b/scripts/schema/virtualization/VmInfoHardware.yaml @@ -0,0 +1,16 @@ + type: object + properties: + CPU: + $ref: '#/components/schemas/VmInfoHardwareCPU' + Memory: + $ref: '#/components/schemas/VmInfoHardwareMemory' + CDROM: + $ref: '#/components/schemas/VmInfoHardwareCDROM' + Disks: + type: array + items: + $ref: '#/components/schemas/VmInfoHardwareDisk' + Networks: + type: array + items: + $ref: '#/components/schemas/VmInfoHardwareNetwork' diff --git a/scripts/schema/virtualization/VmInfoHardwareCDROM.yaml b/scripts/schema/virtualization/VmInfoHardwareCDROM.yaml new file mode 100644 index 0000000..67999ed --- /dev/null +++ b/scripts/schema/virtualization/VmInfoHardwareCDROM.yaml @@ -0,0 +1,9 @@ + type: object + properties: + Volume: + type: string + ISOname: + type: string + Mounted: + type: boolean + example: true diff --git a/scripts/schema/virtualization/VmInfoHardwareCPU.yaml b/scripts/schema/virtualization/VmInfoHardwareCPU.yaml new file mode 100644 index 0000000..f8d8ea6 --- /dev/null +++ b/scripts/schema/virtualization/VmInfoHardwareCPU.yaml @@ -0,0 +1,8 @@ + type: object + properties: + BasicCPU: + type: string + example: "4" + MaxCPU: + type: string + example: "8" diff --git a/scripts/schema/virtualization/VmInfoHardwareDisk.yaml b/scripts/schema/virtualization/VmInfoHardwareDisk.yaml new file mode 100644 index 0000000..fc01673 --- /dev/null +++ b/scripts/schema/virtualization/VmInfoHardwareDisk.yaml @@ -0,0 +1,20 @@ + type: object + properties: + ID: + $ref: '#/components/schemas/RuleDiskID' + Volume: + type: string + DiskName: + type: string + Capacity: + type: string + Type: + type: string + enum: + - "qcow2" + - "raw" + Driver: + type: string + enum: + - "virtio" + - "sata" diff --git a/scripts/schema/virtualization/VmInfoHardwareDiskAdd.yaml b/scripts/schema/virtualization/VmInfoHardwareDiskAdd.yaml new file mode 100644 index 0000000..be4ba1f --- /dev/null +++ b/scripts/schema/virtualization/VmInfoHardwareDiskAdd.yaml @@ -0,0 +1,27 @@ + type: object + properties: + VolumeName: + type: string + description: "" + example: "Storage" + DiskName: + type: string + description: "" + example: "disk-1" + NewDisk: + type: boolean + description: "" + NewCapacity: + type: number + description: "" + example: 500 + NewDiskType: + type: string + enum: + - "qcow2" + - "raw" + Driver: + type: string + enum: + - "virtio" + - "sata" diff --git a/scripts/schema/virtualization/VmInfoHardwareDiskOption.yaml b/scripts/schema/virtualization/VmInfoHardwareDiskOption.yaml new file mode 100644 index 0000000..d5f43c8 --- /dev/null +++ b/scripts/schema/virtualization/VmInfoHardwareDiskOption.yaml @@ -0,0 +1,7 @@ + type: object + properties: + Driver: + type: string + enum: + - "virtio" + - "sata" diff --git a/scripts/schema/virtualization/VmInfoHardwareISOimageMount.yaml b/scripts/schema/virtualization/VmInfoHardwareISOimageMount.yaml new file mode 100644 index 0000000..fc67d31 --- /dev/null +++ b/scripts/schema/virtualization/VmInfoHardwareISOimageMount.yaml @@ -0,0 +1,6 @@ + type: object + properties: + Volume: + type: string + ISOname: + type: string diff --git a/scripts/schema/virtualization/VmInfoHardwareMemory.yaml b/scripts/schema/virtualization/VmInfoHardwareMemory.yaml new file mode 100644 index 0000000..9bca19b --- /dev/null +++ b/scripts/schema/virtualization/VmInfoHardwareMemory.yaml @@ -0,0 +1,8 @@ + type: object + properties: + BasicMemG: + type: string + example: "8" + MaxMemG: + type: string + example: "16" diff --git a/scripts/schema/virtualization/VmInfoHardwareNetwork.yaml b/scripts/schema/virtualization/VmInfoHardwareNetwork.yaml new file mode 100644 index 0000000..b19fed9 --- /dev/null +++ b/scripts/schema/virtualization/VmInfoHardwareNetwork.yaml @@ -0,0 +1,26 @@ + type: object + properties: + ID: + $ref: '#/components/schemas/RuleNetworkID' + vNetwork: + type: string + example: "virbr0" + Type: + type: string + example: "NAT Network" + Driver: + type: string + enum: + - "e1000" + - "virtio" + HWaddr: + type: string + example: "00:0C:29:7A:28:12" + Interface: + type: string + example: "vnet0" + IPaddr: + type: string + format: ipv4 + LinkUp: + type: boolean diff --git a/scripts/schema/virtualization/VmInfoHardwareNetworkAdd.yaml b/scripts/schema/virtualization/VmInfoHardwareNetworkAdd.yaml new file mode 100644 index 0000000..d71bad5 --- /dev/null +++ b/scripts/schema/virtualization/VmInfoHardwareNetworkAdd.yaml @@ -0,0 +1,10 @@ + type: object + properties: + vNetwork: + type: string + example: "virbr0" + Driver: + type: string + enum: + - "e1000" + - "virtio" diff --git a/scripts/schema/virtualization/VmInfoHardwareNetworkDevice.yaml b/scripts/schema/virtualization/VmInfoHardwareNetworkDevice.yaml new file mode 100644 index 0000000..b4524d3 --- /dev/null +++ b/scripts/schema/virtualization/VmInfoHardwareNetworkDevice.yaml @@ -0,0 +1,7 @@ + type: object + properties: + Driver: + type: string + enum: + - "e1000" + - "virtio" diff --git a/scripts/schema/virtualization/VmInfoHistoryMsg.yaml b/scripts/schema/virtualization/VmInfoHistoryMsg.yaml new file mode 100644 index 0000000..08597b7 --- /dev/null +++ b/scripts/schema/virtualization/VmInfoHistoryMsg.yaml @@ -0,0 +1,15 @@ + type: object + properties: + Time: + type: number + format: int32 + example: 1647311136 + DateTime: + type: string + example: "2022/03/14 22:25:36" + Work: + type: string + example: "VM is starting" + Result: + type: boolean + example: true diff --git a/scripts/schema/virtualization/VmInfoSummary.yaml b/scripts/schema/virtualization/VmInfoSummary.yaml new file mode 100644 index 0000000..943338d --- /dev/null +++ b/scripts/schema/virtualization/VmInfoSummary.yaml @@ -0,0 +1,32 @@ + type: object + properties: + ID: + $ref: '#/components/schemas/RuleVMID' + Name: + $ref: '#/components/schemas/RuleVMName' + HostID: + $ref: '#/components/schemas/RuleHostID' + HostName: + $ref: '#/components/schemas/RuleHostName' + Status: + $ref: '#/components/schemas/RuleVMStatus' + Uptime: + type: string + description: "" + example: "240 day, 22 hour, 23 minute" + UseCPU: + type: string + description: "" + example: "80 %" + UseMemory: + type: string + description: "" + example: "65 %" + DiskIO: + type: string + description: "" + example: "R: 629.12 KiB, W: 2.43 MiB" + NetworkIO: + type: string + description: "" + example: "R: 51.96 MiB, T: 3.59 MiB" diff --git a/scripts/schema/virtualization/VmSearchFieldQuery.yaml b/scripts/schema/virtualization/VmSearchFieldQuery.yaml new file mode 100644 index 0000000..5f16cf1 --- /dev/null +++ b/scripts/schema/virtualization/VmSearchFieldQuery.yaml @@ -0,0 +1,4 @@ + type: string + enum: + - "name" + default: "name" diff --git a/scripts/schema/virtualization/VmSearchNameQuery.yaml b/scripts/schema/virtualization/VmSearchNameQuery.yaml new file mode 100644 index 0000000..26cfa96 --- /dev/null +++ b/scripts/schema/virtualization/VmSearchNameQuery.yaml @@ -0,0 +1,2 @@ + type: string + default: "name" diff --git a/scripts/schema/virtualization/VmSearchStatusQuery.yaml b/scripts/schema/virtualization/VmSearchStatusQuery.yaml new file mode 100644 index 0000000..9479fea --- /dev/null +++ b/scripts/schema/virtualization/VmSearchStatusQuery.yaml @@ -0,0 +1,6 @@ + type: string + enum: + - "all" + - "running" + - "stopped" + default: "all" diff --git a/scripts/schema/virtualization/VmSearchValueQuery.yaml b/scripts/schema/virtualization/VmSearchValueQuery.yaml new file mode 100644 index 0000000..115d67c --- /dev/null +++ b/scripts/schema/virtualization/VmSearchValueQuery.yaml @@ -0,0 +1 @@ + type: string diff --git a/scripts/schema/virtualization/VmVerifyRequest.yaml b/scripts/schema/virtualization/VmVerifyRequest.yaml new file mode 100644 index 0000000..feedaf8 --- /dev/null +++ b/scripts/schema/virtualization/VmVerifyRequest.yaml @@ -0,0 +1,9 @@ + type: object + properties: + Value: + type: string + VerifyType: + type: string + enum: + - "name" + default: "name" diff --git a/scripts/schema/virtualization/VmVerifyResponse.yaml b/scripts/schema/virtualization/VmVerifyResponse.yaml new file mode 100644 index 0000000..a37d874 --- /dev/null +++ b/scripts/schema/virtualization/VmVerifyResponse.yaml @@ -0,0 +1,8 @@ + type: object + properties: + Return: + type: boolean + ReturnCode: + type: number + ReturnMsg: + type: string diff --git a/scripts/schema/virtualization/VmVolumeInfo.yaml b/scripts/schema/virtualization/VmVolumeInfo.yaml new file mode 100644 index 0000000..ea47bdd --- /dev/null +++ b/scripts/schema/virtualization/VmVolumeInfo.yaml @@ -0,0 +1,16 @@ + type: object + properties: + ID: + $ref: '#/components/schemas/RuleVolID' + Name: + type: string + description: "" + example: "Storage" + SizeG: + type: string + description: "" + example: "200" + Summary: + type: string + description: "" + example: "Storage (200 GiB)" diff --git a/scripts/schema/virtualization/VmVolumeInfoDisk.yaml b/scripts/schema/virtualization/VmVolumeInfoDisk.yaml new file mode 100644 index 0000000..6f79fdf --- /dev/null +++ b/scripts/schema/virtualization/VmVolumeInfoDisk.yaml @@ -0,0 +1,30 @@ + type: object + properties: + ID: + $ref: '#/components/schemas/RuleVMdiskID' + Name: + type: string + description: "" + example: "VM-100_OS_Disk" + VolID: + $ref: '#/components/schemas/RuleVolID' + VolName: + type: string + description: "" + example: "Storage" + Format: + type: string + description: "" + example: "qcow2" + SizeG: + type: string + description: "" + example: "20" + Summary: + type: string + description: "" + example: "VM-100_OS_Disk (20 GiB,qcow2)" + Used: + type: string + description: "" + example: "VM-100" diff --git a/scripts/schema/virtualization/VmVolumeStatusQuery.yaml b/scripts/schema/virtualization/VmVolumeStatusQuery.yaml new file mode 100644 index 0000000..f9df712 --- /dev/null +++ b/scripts/schema/virtualization/VmVolumeStatusQuery.yaml @@ -0,0 +1,6 @@ + type: string + enum: + - "all" + - "used" + - "unused" + default: "all" diff --git a/scripts/schema/virtualization/delHostVmInfoHardwareDiskOpt.yaml b/scripts/schema/virtualization/delHostVmInfoHardwareDiskOpt.yaml new file mode 100644 index 0000000..6b64643 --- /dev/null +++ b/scripts/schema/virtualization/delHostVmInfoHardwareDiskOpt.yaml @@ -0,0 +1,3 @@ + type: boolean + description: "" + default: false diff --git a/scripts/schema/virtualization/delHostVmOpt.yaml b/scripts/schema/virtualization/delHostVmOpt.yaml new file mode 100644 index 0000000..6b64643 --- /dev/null +++ b/scripts/schema/virtualization/delHostVmOpt.yaml @@ -0,0 +1,3 @@ + type: boolean + description: "" + default: false