Skip to content
This repository has been archived by the owner on Dec 20, 2024. It is now read-only.

dcm-list-server-terminate #159

Closed
bdwilliams opened this issue Jan 20, 2015 · 4 comments
Closed

dcm-list-server-terminate #159

bdwilliams opened this issue Jan 20, 2015 · 4 comments

Comments

@bdwilliams
Copy link
Contributor

Split this utility into its own files

@bdwilliams
Copy link
Contributor Author

Listing server termination date requires extended details which are currently not available in Kraken (as of k30).

(venv)[brian:...om/bdwilliams/venv/mixcoatl]$ dcm-get infrastructure/Server --extended                                                                                                               (develop✱)
{
  "error": {
    "message": "Extended details have been disabled, please use basic or none."
  }
}

@igable
Copy link
Contributor

igable commented Jul 22, 2015

This is still the case as of DCM 11.1

@igable
Copy link
Contributor

igable commented Jul 22, 2015

As per Brian's suggestion this is indeed available in the basic version of the response (see below). A patch should be possible.

{
  "servers": [
    {
      "agentVersion": 0,
      "architecture": null,
      "budget": 1512,
      "cloud": {
        "cloudId": 1
      },
      "customer": {
        "customerId": 200
      },
      "dataCenter": {
        "dataCenterId": 1273
      },
      "description": "igable-terminate-future",
      "machineImage": {
        "machineImageId": 50705
      },
      "name": "igable-terminate-future",
      "owningGroups": [
        {
          "groupId": 1960
        }
      ],
      "owningUser": {
        "userId": 9321
      },
      "platform": "UNKNOWN",
      "providerId": null,
      "region": {
        "regionId": 1034
      },
      "serverId": 106341,
      "startDate": "2015-07-22T16:52:09.356+0000",
      "status": "CREATING",
      "terminateAfter": "2015-07-22T20:52:09.131+0000"
    }
  ]
}

@igable
Copy link
Contributor

igable commented Jul 22, 2015

Was an easy patch. Thanks @bdwilliams for the suggestion. There will be a PR shortly. Here's what the new output looks like:

(mixcoatl)➜  mixcoatl git:(feature/fix-terminate-list) ✗ dcm-list-server-terminate --all
+--------+-------+--------+-------------+-------------------------+-------+---------+-------------+
| ID     | Cloud | Region | Provider ID | Server Name             | Owner | Status  | Termination |
+--------+-------+--------+-------------+-------------------------+-------+---------+-------------+
| 106338 | 1     | 1031   | i-aa2f5d02  | doug-ubuntu072215       | 2724  | RUNNING | Never       |
| 102219 | 1     | 1031   | i-61a7d9c8  | sm-dcm                  | 1012  | RUNNING | Never       |
| 102308 | 1     | 1031   | i-7cbcf9d5  | sm-dcmk47               | 1012  | RUNNING | Never       |
| 105419 | 1     | 1034   | i-834f6a41  | igable-latest-trusty    | 9321  | RUNNING | Never       |
| 106341 | 1     | 1034   | i-f9f2c63b  | igable-terminate-future | 9321  | RUNNING | 3.65 hours  |
| 102305 | 1     | 1034   | i-e57f1027  | jds-stonith1            | 3250  | RUNNING | Never       |
| 102309 | 1     | 1034   | i-68bad4aa  | jdsstonith2             | 3250  | RUNNING | Never       |
| 85236  | 1     | 1034   | i-b8e7a77b  | puppetmaster (keep!)    | 1005  | STOPPED | Never       |
| 102363 | 1     | 1033   | i-45a9f0b2  | keithopenstack          | 1005  | RUNNING | Never       |
+--------+-------+--------+-------------+-------------------------+-------+---------+-------------+

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants