Warning | ||
---|---|---|
| ||
This specification is currently a draft under development. Issues:
|
...
Code Block | ||||
---|---|---|---|---|
| ||||
fired { raise cloudos event subscriptionRequestApproved with eventChannel = "3f15b820-af7f-012f-4c6e-00163ebcaaaa" and _api = "sky"; } |
Once the subscription request is approved, the CloudOS service in both the orginating and target clouds will raise the cloudos:CloudOS_subscriptionAdded
event so that a ruleset can take additional actions once the subscription has been created
Domain | cloudos |
---|---|
Type | CloudOS_subscriptionAdded |
Attributes | eventChannel, backChannel, namespace, relationship, channelName |
cloudos:CloudOS_subscriptionAdded event
is raised:
Code Block | ||||
---|---|---|---|---|
| ||||
rule process_subscriptionRequestAddedsubscriptionAdded { select when cloudos subscriptionRequestAddedsubscriptionAdded namespace re/MyFriends/ channelName re/Coworkers Bob+Ted/ relationship re/friend-friend/ ... } |
Rejection
To reject the subscription request a ruleset in the the target cloud raises the cloudos:subscriptionRequestRejected
event to signal the CloudOS service that the subscription is rejected:
Domain | cloudos |
---|---|
Type | subscriptionRequestRejected |
Attributes | eventChannel |
For example, the following postlude would raise the cloudos:subscriptionRequestRejected
event:
Code Block | ||||
---|---|---|---|---|
| ||||
fired { raise cloudos event subscriptionRequestRejected with eventChannel = "3f15b820-af7f-012f-4c6e-00163ebcaaaa" and _api = "sky"; } |
cloudos:subscriptionRejected
event within the target cloud (i.e. the cloud rejecting the subscription):
Domain | cloudos |
---|---|
Type | subscriptionRejected |
Attributes | eventChannel, namespace, relationship, channelName |
The following rule is selected when the cloudos:subscriptionRejected
event is seen:
Code Block | ||||
---|---|---|---|---|
| ||||
rule receive_subscriptionRejected { select when cloudos subscriptionRejected namespace re/MyFriends/ channelName re/Coworkers Bob+Ted/ relationship re/friend-friend/ ... } |
In addition, the CloudOS service raises the cloudos:subscriptionRejected event in the originating cloud:
Domain | cloudos |
---|---|
Type | subscriptionRejected |
Attributes | backChannel, namespace, relationship, channelName |
The only difference is that the attribute backChannel is contains the value of the ECI to the target cloud.
The following rule is selected when the cloudos:subscriptionRejected event is raised:
Code Block | ||||
---|---|---|---|---|
| ||||
rule receive_subscriptionRejected { select when cloudos subscriptionRejected namespace re/MyFriends/ channelName re/Coworkers Bob+Ted/ relationship re/friend-friend/ ... } |
...
Code Block | ||||
---|---|---|---|---|
| ||||
fired { raise cloudos event unsubscribe with eventChannel = "3f15b820-7aff-012f-4c6e-00163ebcfddfd" and _api = "sky"; } |
The CloudOS service in both the originating and target clouds raises the cloudos:CloudOS_subscriptionRemoved
event so that rulesets within the respective clouds can take any appropriate action:
Domain | cloudos |
---|---|
Type | CloudOS_subscriptionRemoved |
Attributes | eventChannel, backChannel, namespace, relationship, channelName |
The following rule is selected when the cloudos:CloudOS_subscriptionRemoved
event is raised:
Code Block | ||||
---|---|---|---|---|
| ||||
rule receive_CloudOS_subscriptionRemoved { select when cloudos CloudOS_subscriptionRemoved namespace re/MyFriends/ channelName re/Coworkers Bob+Ted/ relationship re/friend-friend/ ... } |
...