Add these XML formats validation in manpage or script:
cpu, domainbackup, domaincaps, domaincheckpoint, networkport,
storagepoolcaps.
Signed-off-by: Han Han <hhan@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Valid schema names currently include
+- ``cpu``
+
+The schema for the XML format of cpu
+
- ``domainsnapshot``
The schema for the XML format used by domain snapshot configuration
+- ``domaincheckpoint``
+
+The schema for the XML format used by domain checkpoint configuration
+
+- ``domainbackup``
+
+The schema for the XML format used by domain backup configuration
+
+- ``domaincaps``
+
+The schema for the XML format of domain capabilities
+
- ``domain``
The schema for the XML format used by guest domains configuration
+- ``networkport``
+
+The schema for the XML format used by network port configuration
+
- ``network``
The schema for the XML format used by virtual network configuration
+- ``storagepoolcaps``
+
+The schema for the XML format of storage pool capabilities
+
- ``storagepool``
The schema for the XML format used by storage pool configuration
ROOT=`xmllint --stream --debug "$XMLFILE" 2>/dev/null | grep "^0 1 " | awk '{ print $3 }'`
fi
case "$ROOT" in
+ *cpu*)
+ TYPE="cpu"
+ ;;
*domainsnapshot*) # Must come first, since *domain* is a substring
TYPE="domainsnapshot"
;;
+ *domaincheckpoint*)
+ TYPE="domaincheckpoint"
+ ;;
+ *domainbackup*)
+ TYPE="domainbackup"
+ ;;
+ *domaincaps*)
+ TYPE="domaincaps"
+ ;;
*domain*)
TYPE="domain"
;;
*network*)
TYPE="network"
;;
+ *storagepoolcaps*)
+ TYPE="storagepoolcaps"
+ ;;
*pool*)
TYPE="storagepool"
;;