-
Notifications
You must be signed in to change notification settings - Fork 189
[v7r1] Add listStatesForWeb endpoint to make Public State Manager faster #5159
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -79,6 +79,32 @@ def export_deleteProfileVar(self, profileName, varName): | |
| userGroup = credDict['group'] | ||
| return gUPDB.deleteVar(userName, userGroup, profileName, varName) | ||
|
|
||
| types_listStatesForWeb = [dict] | ||
|
|
||
| def export_listStatesForWeb(self, permission): | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As of now there's no integration test for the UserProfileClient -> UserProfileHandler -> UserProfileDB (it should be in tests/Integration/Framework). I would say that this is a good occasion for adding it. |
||
| retVal = self.export_getUserProfileNames(permission) | ||
| if not retVal["OK"]: | ||
| return retVal | ||
| data = retVal['Value'] | ||
|
|
||
| records = [] | ||
| for i in data: | ||
| application = i.replace('Web/application/', '') | ||
| retVal = self.export_listAvailableProfileVars(i) | ||
| if not retVal['OK']: | ||
| return retVal | ||
| states = retVal['Value'] | ||
| for state in states: | ||
| record = dict(zip(['user', 'group', 'vo', 'name'], state)) | ||
| record['app'] = application | ||
| retVal = self.export_getProfileVarPermissions(i, record['name']) | ||
| if not retVal['OK']: | ||
| return retVal | ||
| record['permissions'] = retVal['Value'] | ||
| records += [record] | ||
|
|
||
| return S_OK(records) | ||
|
|
||
| types_listAvailableProfileVars = [types.StringTypes] | ||
|
|
||
| def export_listAvailableProfileVars(self, profileName, filterDict={}): | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,6 +5,7 @@ M2Crypto>=0.36 | |
| Sphinx>=1.8.0 | ||
| docutils>=0.15 | ||
| boto3 | ||
| cachetools<4 | ||
| elasticsearch_dsl | ||
| future | ||
| futures | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,6 +5,7 @@ M2Crypto==0.32 | |
| Sphinx>=1.8.0 | ||
| boto3 | ||
| elasticsearch_dsl | ||
| cachetools | ||
| future | ||
| futures | ||
| matplotlib | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,6 +7,7 @@ boto3 | |
| #asn1 | ||
| M2Crypto>=0.36 | ||
| autopep8==1.3.3 | ||
| cachetools<4 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am wondering if this file is still used or not. If not, maybe we can remove it from v7r2?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We use it in LHCbDIRAC’s CI for Python 2 and I’m not particularly eager to break that while it’s stable. I hope it can be left as is until v8.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah right. Sure, let's leave it. |
||
| certifi | ||
| coverage | ||
| docutils | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.