If you're just looking to get started you can find the most recent stable release on our download page.
If you wish to build, and install, the latest stable-release from source you can do so with:
go get github.com/BytemarkHosting/bytemark-client/cmd/bytemark
If you prefer to track our in-development branch you can do that via:
go get -d github.com/BytemarkHosting/bytemark-client/cmd/bytemark
cd $GOPATH/src/github.com/BytemarkHosting/bytemark-client/
git checkout develop
cd cmd/bytemark
go build
If you have problems to report, or contributions to make, feel free to use the issue-tracker
The following guarantee applies to versions of bytemark-client before 4.0. The major version 4 is reserved for an upcoming series of breaking changes. Versions 5 and onwards are expected to be compatible as normal. See the "Breaking API change" section below.
In go, semantic versioning is pretty hard. We (attempt to) guarantee that the following types of changes will not occur between minor versions within the lib package and all packages under its path (e.g. lib/brain)
- Publicly-exported functions and methods will not be removed, renamed, nor will their prototypes change.
- Publicly-exported struct-type fields will not be removed, renamed, nor will their types change.
- Publicly-exported variables and constants will not be removed, renamed, nor will their types change.
It's suggested that you avoid using struct embedding or interface composition with multiple types if any of those types are from bytemark-client/lib or any packages inside - bytemark-client's types are wont to have extra fields and methods added.
The following changes are planned to occur during the 4.x version series and to be finalized in version 5.0:
- All request-making functions removed from
lib.Clientand replaced with requests in the relevant package underlib/requests. - All requests in
lib/requestsrewritten in terms of newPathertypes. lib.VirtualMachineNameandlib.GroupNamerewritten in terms of newPathertypes.lib.VirtualMachineNameandlib.GroupNamewill be moved into thelib/patherspackage.
The following breaking API change to the lib package occurred in version 3.0
-
These functions have been removed from
libFormatAccount(replaced by brain.Account.PrettyPrint)FormatVirtualMachine(replaced by brain.VirtualMachine.PrettyPrint)FormatVirtualMachineSpec(replaced by brain.VirtualMachineSpec.PrettyPrint)FormatImageInstall(replaced by brain.ImageInstall.PrettyPrint)
-
These functions have been removed from
libNewWithAuthhas been removed - uselib.NewWithURLs. It is no longer possible to pass an auth3.Client directly, but this shouldn't be an issue.
-
These functions have been altered:
lib.NewSimplehas been renamed tolib.New- the old implementation oflib.Newhas been removed.
-
These
lib.Clientmethods have been deletedParseVirtualMachineName(replaced bylib.ParseVirtualMachineName)ParseGroupName(replaced bylib.ParseGroupName)ParseAccountName(replaced bylib.ParseAccountName)AddUserAuthorizedKey(replaced bylib/requests/brain.AddUserAuthorizedKey)DeleteUserAuthorizedKey(replaced bylib/requests/brain.DeleteUserAuthorizedKey)
-
lib.NotAuthorizedErrorhas been renamed tolib.ForbiddenError
Most lib.Client methods now take lib/brain/billing structs as values, rather than as pointers. See the lib/interface.go for the full list of methods available and their new type signatures.
Almost all lib.Client struct fields are now values or slices of values instead of pointers or slices of pointers - below is a list. Two notable exceptions are brain.VirtualMachineSpec.ImageInstall and brain.VirtualMachineSpec.IPs - which may need to be null, and so remain as pointers.
lib.Request is now an interface rather than a struct - and lib.Client.BuildRequest and lib.Client.BuildRequestNoAuth now return lib.Request instead of *lib.Request
- The type of
brain.Account.Groupshas changed from[]*Groupto[]Group - The type of
brain.Backupshas changed from[]*Groupto[]Group - The type of
brain.BackupScheduleshas changed from[]*BackupScheduleto[]BackupSchedule - The type of
brain.Group.VirtualMachineshas changed from[]*VirtualMachineto[]VirtualMachine - The type of
brain.Head.CCAddresshas changed from[]*net.IPto[]net.IP - The type of
brain.IP.IPhas changed from[]*net.IPto[]net.IP - The type of
brain.IPRange.Availablehas changed from[]*math/big.Intto[]math/big.Int - The type of
brain.IPCreateRequest.IPshas changed from[]*net.IPto[]net.IP - The type of
brain.IPshas changed from[]*net.IPto[]net.IP - The type of
brain.NetworkInterface.ExtraIPshas changed frommap[string]*net.IPtomap[string]net.IP - The type of
brain.Privilegeshas changed from[]*Privilegeto[]Privilege - The type of
brain.Tail.CCAddresshas changed from*net.IPtonet.IP - The type of
brain.VirtualMachine.Discshas changed from[]*Discto[]Disc - The type of
brain.VirtualMachine.ManagementAddresshas changed from*net.IPtonet.IP - The type of
brain.VirtualMachine.NetworkInterfaceshas changed from[]*NetworkInterfaceto[]NetworkInterface - The type of
brain.VirtualMachineSpec.VirtualMachinehas changed from*VirtualMachinetoVirtualMachine - The type of
brain.VLAN.IPRangeshas changed from[]*IPRangeto[]IPRange
If you require the old API for longer you can use gopkg.in/BytemarkHosting/bytemark-client.v2/lib to refer to the package prior to this change.