Skip to content

Commit

Permalink
arista/inventory.v1 : add user name in deviceDecommissionConfig
Browse files Browse the repository at this point in the history
- add userName in deviceDecommisionConfig
- user name field is used to show on cvp portal for decommissioned devices

Change-Id: I8991784a09ad545cbdb5d0411de6d7095198f202
  • Loading branch information
vaibhavsalve8 committed Aug 20, 2024
1 parent 565d024 commit 1661fc3
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
5 changes: 5 additions & 0 deletions arista/inventory.v1/inventory-changelog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@
# New entries go on top.

Changes:
- date: 2024-08-13
description: Add field user_name in DeviceDecommissioningConfig
version: 1.1.1
cvaas: true
onprem: true
- date: 2024-05-09
description: Update GetSome, SetSome, DeleteSome REST endpoints
version: 1.1.0
Expand Down
8 changes: 7 additions & 1 deletion arista/inventory.v1/inventory.proto
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import "fmp/inet.proto";

// StreamingStatus defines the status of telemetry streaming for a device.
enum StreamingStatus {
// STREAMING_STATUS_UNSPECIFIED indicates the device streaming telemetry status is unspecified.
STREAMING_STATUS_UNSPECIFIED = 0;
// STREAMING_STATUS_INACTIVE indicates the device is not streaming telemetry.
STREAMING_STATUS_INACTIVE = 1;
Expand All @@ -26,6 +27,7 @@ enum StreamingStatus {
// OnboardingStatus defines the set of possible states in the onboarding process
// for a device.
enum OnboardingStatus {
// ONBOARDING_STATUS_UNSPECIFIED indicates onboarding status is unspecified.
ONBOARDING_STATUS_UNSPECIFIED = 0;
// ONBOARDING_STATUS_IN_PROGRESS indicates onboarding is in progress.
ONBOARDING_STATUS_IN_PROGRESS = 1;
Expand All @@ -38,6 +40,7 @@ enum OnboardingStatus {
// DecommissioningStatus defines the set of possible states in the decommissioning
// process for a device.
enum DecommissioningStatus {
// DECOMMISSIONING_STATUS_UNSPECIFIED indicates decommissioning status is unspecified.
DECOMMISSIONING_STATUS_UNSPECIFIED = 0;
// DECOMMISSIONING_STATUS_IN_PROGRESS indicates decommissioning is in progress.
DECOMMISSIONING_STATUS_IN_PROGRESS = 1;
Expand All @@ -50,6 +53,7 @@ enum DecommissioningStatus {
// ProvisioningStatus defines the set of possible states in the provisioning
// process for a device.
enum ProvisioningStatus {
// PROVISIONING_STATUS_UNSPECIFIED indicates provisioning status is unspecified.
PROVISIONING_STATUS_UNSPECIFIED = 0;
// PROVISIONING_STATUS_IN_PROGRESS indicates provisioning is in progress.
PROVISIONING_STATUS_IN_PROGRESS = 1;
Expand Down Expand Up @@ -164,9 +168,11 @@ message DeviceDecommissioningConfig {
// the decommission would fail. In case of a forced decommission, such blocking
// tasks would be ignored and decommissioning will be continued.
google.protobuf.BoolValue force = 3;
// user_name is name of the user who decommissioned the device.
google.protobuf.StringValue user_name = 4;
}

// DeviceOnboarding describes the status of a decommissioning process.
// DeviceDecommissioning describes the status of a decommissioning process.
message DeviceDecommissioning {
option (fmp.model) = "ro";

Expand Down
4 changes: 4 additions & 0 deletions arista/inventory.v1/services.gen.swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -2955,6 +2955,10 @@
"force": {
"type": "boolean",
"description": "force is a flag that indicates if the decommission is to be forced.\nNormally, if there are pending or in-progress tasks associated with the device\nthe decommission would fail. In case of a forced decommission, such blocking\ntasks would be ignored and decommissioning will be continued."
},
"userName": {
"type": "string",
"description": "user_name is username of the user who decommissioned the device."
}
},
"description": "DeviceDecommissioningConfig describes a device decommissioning request.\n\"Decommissioning\" refers to the process of stopping device streaming to\nCloudVision and removing it from CloudVision's inventory.\n\nThe request flow works as follows:\n\n1. Set on DeviceDecommissioningConfig sends a decommissioning request with\n a UUID that the user is responsible for generating.\n2. Once the server receives the request, it validates and records it.\n3. Then, the server processes it, initiating the decommissioning procedure\n and tracking the status of the decommissioning attempt.\n4. The user may do a GetOne or Subscribe on DeviceDecommissioning using the\n same UUID to see the status of the request."
Expand Down

0 comments on commit 1661fc3

Please sign in to comment.