Skip to content

Commit

Permalink
root portal -> implements removal in portal csv #31
Browse files Browse the repository at this point in the history
  • Loading branch information
astrochun committed Jul 21, 2020
1 parent fd446c7 commit e4a2be0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
8 changes: 6 additions & 2 deletions requiam/manual_override.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,12 @@ def update_dataframe(self, netid, uaid, group, group_type):
print(f"Adding entry for {netid}")
revised_df.loc[len(revised_df)] = [netid, list(uaid)[0], group]
else:
print(f"Updating entry for {netid}")
revised_df.loc[loc0[0]] = [netid, list(uaid)[0], group]
if group != 'root':
print(f"Updating entry for {netid}")
revised_df.loc[loc0[0]] = [netid, list(uaid)[0], group]
else:
print(f"Removing entry for {netid}")
revised_df = revised_df.drop(loc0)

print(f"Update {group_type} csv")
if group_type == 'portal':
Expand Down
3 changes: 3 additions & 0 deletions requiam/user_update
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,9 @@ if __name__ == '__main__':
mo.update_dataframe(vargs['netid'], user_uaid, vargs['portal'], 'portal')
else:
log.info('dry run, not performing synchronization')
else:
# Remove entry from manual CSV file for 'root' case
mo.update_dataframe(vargs['netid'], user_uaid, vargs['portal'], 'portal')

# Quota update
if vargs['quota'] != '(unset)':
Expand Down

0 comments on commit e4a2be0

Please sign in to comment.