Skip to content
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

Changes to update client-sdk files and documentation as per recent changes made for orphan volumes feature #25

Merged

Conversation

vdkotkar
Copy link
Contributor

@vdkotkar vdkotkar commented Feb 14, 2024

  • Changes to update client-sdk files and doc as per recent changes made for orphan volumes feature
  • There are minor formatting related changes in readme files

Testing done:
Deployed cns-manager using instructions provided on GitHub repo and verified that orphan snapshot related APIs are working.

# curl -X 'GET' 'http://<ip>:30008/1.0.0/orphansnapshots?limit=50' -H 'accept: application/json' -u "Admin:Admin" | jq
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   412  100   412    0     0  27466      0 --:--:-- --:--:-- --:--:-- 29428
{
  "totalOrphanSnapshots": 1,
  "limit": 50,
  "offset": 0,
  "orphanSnapshots": [
    {
      "volumeId": "f2e73a8b-91d2-4c86-96e3-7e136dde1d3f",
      "volumeSnapshotId": "677d55d3-b51f-4413-bb09-23bfa2b2c001",
      "datacenter": "VSAN-DC",
      "datastore": "vsanDatastore",
      "createTime": "2024-02-14 12:37:45.787118 +0000 UTC",
      "snapshotDescription": "snapshot-b8071245-ad49-499c-8b8d-83669318ae6c-f2e73a8b-91d2-4c86-96e3-7e136dde1d3f"
    }
  ],
  "retryAfterMinutes": 60
}


# curl -X 'GET' 'http://<ip>:30008/1.0.0/volumes/f2e73a8b-91d2-4c86-96e3-7e136dde1d3f/snapshots?datacenter=VSAN-DC&datastore=vsanDatastore' -H 'accept: application/json' -u "Admin:Admin" | jq
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   279  100   279    0     0    365      0 --:--:-- --:--:-- --:--:--   365
{
  "Snapshots": [
    {
      "snapshotId": "677d55d3-b51f-4413-bb09-23bfa2b2c001",
      "volumeId": "f2e73a8b-91d2-4c86-96e3-7e136dde1d3f",
      "createTime": "2024-02-14 12:37:45.787118 +0000 UTC",
      "snapshotDescription": "snapshot-b8071245-ad49-499c-8b8d-83669318ae6c-f2e73a8b-91d2-4c86-96e3-7e136dde1d3f"
    }
  ]
}


# curl -X 'DELETE' 'http://<ip>:30008/1.0.0/volumes/f2e73a8b-91d2-4c86-96e3-7e136dde1d3f/snapshots?datacenter=VSAN-DC&datastore=vsanDatastore' -H 'accept: application/json' -u "Admin:Admin" | jq
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100    69  100    69    0     0    160      0 --:--:-- --:--:-- --:--:--   160
{
  "jobId": "snapshotdeletionjob-fe04d66f-cb38-11ee-884f-e2330787a620"
}


# curl -X 'GET' 'http://<ip>:30008/1.0.0/getjobstatus?jobId=snapshotdeletionjob-fe04d66f-cb38-11ee-884f-e2330787a620' -H 'accept: application/json' -u "Admin:Admin" | jq
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   674  100   674    0     0   5912      0 --:--:-- --:--:-- --:--:--  5860
{
  "jobId": "snapshotdeletionjob-fe04d66f-cb38-11ee-884f-e2330787a620",
  "phase": "Success",
  "jobParameters": {
    "fcdId": "f2e73a8b-91d2-4c86-96e3-7e136dde1d3f",
    "datacenter": "VSAN-DC",
    "datastores": [
      "vsanDatastore"
    ],
    "snapshotPrefix": "snapshot"
  },
  "jobStatus": {
    "totalSnapshotsPlannedForDeletion": 1,
    "totalSnapshotsSuccessfullyDeleted": 1,
    "startTime": "2024-02-14T13:00:13Z",
    "endTime": "2024-02-14T13:00:15Z",
    "snapshotDeletionTasks": [
      {
        "fcdId": "f2e73a8b-91d2-4c86-96e3-7e136dde1d3f",
        "snapshotId": "677d55d3-b51f-4413-bb09-23bfa2b2c001",
        "datacenter": "VSAN-DC",
        "datastore": "vsanDatastore",
        "phase": "Success",
        "taskStartTime": "2024-02-14T13:00:14Z",
        "taskEndTime": "2024-02-14T13:00:15Z",
        "error": {}
      }
    ]
  }
}

@vmwclabot
Copy link

@vdkotkar, you must sign our contributor license agreement before your changes are merged. Click here to sign the agreement. If you are a VMware employee, read this for further instruction.

@vmwclabot
Copy link

@vdkotkar, we have received your signed contributor license agreement. The review is usually completed within a week, but may take longer under certain circumstances. Another comment will be added to the pull request to notify you when the merge can proceed.

@vmwclabot
Copy link

@vdkotkar, your company's legal contact has approved your signed contributor license agreement. It will also be reviewed by VMware, but the merge can proceed.

@vdkotkar vdkotkar marked this pull request as draft February 21, 2024 11:20
@vdkotkar vdkotkar force-pushed the release-orphan-snapshot-feature branch from 9cd1bb0 to 1f6df32 Compare March 1, 2024 09:24
@vdkotkar vdkotkar force-pushed the release-orphan-snapshot-feature branch from 1f6df32 to 9b85592 Compare March 1, 2024 09:27
@vdkotkar vdkotkar changed the title Changes to use r0.3.0 cns-manager image in deployment files Changes to update client-sdk files and documentation as per recent changes made for orphan volumes feature Mar 1, 2024
@vdkotkar vdkotkar marked this pull request as ready for review March 1, 2024 09:31
@vmwclabot
Copy link

@vdkotkar, VMware has approved your signed contributor license agreement.

@gohilankit
Copy link
Contributor

/approve
/lgtm

@gohilankit gohilankit merged commit 97c9ba2 into vmware-samples:main Mar 4, 2024
@vdkotkar vdkotkar deleted the release-orphan-snapshot-feature branch March 5, 2024 08:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants