-
Notifications
You must be signed in to change notification settings - Fork 33
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
add /connectivity - endpoint to check the network status of a device #69
add /connectivity - endpoint to check the network status of a device #69
Conversation
2a66f97
to
ce07f26
Compare
This will need to wait until v0.5.0 is published. There are still some issues that need to be resolved for that version. |
Hi @eric-murray, yes I thought so, too. |
v0.5.0-wip will need some further updates before it becomes v0.5.0, so let's wait for that to be complete before considering this PR. You can rebase this PR once the final changes to 0.5.0-wip are agreed. |
@maxl2287 Agree with @eric-murray that we must first stabilize the v0.5 with the notification and the proceed this PR in v0.6. One question - Why did you removed CONNECTED_DATA_SMS value ? (the device is connected to the network for Data & SMS usage). Sorry if i missed a discussion on this topic but IMHO it makes sense to keep the value when the device can receive Data &SMS. Thanks |
@bigludo7 What do you think about this? |
Thanks @maxl2287 for the quick answer. Got it. I will check internally with my network experts but makes sense to me now. |
Decision from the DeviceStatus working group call: this PR should be extended by the connectivity events. However they should already be based on CloudEvents. To avoid conflicts this PR should be based on PR #74 . |
Depending on the MeetingMinutes (https://github.com/camaraproject/DeviceStatus/blob/main/documentation/MeetingMinutes/MoM-2023-09-13.md) I would like to wait until PR #75 is done to do the updates for this PR. |
…etwork status of the device
ce07f26
to
3806395
Compare
@sachinvodafone @eric-murray @bigludo7 Please review. :) |
Hello @maxl2287 Thanks for the proposal. Few cosmetic change and one code change proposal: The eventType org.camaraproject.device-status.v0.subscription-ends has not to be subscribed (see API description). This notification does not require dedicated subscription. But, the eventType could be send in the notification so I've introduced 2 definition of eventType: one with and one without subscription-ends. Hope it makes sense for you
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.
Hello @maxl2287
Thanks for the proposal.
Few cosmetic change and one code change proposal: The eventType org.camaraproject.device-status.v0.subscription-ends has not to be subscribed (see API description). This notification does not require dedicated subscription. But, the eventType could be send in the notification so I've introduced 2 definition of eventType: one with and one without subscription-ends.
Hope it makes sense for you
@maxl2287 This is the same comment for camaraproject/DeviceLocation#113 ;) |
@bigludo7 what about: SubscriptionDetail:
description: The detail of the requested event subscription
type: object
required:
- type
properties:
device:
$ref: "#/components/schemas/Device"
type:
$ref: "#/components/schemas/SubscriptionCreationEventType" To reduce redundancy? |
Hello @maxl2287 My only request is to have a distinct array for the |
@bigludo7 sorry I have inserted the wrong code as a proposal 😄 . I mean: SubscriptionEventType:
allOf:
- $ref: "#/components/schemas/SubscriptionCreationEventType"
- type: string
description: |
subscription-ends: Event triggered when the subscription ends.
enum:
- org.camaraproject.device-status.v0.subscription-ends |
Yes this is excellent. I should confess that I did not know that it was possible to extend an enum this way. Thanks !! |
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.
LGTM
Thanks @maxl2287
I don't know. I thought so, but in DeviceLocation @jlurien denied that possibility. So I guess I need to revert it. |
7fb6513
3b6cffa
to
7fb6513
Compare
@bigludo7 I have reverted my commit and deleted an unused component. I was not aware that an "extend" is not possible for enums yet and it's only possible by a bit of redundancy. |
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.
LGTM. Thanks @maxl2287
Hello @sachinvodafone @eric-murray |
What type of PR is this?
Add one of the following kinds:
What this PR does / why we need it:
This PR creates a new endpoint "/connectivity" to check the current network status of a device.
Which issue(s) this PR fixes:
Fixes #34