diff --git a/gracedb/events/buildVOEvent.py b/gracedb/events/buildVOEvent.py index 511bf048443d62271da46fc363a414d04e7d07a7..d1fcb8ee7343b8a9002846c2db4e047097ac62f1 100644 --- a/gracedb/events/buildVOEvent.py +++ b/gracedb/events/buildVOEvent.py @@ -553,40 +553,3 @@ def buildVOEvent(event, serial_number, voevent_type, request=None, skymap_filena #schemaURL = "http://www.ivoa.net/xml/VOEvent/VOEvent-v2.0.xsd") return xml, ivorn -def submitToSkyalert(event, validate_only=False): - ## Python stub code for validating and authoring VOEvents to Skyalert - import urllib - dict = {} - - # the server that will handle the submit request - url = "http://skyalert.org/submit/" - url = "https://betelgeuse.ligo.caltech.edu:8000/submit/" - url = "http://betelgeuse.ligo.caltech.edu/submit/" - - # choose 'dryrun' for validation and 'author' for authoring - dict['checker'] = 'dryrun' - - # for command line, we want plain text output, not HTML - dict['plainResponse'] = 'on' - - if not validate_only: - # uncomment these for authoring - dict['checker'] = 'author' - - # Skyalert username and password - dict['username'] = 'system' - dict['password'] = 'OPV537' - - # This is the short name for the stream, must match credentials and event! - dict['streamName'] = 'LIGO' - - # Should alerts be run once the event is ingested? - dict['doRules'] = 'on' - - dict['xmlText'] = buildVOEvent(event) - params = urllib.urlencode(dict) - f = urllib.urlopen(url, params) - result = f.read() - return result - - diff --git a/gracedb/superevents/buildVOEvent.py b/gracedb/superevents/buildVOEvent.py index 5247c2592d94ae1f89b3c2d5544f2f6989378137..16e43eec9c9271b05d22bffa0e88834e32b132af 100644 --- a/gracedb/superevents/buildVOEvent.py +++ b/gracedb/superevents/buildVOEvent.py @@ -508,42 +508,3 @@ def construct_voevent_file(superevent, voevent, request=None, xml = stringVOEvent(v) #schemaURL = "http://www.ivoa.net/xml/VOEvent/VOEvent-v2.0.xsd") return xml, ivorn - - -def submitToSkyalert(superevent, validate_only=False): - ## Python stub code for validating and authoring VOEvents to Skyalert - import urllib - dict = {} - - # the server that will handle the submit request - #url = "http://skyalert.org/submit/" - #url = "https://betelgeuse.ligo.caltech.edu:8000/submit/" - url = "http://betelgeuse.ligo.caltech.edu/submit/" - - # choose 'dryrun' for validation and 'author' for authoring - dict['checker'] = 'dryrun' - - # for command line, we want plain text output, not HTML - dict['plainResponse'] = 'on' - - if not validate_only: - # uncomment these for authoring - dict['checker'] = 'author' - - # Skyalert username and password - dict['username'] = 'system' - dict['password'] = 'OPV537' - - # This is the short name for the stream, must match credentials and event! - dict['streamName'] = 'LIGO' - - # Should alerts be run once the event is ingested? - dict['doRules'] = 'on' - - dict['xmlText'] = buildVOEvent(superevent) - params = urllib.urlencode(dict) - f = urllib.urlopen(url, params) - result = f.read() - return result - -