Esempio n. 1
0
def get_scripts(args):
    """Print scripts XML"""
    doc = None
    if args.id:
        doc = resources.get_script(args.id)
    else:
        doc = resources.get_scripts()
    print_result(doc)
Esempio n. 2
0
def get_scripts(args):
    """Print scripts XML"""
    doc = None
    if args.id:
        doc = resources.get_script(args.id)
    else:
        doc = resources.get_scripts()
    print_result(doc)
Esempio n. 3
0
def get_script(script_id):
    """Print script XML"""
    if script_id == None or script_id == "":
        print "ID required"
        return
    doc = resources.get_script(script_id)
    if doc == None:
        print "No data returned"
        return
    print(etree.tostring(doc, pretty_print=True))