[Kimchi-devel] [PATCH V3 1/6] Add a control.vm module

Aline Manera alinefm at linux.vnet.ibm.com
Fri Jan 24 02:39:36 UTC 2014


Reviewed-by: Aline Manera <alinefm at linux.vnet.ibm.com>

On 01/24/2014 12:03 AM, shaohef at linux.vnet.ibm.com wrote:
> From: ShaoHe Feng <shaohef at linux.vnet.ibm.com>
>
> All vm devices should be in this module
>
> Signed-off-by: ShaoHe Feng <shaohef at linux.vnet.ibm.com>
> Signed-off-by: Royce Lv <lvroyce at linux.vnet.ibm.com>
> ---
>   Makefile.am                       |  1 +
>   configure.ac                      |  1 +
>   contrib/kimchi.spec.fedora.in     |  1 +
>   contrib/kimchi.spec.suse.in       |  1 +
>   src/kimchi/control/Makefile.am    |  2 ++
>   src/kimchi/control/vm/Makefile.am | 32 ++++++++++++++++++++++++++++++++
>   src/kimchi/control/vm/__init__.py | 30 ++++++++++++++++++++++++++++++
>   7 files changed, 68 insertions(+)
>   create mode 100644 src/kimchi/control/vm/Makefile.am
>   create mode 100644 src/kimchi/control/vm/__init__.py
>
> diff --git a/Makefile.am b/Makefile.am
> index 9ccac0e..68cec3b 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -46,6 +46,7 @@ PEP8_WHITELIST = \
>   	src/kimchi/cachebust.py \
>   	src/kimchi/config.py.in \
>   	src/kimchi/control/*.py \
> +	src/kimchi/control/vm/*.py \
>   	src/kimchi/disks.py \
>   	src/kimchi/distroloader.py \
>   	src/kimchi/exception.py \
> diff --git a/configure.ac b/configure.ac
> index aaed9de..27c8840 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -54,6 +54,7 @@ AC_CONFIG_FILES([
>       src/distros.d/Makefile
>       src/kimchi/Makefile
>       src/kimchi/control/Makefile
> +    src/kimchi/control/vm/Makefile
>       plugins/Makefile
>       plugins/sample/Makefile
>       plugins/sample/ui/Makefile
> diff --git a/contrib/kimchi.spec.fedora.in b/contrib/kimchi.spec.fedora.in
> index 4505d9d..f712dc2 100644
> --- a/contrib/kimchi.spec.fedora.in
> +++ b/contrib/kimchi.spec.fedora.in
> @@ -139,6 +139,7 @@ rm -rf $RPM_BUILD_ROOT
>   %{_bindir}/kimchid
>   %{python_sitelib}/kimchi/*.py*
>   %{python_sitelib}/kimchi/control/*.py*
> +%{python_sitelib}/kimchi/control/vm/*.py*
>   %{python_sitelib}/kimchi/API.json
>   %{_datadir}/kimchi/doc/API.md
>   %{_datadir}/kimchi/doc/README.md
> diff --git a/contrib/kimchi.spec.suse.in b/contrib/kimchi.spec.suse.in
> index a178442..5711604 100644
> --- a/contrib/kimchi.spec.suse.in
> +++ b/contrib/kimchi.spec.suse.in
> @@ -61,6 +61,7 @@ rm -rf $RPM_BUILD_ROOT
>   %{_bindir}/kimchid
>   %{python_sitelib}/kimchi/*.py*
>   %{python_sitelib}/kimchi/control/*.py*
> +%{python_sitelib}/kimchi/control/vm/*.py*
>   %{python_sitelib}/kimchi/API.json
>   %{_datadir}/kimchi/doc/API.md
>   %{_datadir}/kimchi/doc/README.md
> diff --git a/src/kimchi/control/Makefile.am b/src/kimchi/control/Makefile.am
> index 925c593..42f62c3 100644
> --- a/src/kimchi/control/Makefile.am
> +++ b/src/kimchi/control/Makefile.am
> @@ -20,6 +20,8 @@
>   # License along with this library; if not, write to the Free Software
>   # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
>
> +SUBDIRS = vm
> +
>   control_PYTHON = *.py
>
>   controldir = $(pythondir)/kimchi/control
> diff --git a/src/kimchi/control/vm/Makefile.am b/src/kimchi/control/vm/Makefile.am
> new file mode 100644
> index 0000000..17340af
> --- /dev/null
> +++ b/src/kimchi/control/vm/Makefile.am
> @@ -0,0 +1,32 @@
> +#
> +# Kimchi
> +#
> +# Copyright IBM Corp, 2013
> +#
> +# Authors:
> +#  ShaoHe Feng <shaohef at linux.vnet.ibm.com>
> +#  Royce Lv <lvroyce at linux.vnet.ibm.com>
> +#
> +# 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, write to the Free Software
> +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
> +
> +
> +vm_PYTHON = \
> +	__init__.py
> +
> +
> +vmdir = $(pythondir)/kimchi/control/vm
> +
> +install-data-local:
> +	$(MKDIR_P) $(DESTDIR)$(vmdir)
> diff --git a/src/kimchi/control/vm/__init__.py b/src/kimchi/control/vm/__init__.py
> new file mode 100644
> index 0000000..c430d2f
> --- /dev/null
> +++ b/src/kimchi/control/vm/__init__.py
> @@ -0,0 +1,30 @@
> +#
> +# Project Kimchi
> +#
> +# Copyright IBM, Corp. 2013
> +#
> +# Authors:
> +#  ShaoHe Feng <shaohef at linux.vnet.ibm.com>
> +#  Royce Lv <lvroyce at linux.vnet.ibm.com>
> +#
> +# 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, write to the Free Software
> +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
> +
> +import os
> +
> +
> +from kimchi.control.utils import load_url_sub_node
> +
> +
> +sub_nodes = load_url_sub_node(os.path.dirname(__file__), __name__)




More information about the Kimchi-devel mailing list