def getAgentStationInfo(station, controller): """ Retrieves the staion information from the SERVICE_TYPE_AGENT_STATION_INFO service as a dictionary. """ # Get the station info (comes directly from the test station) try: agtSvc = AgentServices.objects.get(service_type=AgentServices.SERVICE_TYPE_AGENT_STATION_INFO) except AgentServices.MultipleObjectReturned: agtSvc = AgentServices.objects.get(controller=controller, service_type=AgentServices.SERVICE_TYPE_AGENT_STATION_INFO) sInfo = {} try: sInfo = genericGetRequest(station, agtSvc.service_url, agtSvc.service_port) except: pass return sInfo
def getRequest(self,address, port=None): """ Performs a get request to the given address on the Dolphin web service. """ return genericGetRequest(self.server_hostname, self.base_service_url+'/'+address, port)