diff options
author | Michael DeHaan <mdehaan@mdehaan.rdu.redhat.com> | 2007-09-21 11:26:52 -0400 |
---|---|---|
committer | Michael DeHaan <mdehaan@mdehaan.rdu.redhat.com> | 2007-09-21 11:26:52 -0400 |
commit | a4ca1866ea731b67638a65c5cb8e052f07cdbaa1 (patch) | |
tree | 15bd5b6a75472e89f9e4815ee26be312140bad1a | |
parent | c0d315b2fd35c4ca8291f9a8c7f7be7bcd1cfa89 (diff) | |
download | third_party-func-a4ca1866ea731b67638a65c5cb8e052f07cdbaa1.tar.gz third_party-func-a4ca1866ea731b67638a65c5cb8e052f07cdbaa1.tar.xz third_party-func-a4ca1866ea731b67638a65c5cb8e052f07cdbaa1.zip |
Rename web_svc as func_module.
-rwxr-xr-x | modules/func_module.py (renamed from modules/web_svc.py) | 15 | ||||
-rwxr-xr-x | modules/service.py | 6 | ||||
-rwxr-xr-x | modules/test.py | 6 | ||||
-rwxr-xr-x | modules/virt.py | 6 |
4 files changed, 12 insertions, 21 deletions
diff --git a/modules/web_svc.py b/modules/func_module.py index 134af37..ec587c1 100755 --- a/modules/web_svc.py +++ b/modules/func_module.py @@ -1,9 +1,8 @@ #!/usr/bin/python -## Virt-factory backend code. ## -## Copyright 2006, Red Hat, Inc -## Adrian Likins <alikins@redhat.com +## Copyright 2007, Red Hat, Inc +## see AUTHORS ## ## This software may be freely redistributed under the terms of the GNU ## general public license. @@ -24,7 +23,7 @@ import time import traceback -class WebSvc(object): +class FuncModule(object): def __init__(self): config_obj = config_data.Config() @@ -33,7 +32,6 @@ class WebSvc(object): self.__init_log() def __init_log(self): - # lets see what happens when we c&p the stuff from server.py log = logger.Logger() self.logger = log.logger @@ -41,12 +39,5 @@ class WebSvc(object): for meth in self.methods: handlers[meth] = self.methods[meth] - def offset_and_limit(self, args): - return args.get('offset', 0), args.get('limit', 100000) - - -class AuthWebSvc(WebSvc): - def __init__(self): - WebSvc.__init__(self) diff --git a/modules/service.py b/modules/service.py index f0693b0..379689a 100755 --- a/modules/service.py +++ b/modules/service.py @@ -16,12 +16,12 @@ from codes import * -from modules import web_svc +from modules import func_module import subprocess import os -class Service(web_svc.WebSvc): +class Service(func_module.FuncModule): def __init__(self): self.methods = { @@ -31,7 +31,7 @@ class Service(web_svc.WebSvc): "service_reload" : self.reload, "service_status" : self.status } - web_svc.WebSvc.__init__(self) + func_module.FuncModule.__init__(self) def __command(self, service_name, command): diff --git a/modules/test.py b/modules/test.py index eb2e3f4..b742e31 100755 --- a/modules/test.py +++ b/modules/test.py @@ -1,14 +1,14 @@ #!/usr/bin/python from codes import * -from modules import web_svc +from modules import func_module -class Test(web_svc.WebSvc): +class Test(func_module.FuncModule): def __init__(self): self.methods = { "test_add": self.add } - web_svc.WebSvc.__init__(self) + func_module.FuncModule.__init__(self) def add(self, numb1, numb2): return numb1 + numb2 diff --git a/modules/virt.py b/modules/virt.py index 7e642cf..00eeb98 100755 --- a/modules/virt.py +++ b/modules/virt.py @@ -27,7 +27,7 @@ import libvirt # our modules import codes -import web_svc +import func_module VIRT_STATE_NAME_MAP = { 0 : "running", @@ -121,7 +121,7 @@ class FuncLibvirtConnection(): -class Virt(web_svc.WebSvc): +class Virt(func_module.FuncModule): def __init__(self): @@ -142,7 +142,7 @@ class Virt(web_svc.WebSvc): "virt_list_vms" : self.list_vms, } - web_svc.WebSvc.__init__(self) + func_module.FuncModule.__init__(self) def get_conn(self): self.conn = FuncLibvirtConnection() |