[Et-mgmt-commits-list] [SCM] virt-factory branch, master now at v0.0.3-195-g386a4f1
Michael DeHaan
mdehaan at redhat.com
Thu Aug 23 20:58:20 UTC 2007
Hello,
This is an automated email from the git hooks/update script, it was
generated because a ref change was pushed to the repository.
Updating branch, master,
via 386a4f175815a33c3325063cfe8f0a20f0d3dd4e (commit)
from 06e186d2c7457eeff6991bae35f681473ce8f794 (commit)
- Log -----------------------------------------------------------------
commit 386a4f175815a33c3325063cfe8f0a20f0d3dd4e
Author: Michael DeHaan <mdehaan at redhat.com>
Date: Thu Aug 23 16:53:23 2007 -0400
Refactor AMQP tools into another class, add asynchronous node status,
and other miscellaneous stuff about nodes. Nodes, nodes, nodes, nodes.
-----------------------------------------------------------------------
Diffstat:
nodes/nodes/amqp_utils.py | 58 +++++++++++++++++++++++++++++++++++++++++++++
nodes/nodes/virt_utils.py | 2 +-
2 files changed, 59 insertions(+), 1 deletions(-)
diff --git a/nodes/nodes/amqp_utils.py b/nodes/nodes/amqp_utils.py
new file mode 100644
index 0000000..44d47cb
--- /dev/null
+++ b/nodes/nodes/amqp_utils.py
@@ -0,0 +1,58 @@
+# Utility functions for dealing with libvirt, whether from
+# the remote API or the polling scripts
+
+"""
+Virt-factory backend code.
+
+Copyright 2007, Red Hat, Inc
+Michael DeHaan <mdehaan at redhat.com>
+Adrian Likins <alikins at redhat.com>
+Scott Seago <sseago at redhat.com>
+
+This software may be freely redistributed under the terms of the GNU
+general public license.
+
+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., 675 Mass Ave, Cambridge, MA 02139, USA.
+"""
+
+import sys
+import os
+import subprocess
+from nodes.codes import *
+import threading
+import time
+import traceback
+import socket
+from busrpc.rpc import lookup_service
+from busrpc.crypto import CertManager
+import busrpc.qpid_transport
+
+
+class VirtFactoryAmqpConnection():
+
+ def __init__(self,connect_later=False):
+
+ config_obj = config_data.Config()
+ config_result = config_obj.get()
+ self.config = config_result
+ self.__target = self.__get_file_data("/etc/sysconfig/virt-factory/server")
+ self.__source = socket.gethostname()
+ self.server_initialized = False
+
+
+ def connect(self):
+ if not self.server_initialized:
+ self.server = Server(client=self.__source, host=self.__target)
+ self.server_initialized = True
+ return self.server
+
+ def __get_file_data(self, fname):
+ fileh = open(fname, "r")
+ data = fileh.read()
+ fileh.close()
+ return data.strip()
+
+
+
diff --git a/nodes/nodes/virt_utils.py b/nodes/nodes/virt_utils.py
index 79c6d93..e89adce 100644
--- a/nodes/nodes/virt_utils.py
+++ b/nodes/nodes/virt_utils.py
@@ -53,7 +53,7 @@ class VirtFactoryLibvirtConnection():
self.conn = conn
- def find_vm(self, mac_address=-1):
+ def find_vm(self, mac_address):
"""
Extra bonus feature: mac_address = -1 returns a list of everything
"""
hooks/update
---
Git Source Code Management System
hooks/update refs/heads/master \
06e186d2c7457eeff6991bae35f681473ce8f794 \
386a4f175815a33c3325063cfe8f0a20f0d3dd4e
More information about the Et-mgmt-commits-list
mailing list