use the correct starrs procedure to check hostnames

This commit is contained in:
Jordan Rodgers 2018-01-24 01:12:05 -05:00
parent 05f43852ee
commit 8487d86044

View file

@ -48,10 +48,8 @@ def check_hostname(starrs, hostname):
try: try:
c.execute("BEGIN") c.execute("BEGIN")
c.callproc("api.initialize", ('root', )) c.callproc("api.initialize", ('root', ))
c.callproc("api.validate_name", (hostname, )) c.callproc("api.validate_domain", (hostname, 'csh.rit.edu'))
valid = False valid = c.fetchall()[0][0]
if hostname == c.fetchall()[0][0]:
valid = True
c.execute("COMMIT") c.execute("COMMIT")
c.execute("BEGIN") c.execute("BEGIN")
c.callproc("api.initialize", ('root', )) c.callproc("api.initialize", ('root', ))