--lite version of the WSDL file
authorSapan Bhatia <sapanb@cs.princeton.edu>
Mon, 6 Jul 2009 14:54:52 +0000 (14:54 +0000)
committerSapan Bhatia <sapanb@cs.princeton.edu>
Mon, 6 Jul 2009 14:54:52 +0000 (14:54 +0000)
wsdl/gw2wsdl.py
wsdl/sfa.wsdl

index 558ad1f..9d3a175 100755 (executable)
@@ -164,9 +164,11 @@ def add_wsdl_ports_and_bindings (wsdl):
         if (function.accepts):
             (min_args, max_args, defaults) = function.args()
             for (argname,argtype) in zip(max_args,function.accepts):
-                arg_part = in_el.appendChild(wsdl.createElement("part"))
-                arg_part.setAttribute("name", argname)
-                arg_part.setAttribute("type", param_type(argtype))
+                global interface_options
+                if (not interface_options.lite or (argname!="cred")):
+                    arg_part = in_el.appendChild(wsdl.createElement("part"))
+                    arg_part.setAttribute("name", argname)
+                    arg_part.setAttribute("type", param_type(argtype))
                 
         # Return type            
         return_type = function.returns
@@ -289,8 +291,10 @@ def main():
                               help="Generate sm.wsdl")
     parser.add_option("-a", "--aggregate", action="store_true", dest="aggregate",
                               help="Generate am.wsdl")
-
+    parser.add_option("-l", "--lite", action="store_true", dest="lite",
+                              help="Generate LITE version of the interface, in which calls exclude credentials")
     (interface_options, args) = parser.parse_args()
+
     types = get_wsdl_definitions_and_types()
     wsdl = get_wsdl_definitions()
     add_wsdl_ports_and_bindings(wsdl)
index 7564c16..8399f77 100644 (file)
       </xsd:simpleType>
     </xsd:schema>
   </types>
-  <service name='aggregate'>
-    <port binding='tns:create_slice_binding' name='create_slice_port'>
-      <soap:address location='http://www.planet-lab.org/geniwrapper/aggregate'/>
-    </port>
-    <port binding='tns:delete_slice_binding' name='delete_slice_port'>
-      <soap:address location='http://www.planet-lab.org/geniwrapper/aggregate'/>
-    </port>
-    <port binding='tns:get_resources_binding' name='get_resources_port'>
-      <soap:address location='http://www.planet-lab.org/geniwrapper/aggregate'/>
-    </port>
-    <port binding='tns:get_slices_binding' name='get_slices_port'>
-      <soap:address location='http://www.planet-lab.org/geniwrapper/aggregate'/>
-    </port>
-    <port binding='tns:reset_slices_binding' name='reset_slices_port'>
-      <soap:address location='http://www.planet-lab.org/geniwrapper/aggregate'/>
-    </port>
-    <port binding='tns:start_slice_binding' name='start_slice_port'>
-      <soap:address location='http://www.planet-lab.org/geniwrapper/aggregate'/>
-    </port>
-    <port binding='tns:stop_slice_binding' name='stop_slice_port'>
-      <soap:address location='http://www.planet-lab.org/geniwrapper/aggregate'/>
-    </port>
-  </service>
-  <service name='slicemgr'>
-    <port binding='tns:create_slice_binding' name='create_slice_port'>
-      <soap:address location='http://www.planet-lab.org/geniwrapper/slicemgr'/>
-    </port>
-    <port binding='tns:delete_slice_binding' name='delete_slice_port'>
-      <soap:address location='http://www.planet-lab.org/geniwrapper/slicemgr'/>
-    </port>
-    <port binding='tns:get_resources_binding' name='get_resources_port'>
-      <soap:address location='http://www.planet-lab.org/geniwrapper/slicemgr'/>
-    </port>
-    <port binding='tns:get_slices_binding' name='get_slices_port'>
-      <soap:address location='http://www.planet-lab.org/geniwrapper/slicemgr'/>
-    </port>
-    <port binding='tns:reset_slices_binding' name='reset_slices_port'>
-      <soap:address location='http://www.planet-lab.org/geniwrapper/slicemgr'/>
-    </port>
-    <port binding='tns:start_slice_binding' name='start_slice_port'>
-      <soap:address location='http://www.planet-lab.org/geniwrapper/slicemgr'/>
-    </port>
-    <port binding='tns:stop_slice_binding' name='stop_slice_port'>
-      <soap:address location='http://www.planet-lab.org/geniwrapper/slicemgr'/>
-    </port>
-  </service>
   <service name='registry'>
     <port binding='tns:create_gid_binding' name='create_gid_port'>
       <soap:address location='http://www.planet-lab.org/geniwrapper/registry'/>