Add the mofs and registration of the new virtual contoller device, which
will be a subclass of the CIM_Controller class.
Signed-off-by: John Ferlan <jferlan(a)redhat.com>
---
Makefile.am | 2 ++
libvirt-cim.spec.in | 2 ++
schema/Controller.mof | 47 ++++++++++++++++++++++++++++++++++++++++++
schema/Controller.registration | 19 +++++++++++++++++
4 files changed, 70 insertions(+)
create mode 100644 schema/Controller.mof
create mode 100644 schema/Controller.registration
diff --git a/Makefile.am b/Makefile.am
index 69b65cf..864047c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -53,6 +53,7 @@ MOFS = \
$(top_srcdir)/schema/KVMRedirectionSAP.mof \
$(top_srcdir)/schema/DisplayController.mof \
$(top_srcdir)/schema/PointingDevice.mof \
+ $(top_srcdir)/schema/Controller.mof \
$(top_srcdir)/schema/GraphicsPool.mof \
$(top_srcdir)/schema/InputPool.mof \
$(top_srcdir)/schema/HostedAccessPoint.mof \
@@ -143,6 +144,7 @@ REGS = \
$(top_srcdir)/schema/KVMRedirectionSAP.registration \
$(top_srcdir)/schema/DisplayController.registration \
$(top_srcdir)/schema/PointingDevice.registration \
+ $(top_srcdir)/schema/Controller.registration \
$(top_srcdir)/schema/GraphicsPool.registration \
$(top_srcdir)/schema/InputPool.registration \
$(top_srcdir)/schema/HostedAccessPoint.registration \
diff --git a/libvirt-cim.spec.in b/libvirt-cim.spec.in
index 01ee329..4e331d9 100644
--- a/libvirt-cim.spec.in
+++ b/libvirt-cim.spec.in
@@ -111,6 +111,7 @@ rm -fr $RPM_BUILD_ROOT
%{_datadir}/%{name}/KVMRedirectionSAP.registration \\\
%{_datadir}/%{name}/DisplayController.registration \\\
%{_datadir}/%{name}/PointingDevice.registration \\\
+ %{_datadir}/%{name}/Controller.registration \\\
%{_datadir}/%{name}/GraphicsPool.registration \\\
%{_datadir}/%{name}/InputPool.registration \\\
%{_datadir}/%{name}/HostedAccessPoint.registration \\\
@@ -172,6 +173,7 @@ rm -fr $RPM_BUILD_ROOT
%{_datadir}/%{name}/KVMRedirectionSAP.mof \\\
%{_datadir}/%{name}/DisplayController.mof \\\
%{_datadir}/%{name}/PointingDevice.mof \\\
+ %{_datadir}/%{name}/Controller.mof \\\
%{_datadir}/%{name}/GraphicsPool.mof \\\
%{_datadir}/%{name}/InputPool.mof \\\
%{_datadir}/%{name}/HostedAccessPoint.mof \\\
diff --git a/schema/Controller.mof b/schema/Controller.mof
new file mode 100644
index 0000000..a8cb06a
--- /dev/null
+++ b/schema/Controller.mof
@@ -0,0 +1,47 @@
+
+// Copyright Red Hat Corp. 2014
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library. If not, see
+// <
http://www.gnu.org/licenses/>.
+//
+
+[Description ("KVM virtual controller device. It is identified by: "
+ "CIM_Controller.ProtocolSupported which is set to the "
+ "libvirt controller 'type' value converted to an uint16.
"
+ "Additionally, the libvirt 'model' field will be used to
"
+ "set the CIM_Controller.ProtocolDescription."),
+ Provider("cmpi::Virt_Device")
+]
+class KVM_Controller : CIM_Controller
+{
+ [Description ("Order in which the bus controller is encountered. "
+ "The order is controller type scoped.")]
+ uint64 Index;
+
+ [Description ("The 'virtio-serial' controller optionally uses the
Ports "
+ "and Vectors to control how many devices can be connected
"
+ "through the controller.")]
+ string Ports;
+ string Vectors;
+
+ [Description ("Optional number of queues for the controller.")]
+ string Queues;
+
+ [Description ("For controllers that are themselves devices on a "
+ "bus an optional element to specify the exact "
+ "relationship of the controller to its master bus. "
+ "Stored in the property and value arrays.")]
+ string AddressProperties[];
+ string AddressValues[];
+};
diff --git a/schema/Controller.registration b/schema/Controller.registration
new file mode 100644
index 0000000..7e06331
--- /dev/null
+++ b/schema/Controller.registration
@@ -0,0 +1,19 @@
+# Copyright Red Hat Corp. 2014
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library. If not, see
+# <
http://www.gnu.org/licenses/>.
+#
+
+# Classname Namespace ProviderName ProviderModule ProviderTypes
+KVM_Controller root/virt Virt_Device Virt_Device instance
--
1.8.5.3