-
-types = get_wsdl_definitions_and_types()
-
-wsdl = get_wsdl_definitions()
-add_wsdl_ports_and_bindings(wsdl)
-wsdl_types = wsdl.importNode(types.getElementsByTagName("types")[0], True)
-wsdl.firstChild.appendChild(wsdl_types)
-add_wsdl_service(wsdl)
-
-xml.dom.ext.PrettyPrint(wsdl)
+def main():
+ global types
+ global interface_options
+
+ parser = OptionParser()
+ parser.add_option("-r", "--registry", dest="registry", action="store_true",
+ help="Generate registry.wsdl", metavar="FILE")
+ parser.add_option("-s", "--slice-manager",
+ action="store_true", dest="slicemgr",
+ help="Generate sm.wsdl")
+ parser.add_option("-a", "--aggregate", action="store_true", dest="aggregate",
+ help="Generate am.wsdl")
+
+ (interface_options, args) = parser.parse_args()
+ types = get_wsdl_definitions_and_types()
+ wsdl = get_wsdl_definitions()
+ add_wsdl_ports_and_bindings(wsdl)
+ wsdl_types = wsdl.importNode(types.getElementsByTagName("types")[0], True)
+ wsdl.firstChild.appendChild(wsdl_types)
+ add_wsdl_service(wsdl)
+
+ xml.dom.ext.PrettyPrint(wsdl)
+
+if __name__ == "__main__":
+ main()