cleanup ugly globals.py
authorThierry Parmentelat <thierry.parmentelat@inria.fr>
Wed, 16 Jan 2013 10:36:49 +0000 (11:36 +0100)
committerThierry Parmentelat <thierry.parmentelat@inria.fr>
Wed, 16 Jan 2013 10:36:49 +0000 (11:36 +0100)
wsdl/globals.py [deleted file]
wsdl/sfa2wsdl.py

diff --git a/wsdl/globals.py b/wsdl/globals.py
deleted file mode 100644 (file)
index 36c1042..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/python
-
-plc_ns="http://www.planet-lab.org/sfa"
-version="2009/07"
index 0cfc8f1..3811d70 100755 (executable)
@@ -16,9 +16,9 @@ import inspect
 from types import *
 from optparse import OptionParser
 
-from sfa.storage.parameter import Parameter,Mixed
+from sfa.storage.parameter import Parameter, Mixed
 
-import globals
+plc_ns="http://www.planet-lab.org/sfa"
 
 class SoapError(Exception):
      def __init__(self, value):
@@ -273,7 +273,7 @@ class WSDLGen:
                         servport_el.setAttribute("binding", "tns:" + name + "_binding")
 
                         soapaddress = servport_el.appendChild(self.wsdl.createElement("soap:address"))
-                        soapaddress.setAttribute("location", "%s/%s" % (globals.plc_ns,service))
+                        soapaddress.setAttribute("location", "%s/%s" % (plc_ns,service))
 
 
     def compute_wsdl_definitions(self):
@@ -289,7 +289,7 @@ class WSDLGen:
             xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
             xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
             xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"/>
-            """ % (self.interface_name(),globals.plc_ns,globals.plc_ns,globals.plc_ns)
+            """ % (self.interface_name(),plc_ns,plc_ns,plc_ns)
             
         self.wsdl = xml.dom.minidom.parseString(wsdl_text_header)
         
@@ -310,7 +310,7 @@ class WSDLGen:
             <types>
                 <xsd:schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="%s/schema"/>
             </types>
-        </wsdl:definitions> """ % (self.interface_name(),globals.plc_ns, globals.plc_ns, globals.plc_ns, globals.plc_ns)
+        </wsdl:definitions> """ % (self.interface_name(),plc_ns, plc_ns, plc_ns, plc_ns)
         self.types = xml.dom.minidom.parseString(wsdl_text_header)