russmack / cloudsigmalib

A clean api for the cloudsigma core project.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cloudsigmalib

A simple, clean wrapper api for the cloudsigma core project.

Build Status


Status: Beta.


Usage

	cloud, err := cloudsigmalib.NewCloud("zrh")
	if err != nil {
		log.Fatal(err)
	}

	resp, err := cloud.GetLocations()
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println("Response:", string(resp))

	cloud.BasicAuth = &cloudsigmalib.BasicAuth{"my@email", "mypass"}

	server := cloud.NewServer()
	resp, err = server.Create("Test server 123", 1000, 536870912, "thisispass")
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println("Response:", string(resp))

	servers := cloud.NewServers()
	resp, err = servers.List()
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println("Response:", string(resp))

Example

cd examples
go run main.go

Features, so far:

  • Servers [List, Create, Delete, Start, Stop, Shutdown]
  • Drives [List, Create, Delete]
  • VLANs
  • IPs
  • ACLs
  • Tags
  • Snapshots [List, list single, create, delete]
  • Images [Download]
  • Current Usage
  • Burst Usage
  • Daily Burst Usage
  • Locations
  • Balance
  • Transactions
  • Subscriptions
  • Profile
  • Cloud Status
  • Capabilities
  • Notification Contacts [list, create]
  • Notification Preferences
  • Keypairs

License

BSD 3-Clause: LICENSE.txt

LICENSE

About

A clean api for the cloudsigma core project.

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Go 100.0%