code: def restart_ap_name(self, name):
          
  
          if not name:
              raise APIError('%s is not a valid name' % str(name))
          for ap in self.get_aps():
              if ap.get('state', 0) == 1 and ap.get('name', None) == name:
                  self.restart_ap(ap['mac'])
docs: Restart an access point (by name).
  
          Arguments:
              name -- the name address of the AP to restart.