From 4d3d3a72118240c88a3b654249c826b985b463cf Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Fri, 20 Feb 2009 15:00:43 +0000 Subject: [PATCH] deprecate broken method --- Makefile | 4 ++-- PLC/Methods/GetSlicesMD5.py | 31 ------------------------------- PLC/Methods/__init__.py | 2 +- PLC/__init__.py | 1 + 4 files changed, 4 insertions(+), 34 deletions(-) delete mode 100644 PLC/Methods/GetSlicesMD5.py diff --git a/Makefile b/Makefile index e6668f80..730bad46 100644 --- a/Makefile +++ b/Makefile @@ -63,7 +63,7 @@ ifneq ($(PLC_now),$(PLC_files)) PLC/__init__.py: force endif PLC/__init__.py: - (echo 'all = """' ; cd PLC; ls -1 *.py | grep -v __init__ | sed -e 's,.py$$,,' ; echo '""".split()') > $@ + (echo '## Please use make index to update this file' ; echo 'all = """' ; cd PLC; ls -1 *.py | grep -v __init__ | sed -e 's,.py$$,,' ; echo '""".split()') > $@ ########## Methods/ # the current content of __init__.py @@ -76,7 +76,7 @@ ifneq ($(METHODS_now),$(METHODS_files)) PLC/Methods/__init__.py: force endif PLC/Methods/__init__.py: - (echo 'native_methods = """' ; cd PLC/Methods; ls -1 *.py system/*.py | grep -v __init__ | sed -e 's,.py$$,,' -e 's,system/,system.,' ; echo '""".split()') > $@ + (echo '## Please use make index to update this file' ; echo 'native_methods = """' ; cd PLC/Methods; ls -1 *.py system/*.py | grep -v __init__ | sed -e 's,.py$$,,' -e 's,system/,system.,' ; echo '""".split()') > $@ ########## force: diff --git a/PLC/Methods/GetSlicesMD5.py b/PLC/Methods/GetSlicesMD5.py deleted file mode 100644 index c8e1dd33..00000000 --- a/PLC/Methods/GetSlicesMD5.py +++ /dev/null @@ -1,31 +0,0 @@ -# $Id$ -from PLC.Faults import * -from PLC.Method import Method -from PLC.Parameter import Parameter, Mixed -from PLC.Auth import Auth - -class GetSlicesMD5(Method): - """ - Returns the current md5 hash of slices.xml file - (slices-0.5.xml.md5) - """ - - roles = ['admin', 'pi', 'user', 'tech', 'node'] - - accepts = [ - Auth(), - ] - - returns = Parameter(str, "MD5 hash of slices.xml") - - - def call(self, auth): - try: - file_path = '/var/www/html/xml/slices-0.5.xml.md5' - slices_md5 = file(file_path).readline().strip() - if slices_md5 <> "": - return slices_md5 - raise PLCInvalidArgument, "File is empty" - except IOError: - raise PLCInvalidArgument, "No such file" - diff --git a/PLC/Methods/__init__.py b/PLC/Methods/__init__.py index 2dd3f96a..66ab7a70 100644 --- a/PLC/Methods/__init__.py +++ b/PLC/Methods/__init__.py @@ -1,3 +1,4 @@ +## Please use make index to update this file native_methods = """ AddAddressType AddAddressTypeToAddress @@ -119,7 +120,6 @@ GetSliceKeys GetSliceTags GetSliceTicket GetSlices -GetSlicesMD5 GetSlivers GetTagTypes GetWhitelist diff --git a/PLC/__init__.py b/PLC/__init__.py index 0c58a0fb..0f206975 100644 --- a/PLC/__init__.py +++ b/PLC/__init__.py @@ -1,3 +1,4 @@ +## Please use make index to update this file all = """ API AddressTypes -- 2.45.2