def get_ags_services(server, port, adminuser, password):
    
    agsServices = {}
    
    # Get all services that exist on server
    allServices = getServiceList(server, port, adminuser, password)
    
    # Remove certain services from collection
    excludeServices = ['SampleWorldCities.MapServer']
    services = [service for service in allServices if service not in excludeServices]
    
    # Create dictionary from list of services; values are None.
    for service in services:
        
        parsedService = service.split('//')
        folder = None
        if len(parsedService) == 1:
            serviceNameType = parsedService[0]
        else:
            folder = parsedService[0]
            serviceNameType = parsedService[1]
            
        info = getServiceInfo(server, port, adminuser, password, folder, serviceNameType)
        agsServices[service] = info
        
    if debug:
        print "\nwithin get_ags_servides function:"
        print "agsServices:"
        print agsServices   
    
    return agsServices
Return collection of ArcGIS Server services and service info
dataset/ETHPy150Open Esri/ops-server-config/SupportFiles/GetSDFiles.py/get_ags_services