mirror of
https://github.com/ComputerScienceHouse/proxstar.git
synced 2025-02-12 13:01:51 +00:00
Add "Owned by <user>" as starrs comment
It'd be nice to have more information about who's responsible for an address in starrs without having to switch to proxstar and look it up. This adds that in the "comment" column when creating a system, so that future systems will include this data.
This commit is contained in:
parent
5dc9f5e13b
commit
fa88975a27
1 changed files with 4 additions and 0 deletions
|
@ -90,6 +90,10 @@ def register_starrs(starrs, name, owner, mac, addr):
|
|||
(name, owner, 'members', mac, addr, 'csh.rit.edu', 'dhcp', True))
|
||||
results = c.fetchall()
|
||||
c.execute('COMMIT')
|
||||
c.execute('BEGIN')
|
||||
c.callproc('api.initialize', ('root', ))
|
||||
c.callproc('api.modify_system', (name, 'comment', f'Owned by {owner}'))
|
||||
c.execute('COMMIT')
|
||||
finally:
|
||||
c.close()
|
||||
return results
|
||||
|
|
Loading…
Reference in a new issue