-
Notifications
You must be signed in to change notification settings - Fork 20
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
feat: adding bulk jdl submission and job policy checking #43
feat: adding bulk jdl submission and job policy checking #43
Conversation
7b02177
to
c073061
Compare
9d75d48
to
cf82ae4
Compare
cf82ae4
to
6e83553
Compare
This effectively depends from #67 (which in turn depends from DIRACGrid/DIRAC#7143). I convert to draft until the 2 above are sorted. |
class DiracxJobPolicy(JobPolicy): | ||
def __init__(self, user_info: UserInfo, allInfo: bool = True): | ||
self.userName = user_info.preferred_username | ||
self.userGroup = user_info.dirac_group | ||
self.userProperties = user_info.properties | ||
self.jobDB = None | ||
self.allInfo = allInfo | ||
self._permissions: dict[str, bool] = {} | ||
self._getUserJobPolicy() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we define this outside the method rather than creating a new class every time the API route is called?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was more a kind of proof of concept while waiting for a decision about attributing directly the properties during the token creation. In any case, this will need to be refactored because JobPolicy is also used in endpoinds such as kill, delete or reschedule
6e83553
to
8d7b2ef
Compare
8d7b2ef
to
ebadbd8
Compare
Adding bulk submission of jdls to the job submission endpoint, and implement job policy checking (solves Implement JobPolicy #23 )
(Tests need to be relaunched once DIRACGrid/DIRAC#7092 get merged)