cloud-iso-client
Client for the cloud-iso-client.
Register an API token
Before using this client library, you need to register an API token under your Cloud Api account.
Add to project
To use this client, first add it to your go project by go get
from your command line
go get github.com/virtomize/cloud-iso-client
Build an ISO
Building an ISO requires two steps.
-
Create a client object by using the
NewClient
function. This requires the API token created in the UI.c := client.NewClient(cli.Token)```
-
Building the iso by using
Build
on the client object.err := c.Build(l.Output, client.BuildArgs{ Distribution: l.Distribution, Version: l.Version, Hostname: l.Hostname, Networks: []client.NetworkArgs{ { DHCP: true, NoInternet: false, }, }, }, client.BuildOpts{})
Build
requires 3 parameters:- a path to the output file
- A set of required parameters represented by the
BuildArgs
struct. This struct should be fully initialized with valid values. - A set of optional parameters represented by the
BuildOpts
struct. All members of this struct can be left initialized and the API will pick sensible default values.