cloudmesh / client

Deprecated: Version 3 of cloudmesh is a light weight cloud client to manage virtual clusters
http://cloudmesh.github.io/client
Other
3 stars 12 forks source link

cm vm delete should accept a list of names #250

Open badmutex opened 7 years ago

badmutex commented 7 years ago
ISSUE TYPE
+------------------+---------+
| name             | version |
+------------------+---------+
| python           | 2.7.12  |
| pip              | 8.1.2   |
| cloudmesh_client | 4.3.7   |
| git hash         | af78a7c |
+------------------+---------+
You are running a supported version of python: 2.7.12
You are running a supported version of pip: 8.1.2
CM INFO
+-------------+-------------------------+
| Attribute   | Value                   |
+-------------+-------------------------+
| cloud       | chameleon               |
| key         | gambit                  |
| user        | badi                    |
| vm          | badi-011                |
| group       | default                 |
| secgroup    | default                 |
| counter     | 9                       |
| image       | Ubuntu-Server-14.04-LTS |
| flavor      | m1.small                |
| refresh     | on                      |
| debug       | True                    |
| interactive | None                    |
| purge       | None                    |
+-------------+-------------------------+
OS / ENVIRONMENT
SUMMARY

The documentation for cm vm delete implies that multiple VM names may be specified. However, the syntax used does not conform to docopts multiple argument syntax:

Current relevant documentation:

$ cm help vm
[...]
        vm delete [NAMES]
[...]
        vm delete [options...]
            Delete servers of a cloud, user may delete a server by its name or id, delete servers
            of a group or servers of a cloud, give prefix and/or range to find servers by their names.
            Or user may specify more options to narrow the search

Using the docopt synctax this would change to:

        vm delete [NAME...]

Effect

Instead of:

for i in 1 2 3 4 5; do
  cm vm delete $USER-00$i
done

Use:

cm vm delete $USER-00{1,2,3}
laszewsk commented 7 years ago

We have that feature in the comet client, so it should be easy to copy from there.

On Oct 20, 2016, at 1:37 PM, badi notifications@github.com wrote:

ISSUE TYPE

Feature Idea CM VERSION

+------------------+---------+ | name | version | +------------------+---------+ | python | 2.7.12 | | pip | 8.1.2 | | cloudmesh_client | 4.3.7 | | git hash | af78a7c | +------------------+---------+ You are running a supported version of python: 2.7.12 You are running a supported version of pip: 8.1.2 CM INFO

+-------------+-------------------------+ | Attribute | Value | +-------------+-------------------------+ | cloud | chameleon | | key | gambit | | user | badi | | vm | badi-011 | | group | default | | secgroup | default | | counter | 9 | | image | Ubuntu-Server-14.04-LTS | | flavor | m1.small | | refresh | on | | debug | True | | interactive | None | | purge | None | +-------------+-------------------------+ OS / ENVIRONMENT

SUMMARY

The documentation for cm vm delete implies that multiple VM names may be specified. However, the syntax used does not conform to docopts multiple argument syntax:

Current relevant documentation:

$ cm help vm [...] vm delete [NAMES] [...] vm delete [options...] Delete servers of a cloud, user may delete a server by its name or id, delete servers of a group or servers of a cloud, give prefix and/or range to find servers by their names. Or user may specify more options to narrow the search Using the docopt synctax this would change to:

    vm delete [NAME...]

Effect

Instead of:

for i in 1 2 3 4 5; do cm vm delete $USER-00$i done Use:

cm vm delete $USER-00{1,2,3} — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/cloudmesh/client/issues/250, or mute the thread https://github.com/notifications/unsubscribe-auth/AAZ8VY9957kJ4PJKolr4yIg52NIjU7cNks5q16bJgaJpZM4KcZuQ.