1and1 / oneandone-cloudserver-cli

Command-line tool for managing 1&1 Cloud Servers
Apache License 2.0
6 stars 5 forks source link

Block storage update #10

Closed aajdinov closed 6 years ago

aajdinov commented 6 years ago

Updated Go SDK dependency to the latest version which include block storage update method. Updated blockstorage to use update method from SDK, documentation, test. Incremented version to 1.2.1

aajdinov commented 6 years ago

@edevenport The PR on SPC repo was approved by @nurfet-becirevic

aajdinov commented 6 years ago

Live test scenario:

$ oneandone blockstorage list
+----------------------------------+-----------+-----------------+-------------+-------------+--------+
|                ID                |    NAME   | TOTAL SIZE (GB) |    STATE    | DATA CENTER | SERVER |
+----------------------------------+-----------+-----------------+-------------+-------------+--------+
| E3D4DD3C686F47686E65822A1DC76BC3 | cli-test1 | 20              | POWERED_ON  | US          |        |
+----------------------------------+-----------+-----------------+-------------+-------------+--------+

$ oneandone blockstorage update --id E3D4DD3C686F47686E65822A1DC76BC3 --name 'cli-test1-updated' --desc 'cli test desc updated'
OK, wait for the action to complete.

$ oneandone blockstorage list
+----------------------------------+-------------------+-----------------+-------------+-------------+--------+
|                ID                |       NAME        | TOTAL SIZE (GB) |    STATE    | DATA CENTER | SERVER |
+----------------------------------+-------------------+-----------------+-------------+-------------+--------+
| E3D4DD3C686F47686E65822A1DC76BC3 | cli-test1-updated | 20              | POWERED_ON  | US          |        |
+----------------------------------+-------------------+-----------------+-------------+-------------+--------+

$ oneandone blockstorage info --id E3D4DD3C686F47686E65822A1DC76BC3
{
    "id": "E3D4DD3C686F47686E65822A1DC76BC3",
    "name": "cli-test1-updated",
    "description": "cli test desc updated",
    "size": 20,
    "state": "POWERED_ON",
    "creation_date": "2018-05-29T10:55:11Z",
    "datacenter": {
        "id": "908DC2072407C94C8054610AD5A53B8C",
        "country_code": "US",
        "location": "United States of America"
    }
}