softlayer/softlayer-api-python-client — pull request #101 by sudorandom (2013-05-28 16:16:57+00:00)
Title: Message queue

This is my first pass at message queue support for the CLI.

This relies on issue #100.

**Module Help**
```
usage: sl messaging [] [...] [options]

Manage SoftLayer Message Queue

The available commands are:
account List all queue accounts
queue Queue-related commands
topic Topic-related commands
```

**Queues**
```
usage: sl messaging queue list [options]
sl messaging queue detail [options]
sl messaging queue create [options]
sl messaging queue modify [options]
sl messaging queue delete [] [options]
sl messaging queue push ( | [-]) [options]
sl messaging queue pop [options]

Manage queues

Queue Create/modify Options:
--visibility_interval=SECONDS Time in seconds that messages will re-appear
after being popped
--expiration=SECONDS Time in seconds that messages will live
--tags=TAGS Comma-separated list of tags

Queue Delete Options:
--force Flag to force the deletion of the queue even when there are messages

Pop Options:
--count=NUM Count of messages to pop
```

**Topics**
```
usage: sl messaging topic list [options]
sl messaging topic detail [options]
sl messaging topic create [options]
sl messaging topic delete [] [options]
sl messaging topic push ( | [-]) [options]

Manage topics and subscriptions

Topic/Subscription Create Options:
--subscription Create a subscription
--type=TYPE Type of endpoint, [Options: http, queue]
--queue-name=NAME Queue name. Required if --type is queue
--http-method=METHOD HTTP Method to use if --type is http
--http-url=URL HTTP/HTTPS URL to use. Required if --type is http
--http-body=BODY HTTP Body template to use if --type is http

Topic Delete Options:
--force Flag to force the deletion of the topic even when there are subscriptions
```

I'm not entirely happy with how creating subscriptions works. The idea is to have the create/delete commands be able to create topics as well as subscriptions. This works well for deleting subscriptions but not well for creating them. It would look like this: `sl messaging topic create --subscription --type=queue --queue_name=some_queue`. I'm just not sure what this should look like. I wish the entire thing was a bit flatter.