[Et-mgmt-commits-list] [SCM] virt-factory branch, master now at 93e09ebf6e63498ed4b8c33d333d65d307670406
Scott Seago
sseago at redhat.com
Tue Apr 3 19:51:27 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 93e09ebf6e63498ed4b8c33d333d65d307670406 (commit)
via 459a5327c69f8f43c0dd9bbbafccc5a07f223e18 (commit)
from 6ef142e7af982eb2b01c5a7bd3921dec5ced43a6 (commit)
- Log -----------------------------------------------------------------
commit 93e09ebf6e63498ed4b8c33d333d65d307670406
Merge: 459a532... 6ef142e...
Author: Scott Seago <sseago at redhat.com>
Date: Tue Apr 3 15:51:17 2007 -0400
Merge with git+ssh://g-sseago@et.redhat.com/git/virt-factory
commit 459a5327c69f8f43c0dd9bbbafccc5a07f223e18
Author: Scott Seago <sseago at redhat.com>
Date: Tue Apr 3 15:50:22 2007 -0400
converted more print statements to logging statements.
-----------------------------------------------------------------------
Diffstat:
service/modules/deployment.py | 16 ++++++++--------
service/modules/distribution.py | 2 +-
service/modules/machine.py | 16 ++++++++--------
service/modules/profile.py | 2 +-
service/modules/puppet.py | 8 --------
service/modules/regtoken.py | 4 ++--
service/modules/schema_version.py | 2 +-
service/modules/upgrade_log_message.py | 2 +-
8 files changed, 22 insertions(+), 30 deletions(-)
diff --git a/service/modules/deployment.py b/service/modules/deployment.py
index daac1a7..fe3c8ee 100755
--- a/service/modules/deployment.py
+++ b/service/modules/deployment.py
@@ -137,15 +137,15 @@ class Deployment(web_svc.AuthWebSvc):
"""
Associate a machine with an ip/host/mac address
"""
- print "associating..."
+ self.logger.info("associating...")
# determine the profile from the token.
# FIXME: inefficient. ideally we'd have a retoken.get_by_value() or equivalent
regtoken_obj = regtoken.RegToken()
if token is None:
- print "token is None???"
+ self.logger.info("token is None???")
results = regtoken_obj.get_by_token(None, { "token" : token })
- print "get_by_token"
- print "results: %s" % results
+ self.logger.info("get_by_token")
+ self.logger.info("results: %s" % results)
if results.error_code != 0:
raise InvalidArgumentsException("bad token")
# FIXME: check that at least some results are returned.
@@ -169,7 +169,7 @@ class Deployment(web_svc.AuthWebSvc):
# for duck typing compatibility w/ machine
def new(self, token):
args = {}
- print "deployment_new"
+ self.logger.info("deployment_new")
return self.add(token, args)
def add(self, token, deployment_dep_args):
@@ -415,7 +415,7 @@ class Deployment(web_svc.AuthWebSvc):
dargs = self.get(token, { "id" : args["id"] }).data
- print "running refresh code"
+ self.logger.info("running refresh code")
cmd = [
"/usr/bin/vf_nodecomm",
socket.gethostname(),
@@ -426,7 +426,7 @@ class Deployment(web_svc.AuthWebSvc):
p1 = subprocess.Popen(cmd, stdout=subprocess.PIPE)
data = p1.communicate()[0]
lines = data.split("\n")
- print "output = %s" % data
+ self.logger.info("output = %s" % data)
for line in lines:
if line.find("STATE=running") != -1:
dargs["state"] = "running"
@@ -437,7 +437,7 @@ class Deployment(web_svc.AuthWebSvc):
elif line.find("STATE=off") != -1:
dargs["state"] = "off"
return self.edit(token, dargs)
- print "no match"
+ self.logger.info("no match")
return success() # FIXME: should this be failure?
diff --git a/service/modules/distribution.py b/service/modules/distribution.py
index 764dea7..3fe1207 100755
--- a/service/modules/distribution.py
+++ b/service/modules/distribution.py
@@ -108,7 +108,7 @@ class DistributionData(baseobj.BaseObject):
# kickstart metadata is composed of space delimited a=b pairs, or None/blank
if len(invalid_fields) != 0:
- print "Invalid fields: ", invalid_fields
+ #print "Invalid fields: ", invalid_fields
raise InvalidArgumentsException(invalid_fields=invalid_fields)
diff --git a/service/modules/machine.py b/service/modules/machine.py
index 0b9f7cd..cd46c60 100755
--- a/service/modules/machine.py
+++ b/service/modules/machine.py
@@ -110,8 +110,8 @@ class MachineData(baseobj.BaseObject):
if len(invalid_args) > 0:
- print "invalid args"
- print invalid_args
+ #print "invalid args"
+ #print invalid_args
raise InvalidArgumentsException(invalid_fields=invalid_args)
#------------------------------------------------------
@@ -148,7 +148,7 @@ class Machine(web_svc.AuthWebSvc):
"""
u = MachineData.produce(args,OP_ADD)
if u.profile_id is not None:
- print "creating an profile.Profile()"
+ self.logger.info("creating an profile.Profile()")
try:
self.profile = profile.Profile()
self.profile.get( token, { "id" : u.profile_id } )
@@ -184,15 +184,15 @@ class Machine(web_svc.AuthWebSvc):
"""
Associate a machine with an ip/host/mac address
"""
- print "associating..."
+ self.logger.info("associating...")
# determine the profile from the token.
# FIXME: inefficient. ideally we'd have a retoken.get_by_value() or equivalent
regtoken_obj = regtoken.RegToken()
if token is None:
- print "token is None???"
+ self.logger.info("token is None???")
results = regtoken_obj.get_by_token(None, { "token" : token })
- print "get_by_token"
- print "results: %s" % results
+ self.logger.info("get_by_token")
+ self.logger.info("results: %s" % results)
if results.error_code != 0:
raise codes.InvalidArgumentsException("bad token")
# FIXME: check that at least some results are returned.
@@ -215,7 +215,7 @@ class Machine(web_svc.AuthWebSvc):
'netboot_enabled' : 0, # elimiinate PXE install loop
'memory' : memory
}
- print args
+ self.logger.info(str(args))
return self.edit(token, args)
def edit(self, token, machine_args):
diff --git a/service/modules/profile.py b/service/modules/profile.py
index c017cc3..e35299f 100755
--- a/service/modules/profile.py
+++ b/service/modules/profile.py
@@ -115,7 +115,7 @@ class ProfileData(baseobj.BaseObject):
invalid_fields["puppet_classes"] = REASON_FORMAT
if len(invalid_fields) > 0:
- print "invalid: ", invalid_fields
+ #print "invalid: ", invalid_fields
raise InvalidArgumentsException(invalid_fields=invalid_fields)
diff --git a/service/modules/puppet.py b/service/modules/puppet.py
index 02410ff..60b75a8 100755
--- a/service/modules/puppet.py
+++ b/service/modules/puppet.py
@@ -118,14 +118,6 @@ class Puppet(web_svc.AuthWebSvc):
if line.strip() == nodename:
found = 1
closed = pipe.close()
- #if (closed is None):
- # print "normal return"
- #else:
- # print "list close: " +closed
- #if (found):
- # print "node " + nodename + " has a waiting request"
- #else:
- # print "no waiting request for " + nodename
return found
methods = Puppet()
diff --git a/service/modules/regtoken.py b/service/modules/regtoken.py
index 99dceef..44d564f 100755
--- a/service/modules/regtoken.py
+++ b/service/modules/regtoken.py
@@ -132,7 +132,7 @@ class RegToken(web_svc.AuthWebSvc):
args["token"] = self.generate(token)
u = RegTokenData.produce(args,OP_ADD)
- print u.to_datastruct()
+ self.logger.info(str(u.to_datastruct()))
if u.profile_id is not None:
try:
@@ -153,7 +153,7 @@ class RegToken(web_svc.AuthWebSvc):
def get_by_token(self, token, args):
results = self.db.simple_list({}, { "token" : "'%s'" % args["token"]})
- print "get_by_token", results
+ self.logger.info("get_by_token" + str(results))
return results
def list(self, token, args):
diff --git a/service/modules/schema_version.py b/service/modules/schema_version.py
index 7a9f48d..04b0526 100644
--- a/service/modules/schema_version.py
+++ b/service/modules/schema_version.py
@@ -97,7 +97,7 @@ class SchemaVersionData(baseobj.BaseObject):
if len(invalid_fields) != 0:
- print "Invalid fields: ", invalid_fields
+ #print "Invalid fields: ", invalid_fields
raise InvalidArgumentsException(invalid_fields=invalid_fields)
diff --git a/service/modules/upgrade_log_message.py b/service/modules/upgrade_log_message.py
index 0f09820..26fd1a8 100644
--- a/service/modules/upgrade_log_message.py
+++ b/service/modules/upgrade_log_message.py
@@ -93,7 +93,7 @@ class UpgradeLogMessageData(baseobj.BaseObject):
if len(invalid_fields) != 0:
- print "Invalid fields: ", invalid_fields
+ #print "Invalid fields: ", invalid_fields
raise InvalidArgumentsException(invalid_fields=invalid_fields)
hooks/update
---
Git Source Code Management System
hooks/update refs/heads/master \
6ef142e7af982eb2b01c5a7bd3921dec5ced43a6 \
93e09ebf6e63498ed4b8c33d333d65d307670406
More information about the Et-mgmt-commits-list
mailing list