Compute provider should be able to turn on and off device's availability to the platform
Estimation
Story points : 3 SP
Estimated Duration: 4 Days
Description
Click to expand
Who
What
- It should be easily possible for the user to pause usage by the NuNet Platform and take the device offline at any time. The user can pause the network and job deployment so that temporarily, the machine is offline without having to offboard and loose identity. Need to save the service status if any service is running at the moment.
Issue metadata
- Issue type: Story
- Priority: Low
- Parent issue: [ NPD-63] Device Onboarding & Management App
- imported from jira [ NPD-4]
How
Why
When
Acceptance Criteria
Click to expand
Work Breakdown Structure (WBS)
Task | Description | Duration | Status | Start Date | End Date | Comment |
---|---|---|---|---|---|---|
A | Understand the requirements and evaluate part of the codebase that needs to be modified. | 4 Hrs | Done | 18th July | 19th July | |
B | Update device model by adding a new boolean attribute, isAvailable, to the PeerData struct that will hold the device's current status. | 2 Hrs | Done | 19th July | 19th July | |
C | Implement Pause/Resume Handlers and their Endpoints: add two endpoints which will be used to receive requests to pause or resume the device. Create the pause/resume handlers in libp2p/handler.go. The handlers should call a function to update the device's status in the DHT. | 7 Hrs | Done | 20th July | 21st July | Device 'status' to be updated is actually the 'IsAvailable' field. |
D | Modify the DHT filtering by adjusting how the DHT filters peers based on the IsAvailable attribute in filter.go file. | 3 Hrs | Done | 21st July | 21st July | Filtering should be done based on the value of the 'IsAvailable' field. |
E | Modify the job deployment mechanism to use the DHT filtering function to ensure that paused (offline) devices do not receive new job deployments. | 1 Hr | Done | 24th July | 24th July | |
F | Add CLI commands that allows a user to pause and resume their device. The commands will interact with the PauseDevice and ResumeDevice routes. | 6 Hrs | Done | 24th July | 26th July | The instruction section of the CLI nunet script will also be modified to inform users of the pause and resume commands |
G | Testing & Documentation | 6-7 Hrs | Done | 26th July | 7th August |
Edited by Ahmed Melouk