def topology_changed_alert_expedient(self):
    if len(self.callback_cred_attr_list)==0:
      self._log.info("Credential info missing from expedient callback!")
      return ""
    for i,at in enumerate(self.callback_cred_attr_list):
      callback_cred_attrs = self.callback_cred_attr_list[i]
      callback_http_attrs = self.callback_http_attr_list[i]
      username = callback_cred_attrs['username']
      password = callback_cred_attrs['password']
      body="<?xml version=\"1.0\"?> <methodCall> <methodName>topology_changed</methodName> <params><param><int>"+str(callback_http_attrs['cookie'])+"</int></param></params> </methodCall>"
      base64string = base64.encodestring('%s:%s' % (username, password))[:-1]
      authheader =  "Basic %s" % base64string # this encodes the username/password for basic HTTP authentication according to HTTP standar
      headers={"Authorization": authheader}
      # now the URL of the XML RPC  is split up in two parts, as httplib requires them to be fed separately
      firstIndex=callback_http_attrs['url'].find("//")
      lastIndex=callback_http_attrs['url'].find("/",firstIndex+3,len(callback_http_attrs['url']))
      if lastIndex==-1:
        lastIndex=len(callback_http_attrs['url'])	
      clearingHouseURL1=callback_http_attrs['url'][firstIndex+2:lastIndex]
      if lastIndex+1 < len(callback_http_attrs['url']):
        clearingHouseURL2="/"+callback_http_attrs['url'][lastIndex+1:len(callback_http_attrs['url'])]
      else:
        clearingHouseURL2="";
      connectionToClearingHouse= httplib.HTTPSConnection(clearingHouseURL1)
      connectionToClearingHouse.request("POST",clearingHouseURL2,body,headers) # sends the XMLRPC towards expedient
      response=connectionToClearingHouse.getresponse(); # gets the answer from expedient. if everything was fine expedient should be requesting the new topology
      self._log.info("---Expedient notification of topo change start---")
      self._log.info(response.status) #check these prints to see what failed...
      self._log.info(response.reason)
      self._log.info(response.read()) 
      self._log.info("---Expedient notification of topo change end---")
    return ""

  #@check_user
  #@rpcmethod(signature=['string', 'string', 'string'])
dataset/ETHPy150Open fp7-ofelia/ocf/ofam/src/src/foam/api/legacyexpedientapi.py/AMLegExpAPI.topology_changed_alert_expedient/original