Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lookup and lookup_for_member disagree on the spelling of EXPIRED #537

Closed
nbastin opened this issue Jan 18, 2017 · 2 comments · Fixed by #570
Closed

lookup and lookup_for_member disagree on the spelling of EXPIRED #537

nbastin opened this issue Jan 18, 2017 · 2 comments · Fixed by #570
Assignees
Labels
Milestone

Comments

@nbastin
Copy link

nbastin commented Jan 18, 2017

If you call lookup for projects, they come back with a PROJECT_EXPIRED key, and not an EXPIRED key. However, the results from lookup_for_member on projects return an EXPIRED key, and no PROJECT_EXPIRED key. This makes it hard to be agnostic about what calls project data comes from.

Sample entry from lookup_for_member:

 {'EXPIRED': False,
  'PROJECT_ROLE': 'LEAD',
  'PROJECT_UID': '10c88fc8-9d57-4971-8820-5b14323557f5',
  'PROJECT_URN': 'urn:publicid:IDN+ch.geni.net+project+vts-infra'},

Sample entry from lookup:

 'value': {'urn:publicid:IDN+ch.geni.net+project+vts-infra': {'PROJECT_CREATION': '2014-03-07T13:58:17Z',
                                                              'PROJECT_DESCRIPTION': 'Infrastructure for VTS',
                                                              'PROJECT_EXPIRATION': None,
                                                              'PROJECT_EXPIRED': False,
                                                              'PROJECT_NAME': 'vts-infra',
                                                              'PROJECT_UID': '10c88fc8-9d57-4971-8820-5b14323557f5',
                                                              'PROJECT_URN': 'urn:publicid:IDN+ch.geni.net+project+vts-infra',
                                                              '_GENI_PROJECT_EMAIL': None,
                                                              '_GENI_PROJECT_OWNER': '8a447f06-8bd5-4f32-8fd6-1a3528e7fa37'}}}
@tcmitchell
Copy link
Member

After reading the code, the same appears to be true for slices. lookup would use SLICE_EXPIRED (from SA_constants.py) and lookup_for_member would use EXPIRED (hardcoded in SAv1PersistentImplementation.py).

@tcmitchell tcmitchell self-assigned this Jun 14, 2017
@tcmitchell tcmitchell added the bug label Jun 14, 2017
@tcmitchell tcmitchell added this to the 2.20 milestone Jun 14, 2017
@tcmitchell
Copy link
Member

I've added SLICE_EXPIRED or PROJECT_EXPIRED to the offending functions.

I left EXPIRED in as well for backward compatibility with a comment explaining that it is there for backward compatibility because of omni. I hope someday the backward compatibility can be removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants