Vinzenz Feenstra has uploaded a new change for review.

Change subject: Introduction of the ovirtga package
......................................................................

Introduction of the ovirtga package

Change-Id: Ibaad3cdcd7407dd4ee9a1fb7617c7eb4c76d1847
Signed-off-by: Vinzenz Feenstra <[email protected]>
---
M configure.ac
M ovirt-guest-agent.rhel6.spec
M ovirt-guest-agent.spec
M ovirt-guest-agent/Makefile.am
M ovirt-guest-agent/OVirtGuestService.py
M ovirt-guest-agent/ovirt-guest-agent.py
A ovirt-guest-agent/ovirtga/Makefile.am
A ovirt-guest-agent/ovirtga/__init__.py
R ovirt-guest-agent/ovirtga/credserver.py
R ovirt-guest-agent/ovirtga/linux.py
R ovirt-guest-agent/ovirtga/logic.py
R ovirt-guest-agent/ovirtga/virtio.py
R ovirt-guest-agent/ovirtga/win32.py
R ovirt-guest-agent/ovirtga/winfile.py
14 files changed, 75 insertions(+), 21 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-guest-agent 
refs/changes/46/28046/1

diff --git a/configure.ac b/configure.ac
index 1a3a6f3..f60e052 100644
--- a/configure.ac
+++ b/configure.ac
@@ -229,6 +229,7 @@
 AC_CONFIG_FILES([
     Makefile
     GinaSSO/Makefile
+    ovirt-guest-agent/ovirtga/Makefile
     ovirt-guest-agent/Makefile
     ovirt-guest-agent/ovirt-guest-agent
     ovirt-guest-agent/consoleapps/Makefile
diff --git a/ovirt-guest-agent.rhel6.spec b/ovirt-guest-agent.rhel6.spec
index 7cff303..dd87854 100644
--- a/ovirt-guest-agent.rhel6.spec
+++ b/ovirt-guest-agent.rhel6.spec
@@ -115,10 +115,13 @@
 
 %attr (755,root,root) %{_datadir}/ovirt-guest-agent/ovirt-guest-agent.py*
 
-%{_datadir}/ovirt-guest-agent/OVirtAgentLogic.py*
-%{_datadir}/ovirt-guest-agent/VirtIoChannel.py*
-%{_datadir}/ovirt-guest-agent/CredServer.py*
-%{_datadir}/ovirt-guest-agent/GuestAgentLinux2.py*
+%dir %{python_sitearch}/ovirtga
+%{python_sitearch}/ovirtga/__init__.py*
+%{python_sitearch}/ovirtga/logic.py*
+%{python_sitearch}/ovirtga/virtio.py*
+%{python_sitearch}/ovirtga/linux.py*
+%{python_sitearch}/ovirtga/credserver.py*
+
 %{_datadir}/ovirt-guest-agent/ovirt-locksession
 %{_datadir}/ovirt-guest-agent/ovirt-shutdown
 %{_datadir}/ovirt-guest-agent/ovirt-hibernate
diff --git a/ovirt-guest-agent.spec b/ovirt-guest-agent.spec
index 454eea8..45a170f 100644
--- a/ovirt-guest-agent.spec
+++ b/ovirt-guest-agent.spec
@@ -186,10 +186,13 @@
 
 %attr (755,root,root) %{_datadir}/ovirt-guest-agent/ovirt-guest-agent.py*
 
-%{_datadir}/ovirt-guest-agent/OVirtAgentLogic.py*
-%{_datadir}/ovirt-guest-agent/VirtIoChannel.py*
-%{_datadir}/ovirt-guest-agent/CredServer.py*
-%{_datadir}/ovirt-guest-agent/GuestAgentLinux2.py*
+%dir %{python_sitearch}/ovirtga
+%{python_sitearch}/ovirtga/__init__.py*
+%{python_sitearch}/ovirtga/logic.py*
+%{python_sitearch}/ovirtga/virtio.py*
+%{python_sitearch}/ovirtga/linux.py*
+%{python_sitearch}/ovirtga/credserver.py*
+
 %{_datadir}/ovirt-guest-agent/ovirt-locksession
 %{_datadir}/ovirt-guest-agent/ovirt-shutdown
 %{_datadir}/ovirt-guest-agent/ovirt-hibernate
diff --git a/ovirt-guest-agent/Makefile.am b/ovirt-guest-agent/Makefile.am
index 3ff8b7a..c80a914 100644
--- a/ovirt-guest-agent/Makefile.am
+++ b/ovirt-guest-agent/Makefile.am
@@ -1,14 +1,10 @@
 
-SUBDIRS = pam consoleapps
+SUBDIRS = pam consoleapps ovirtga
 
 AGENT_NAME = ovirt-guest-agent
 
 agentdir=$(datadir)/ovirt-guest-agent
 agent_PYTHON= \
-    CredServer.py \
-    GuestAgentLinux2.py \
-    OVirtAgentLogic.py \
-    VirtIoChannel.py \
     ovirt-guest-agent.py \
     $(NULL)
 
@@ -16,8 +12,6 @@
     GuestAgentWin32.py \
     setup.py \
     version.py \
-    WinFile.py \
-    OVirtGuestService.py \
     $(NULL)
 
 dist_pkgdata_SCRIPTS= \
diff --git a/ovirt-guest-agent/OVirtGuestService.py 
b/ovirt-guest-agent/OVirtGuestService.py
index 3206e8a..16b7ae5 100644
--- a/ovirt-guest-agent/OVirtGuestService.py
+++ b/ovirt-guest-agent/OVirtGuestService.py
@@ -4,13 +4,13 @@
 import win32serviceutil
 import win32service
 import win32evtlogutil
-from GuestAgentWin32 import WinVdsAgent
 import logging
 import logging.config
 import servicemanager
 import ConfigParser
 import os
 import _winreg
+from ovirtga.win32 import WinVdsAgent
 
 AGENT_CONFIG = 'ovirt-guest-agent.ini'
 
diff --git a/ovirt-guest-agent/ovirt-guest-agent.py 
b/ovirt-guest-agent/ovirt-guest-agent.py
index c7d60c8..749c69f 100644
--- a/ovirt-guest-agent/ovirt-guest-agent.py
+++ b/ovirt-guest-agent/ovirt-guest-agent.py
@@ -22,7 +22,7 @@
 import sys
 import getopt
 import ConfigParser
-from GuestAgentLinux2 import LinuxVdsAgent
+from ovirtga.linux import LinuxVdsAgent
 
 AGENT_CONFIG = '/etc/ovirt-guest-agent.conf'
 AGENT_PIDFILE = '/run/ovirt-guest-agent.pid'
diff --git a/ovirt-guest-agent/ovirtga/Makefile.am 
b/ovirt-guest-agent/ovirtga/Makefile.am
new file mode 100644
index 0000000..4fbe87f
--- /dev/null
+++ b/ovirt-guest-agent/ovirtga/Makefile.am
@@ -0,0 +1,33 @@
+#
+# Copyright 2014 Vinzenz Feenstra, Red Hat, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program 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 General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+#
+# Refer to the README and COPYING files for full details of the license
+#
+
+ovirtgadir=${pythondir}/ovirtga
+dist_ovirtga_PYTHON = \
+       __init__.py \
+       credserver.py \
+       linux.py \
+       logic.py \
+       virtio.py \
+       $(NULL)
+
+EXTRA_DIST= \
+       win32.py \
+       winfile.py \
+       $(NULL)
diff --git a/ovirt-guest-agent/ovirtga/__init__.py 
b/ovirt-guest-agent/ovirtga/__init__.py
new file mode 100644
index 0000000..59b1542
--- /dev/null
+++ b/ovirt-guest-agent/ovirtga/__init__.py
@@ -0,0 +1,19 @@
+#
+# Copyright 2014 Vinzenz Feenstra, Red Hat, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program 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 General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+#
+# Refer to the README and COPYING files for full details of the license
+#
diff --git a/ovirt-guest-agent/CredServer.py 
b/ovirt-guest-agent/ovirtga/credserver.py
similarity index 100%
rename from ovirt-guest-agent/CredServer.py
rename to ovirt-guest-agent/ovirtga/credserver.py
diff --git a/ovirt-guest-agent/GuestAgentLinux2.py 
b/ovirt-guest-agent/ovirtga/linux.py
similarity index 98%
rename from ovirt-guest-agent/GuestAgentLinux2.py
rename to ovirt-guest-agent/ovirtga/linux.py
index 7734bdc..e4fb12c 100644
--- a/ovirt-guest-agent/GuestAgentLinux2.py
+++ b/ovirt-guest-agent/ovirtga/linux.py
@@ -22,11 +22,11 @@
 import subprocess
 import threading
 import time
-from OVirtAgentLogic import AgentLogicBase, DataRetriverBase
+from .logic import AgentLogicBase, DataRetriverBase
 
 CredServer = None
 try:
-    from CredServer import CredServer as CredServerImported
+    from .credserver import CredServer as CredServerImported
     CredServer = CredServerImported
 except ImportError:
     # The CredServer doesn't exist in RHEL-5. So we provide a
diff --git a/ovirt-guest-agent/OVirtAgentLogic.py 
b/ovirt-guest-agent/ovirtga/logic.py
similarity index 99%
rename from ovirt-guest-agent/OVirtAgentLogic.py
rename to ovirt-guest-agent/ovirtga/logic.py
index 35d4265..6233e22 100644
--- a/ovirt-guest-agent/OVirtAgentLogic.py
+++ b/ovirt-guest-agent/ovirtga/logic.py
@@ -33,7 +33,7 @@
     multiproc = MultiProcessingFake()
 
 from threading import Event
-from VirtIoChannel import VirtIoChannel
+from .virtio import VirtIoChannel
 
 _MAX_SUPPORTED_API_VERSION = 1
 _DISABLED_API_VALUE = 0
diff --git a/ovirt-guest-agent/VirtIoChannel.py 
b/ovirt-guest-agent/ovirtga/virtio.py
similarity index 100%
rename from ovirt-guest-agent/VirtIoChannel.py
rename to ovirt-guest-agent/ovirtga/virtio.py
diff --git a/ovirt-guest-agent/GuestAgentWin32.py 
b/ovirt-guest-agent/ovirtga/win32.py
similarity index 99%
rename from ovirt-guest-agent/GuestAgentWin32.py
rename to ovirt-guest-agent/ovirtga/win32.py
index 60743d5..4589478 100644
--- a/ovirt-guest-agent/GuestAgentWin32.py
+++ b/ovirt-guest-agent/ovirtga/win32.py
@@ -15,13 +15,14 @@
 import pythoncom
 import subprocess
 import socket
-from OVirtAgentLogic import AgentLogicBase, DataRetriverBase
 from ctypes import c_ulong, byref, windll, create_unicode_buffer,\
     Structure, sizeof, c_void_p
 from ctypes.util import find_library
 from ctypes.wintypes import DWORD
 import _winreg
 
+from .logic import AgentLogicBase, DataRetriverBase
+
 
 # _winreg.QueryValueEx and win32api.RegQueryValueEx don't support reading
 # Unicode strings from the registry (at least on Python 2.5.1).
diff --git a/ovirt-guest-agent/WinFile.py b/ovirt-guest-agent/ovirtga/winfile.py
similarity index 100%
rename from ovirt-guest-agent/WinFile.py
rename to ovirt-guest-agent/ovirtga/winfile.py


-- 
To view, visit http://gerrit.ovirt.org/28046
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibaad3cdcd7407dd4ee9a1fb7617c7eb4c76d1847
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-guest-agent
Gerrit-Branch: master
Gerrit-Owner: Vinzenz Feenstra <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to