def createAttributes(self): attrs = { ATTR_ID : "TCFLocal", ATTR_SERVICE_MANAGER_ID : services.getServiceManagerID(), ATTR_AGENT_ID : protocol.getAgentID(), ATTR_NAME : "Local Peer", ATTR_OS_NAME : os.name, ATTR_TRANSPORT_NAME : "Loop" } return attrs;
def getServiceManagerID(): # In current implementation ServiceManager is a singleton, # so its ID is same as agent ID. return protocol.getAgentID()