Bytemark Client 2.3 has been released


#1

the latest version of bytemark-client is here!

You can update it however you usually do! That’s apt-get update; apt-get upgrade on Debian and Debian-based systems (Ubuntu, Mint, etc.), brew upgrade bytemark-client on a Mac, or choco upgrade bytemark-client on Windows. On other systems, including FreeBSD and OpenBSD, follow the instructions on our website.

Here’s a rundown of the major features of this release.

Table output!

A lot of situations now allow table output (mostly the show and list commands), by adding --output-format table in the global flags (before the command), or by adding --table after the command. Similarly, JSON support is now also available on --output-format json before the command. This means you’re able to set a default output format with bytemark config set output-format table or bytemark config set output-format json. Woo :slight_smile:
Each type of thing has its own default set of fields that will be displayed in table mode, which can be overridden with --table-fields <list of fields> after the command. To find out what fields are available for each command, use --table-fields help. Perhaps a little counterintuitively, you’ll need to use that on an actual command invocation. E.g. you have to try show server some-existent-server in order to get the list.

This took is work that I begun in January as an experiment and took ages to get working in a satisfactory manner. but here it is - a table-view of a server:

» ./bytemark show server --table nsa.personal
+-------+--------------------------------+-------------------+--------+-------+------------------------+----------+------------+---------+---------+
|  ID   |            Hostname            | ManagementAddress | Memory | Cores |         Discs          | CdromURL | Autoreboot | PowerOn | Deleted |
+-------+--------------------------------+-------------------+--------+-------+------------------------+----------+------------+---------+---------+
| 20764 | nsa.personal.telyn.uk0.bigv.io | 5.28.61.70        |    256 |     1 | nsa - 5GiB, sata grade |          | true       | true    | false   |
+-------+--------------------------------+-------------------+--------+-------+------------------------+----------+------------+---------+---------+

The commands command

bytemark commands now shows you the full list of commands and subcommands available. It’s huge - there are 50 in version 2.3 and this number is going to keep growing!

What’s next?

The next release will be 2.4, including all the backups stuff (if you need backups stuff for testing, you can get it from the release-2.4 repo)

After that I’m gonna take a bit of a step back and look at the overall command structure and try to figure out a better, more logical set of commands. At the moment we have so many differently-named commands that do similar things - what’s the difference between config set, update, and set? Why do we add cd but create disk? In a world with --output-format do we need list? These are all questions that need answering, and I am certain there are many more along the way.

The command restructure is going to be the big ‘feature’ of 3.0, but there will also be lots of behind-the-scenes code changes going in too. the API portion of bytemark-client is getting a bit of a revamp too - using pointers a lot less, renaming some struct fields, removing a few a old methods that aren’t needed any more. Lots of tidying to make working with it as an API nicer, and to make experienced Go programmers less likely to think of me as a complete incompetent :grin:

Beyond that, the future is unknown! And you all have the chance to shape it by yelling at me about what you want. Please yell quietly so I don’t get startled, by emailing in to support or adding issues or even making pull-requests to our project page on github.