Project notifications¶
Project notifications are used by providers to synchronize UCloud’s state with the provider’s local state.
Rationale¶
This feature is, for example, used to synchronize unix groups on a traditional HPC system with UCloud’s project structure. A provider will receive notifications for all relevant projects. A project is considered relevant if the project has been allocated some resource on the provider. Providers should be aware that they will receive notifications about users even if the users haven’t connected yet. This problem is typically handled by the integration module.
Table of Contents¶
1. Remote Procedure Calls
Name | Description |
---|---|
retrieve |
Pulls the database for more `ProjectNotification`s |
markAsRead |
Marks one or more `ProjectNotification` as read |
2. Data Models
Name | Description |
---|---|
ProjectNotification |
A notification which indicates that a Project has changed |
Remote Procedure Calls¶
retrieve
¶
Pulls the database for more ProjectNotification
s
Request | Response | Error |
---|---|---|
Unit |
BulkResponse<ProjectNotification> |
CommonErrorMessage |
This request fetches a new batch of ProjectNotification
s. The provider should aim to handle all
notifications as soon as possible. Once a notification has been handled, the provider should call
ProjectNotifications.markAsRead
with the appropriate id
s. A robust provider implementation should
be able to handle receiving the same notification twice.
It is recommended that a provider calls this endpoint immediately after starting.
markAsRead
¶
Marks one or more ProjectNotification
as read
Request | Response | Error |
---|---|---|
BulkRequest<FindByStringId> |
Unit |
CommonErrorMessage |
Data Models¶
ProjectNotification
¶
A notification which indicates that a Project has changed
data class ProjectNotification(
val id: String,
val project: Project,
)
The notification contains the current state of the Project
. The project may have changed since the
notification was originally created. If multiple updates occur to a Project
before a provider invokes
markAsRead
then only a single notification will be created by UCloud.
Properties
id
: String
An identifier which uniquely identifies this notifications
String
The identifier is never re-used for a new notifications.
project
: Project
The current state of the project which has been updated
Project