-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into pitch/connect-renkulab-and-openbis-datasets
- Loading branch information
Showing
14 changed files
with
1,696 additions
and
1,296 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
...nku_data_services/message_queue/avro_models/io/renku/events/v2/reprovisioning_finished.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
from dataclasses import asdict, dataclass | ||
from typing import ClassVar, Dict | ||
|
||
from dataclasses_avroschema import AvroModel | ||
from undictify import type_checked_constructor | ||
|
||
|
||
@type_checked_constructor() | ||
@dataclass | ||
class ReprovisioningFinished(AvroModel): | ||
""" | ||
Event raised when a reprovisioning of data events finished | ||
""" | ||
id: str | ||
|
||
#: The Avro Schema associated to this class | ||
_schema: ClassVar[str] = """{ | ||
"type": "record", | ||
"name": "ReprovisioningFinished", | ||
"namespace": "io.renku.events.v2", | ||
"doc": "Event raised when a reprovisioning of data events finished", | ||
"fields": [ | ||
{ | ||
"name": "id", | ||
"type": "string" | ||
} | ||
] | ||
}""" | ||
|
||
def serialize_json(self) -> str: | ||
""" | ||
Returns an Avro-json representation of this instance. | ||
""" | ||
return self.serialize(serialization_type='avro-json').decode('ascii') | ||
|
||
def to_dict(self) -> Dict: | ||
""" | ||
Returns a dictionary version of this instance. | ||
""" | ||
return asdict(self) | ||
|
||
@classmethod | ||
def from_dict( | ||
cls, | ||
the_dict: Dict | ||
) -> 'ReprovisioningFinished': | ||
""" | ||
Returns an instance of this class from a dictionary. | ||
:param the_dict: The dictionary from which to create an instance of this class. | ||
""" | ||
return cls(**the_dict) |
52 changes: 52 additions & 0 deletions
52
...enku_data_services/message_queue/avro_models/io/renku/events/v2/reprovisioning_started.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
from dataclasses import asdict, dataclass | ||
from typing import ClassVar, Dict | ||
|
||
from dataclasses_avroschema import AvroModel | ||
from undictify import type_checked_constructor | ||
|
||
|
||
@type_checked_constructor() | ||
@dataclass | ||
class ReprovisioningStarted(AvroModel): | ||
""" | ||
Event raised when a reprovisioning of data events started | ||
""" | ||
id: str | ||
|
||
#: The Avro Schema associated to this class | ||
_schema: ClassVar[str] = """{ | ||
"type": "record", | ||
"name": "ReprovisioningStarted", | ||
"namespace": "io.renku.events.v2", | ||
"doc": "Event raised when a reprovisioning of data events started", | ||
"fields": [ | ||
{ | ||
"name": "id", | ||
"type": "string" | ||
} | ||
] | ||
}""" | ||
|
||
def serialize_json(self) -> str: | ||
""" | ||
Returns an Avro-json representation of this instance. | ||
""" | ||
return self.serialize(serialization_type='avro-json').decode('ascii') | ||
|
||
def to_dict(self) -> Dict: | ||
""" | ||
Returns a dictionary version of this instance. | ||
""" | ||
return asdict(self) | ||
|
||
@classmethod | ||
def from_dict( | ||
cls, | ||
the_dict: Dict | ||
) -> 'ReprovisioningStarted': | ||
""" | ||
Returns an instance of this class from a dictionary. | ||
:param the_dict: The dictionary from which to create an instance of this class. | ||
""" | ||
return cls(**the_dict) |
46 changes: 46 additions & 0 deletions
46
components/renku_data_services/message_queue/schemas/v2/asyncapi.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
asyncapi: 3.0.0 | ||
info: | ||
title: Search Sync Events | ||
version: 0.0.1 | ||
servers: | ||
redis: | ||
host: renku-redis | ||
protocol: redis | ||
description: Renku Redis Instance | ||
channels: | ||
data_service.all_events: | ||
messages: | ||
syncEvent: | ||
payload: | ||
schemaFormat: "application/vnd.apache.avro;version=1.9.0" | ||
oneOf: | ||
- $ref: './user/events/added.avsc#/UserAdded' | ||
- $ref: './user/events/created.avsc#/UserUpdated' | ||
- $ref: './user/events/removed.avsc#/UserRemoved' | ||
- $ref: './group/events/added.avsc#/GroupAdded' | ||
- $ref: './group/events/created.avsc#/GroupUpdated' | ||
- $ref: './group/events/removed.avsc#/GroupRemoved' | ||
- $ref: './group/events/member_added.avsc#/GroupMemberAdded' | ||
- $ref: './group/events/member_added.avsc#/GroupMemberUpdated' | ||
- $ref: './group/events/member_removed.avsc#/GroupMemberRemoved' | ||
- $ref: './project/events/created.avsc#/ProjectCreated' | ||
- $ref: './project/events/updated.avsc#/ProjectUpdated' | ||
- $ref: './project/events/removed.avsc#/ProjectRemoved' | ||
- $ref: './project/events/member_added.avsc#/ProjectMemberAdded' | ||
- $ref: './project/events/member_updated.avsc#/ProjectMemberUpdated' | ||
- $ref: './project/events/member_removed.avsc#/ProjectMemberRemoved' | ||
- $ref: './notify/events/reprovisioning_started.asvc#/ReprovisioningStarted' | ||
- $ref: './notify/events/reprovisioning_finished.asvc#/ReprovisioningFinished' | ||
traits: | ||
- $ref: '#/components/messageTraits/headers' | ||
|
||
components: | ||
messageTraits: | ||
headers: | ||
payload: | ||
type: object | ||
properties: | ||
id: | ||
type: string | ||
headers: | ||
- $ref: '../header/headers.avsc#/Header' |
12 changes: 12 additions & 0 deletions
12
...s/renku_data_services/message_queue/schemas/v2/notify/events/reprovisioning_finished.avsc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"type": "record", | ||
"name":"ReprovisioningFinished", | ||
"namespace":"io.renku.events.v2", | ||
"doc":"Event raised when a reprovisioning of data events finished", | ||
"fields":[ | ||
{ | ||
"name":"id", | ||
"type":"string" | ||
} | ||
] | ||
} |
12 changes: 12 additions & 0 deletions
12
...ts/renku_data_services/message_queue/schemas/v2/notify/events/reprovisioning_started.avsc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"type": "record", | ||
"name":"ReprovisioningStarted", | ||
"namespace":"io.renku.events.v2", | ||
"doc":"Event raised when a reprovisioning of data events started", | ||
"fields":[ | ||
{ | ||
"name":"id", | ||
"type":"string" | ||
} | ||
] | ||
} |
Oops, something went wrong.