Skip to content

Swagger generated F5 iControl REST client libraries for go

License

Notifications You must be signed in to change notification settings

bmarshall13/go-bigip-rest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
Sorry, we had to truncate this directory to 1,000 files. 229 entries were omitted from the list.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

⚠️ Unreleased, and under development ⚠️

This is a work in progress to define the BigIP REST api in swagger, and use swagger-codegen to produce a library.

Go API client for f5api

REST API for F5 BigIP. List of operations is not complete, nor known to be accurate.

Overview

This API client was generated by the swagger-codegen project. By using the swagger-spec from a remote server, you can easily generate an API client.

  • API version: 12.0
  • Package version: v0.0.1-3-g67a31cb
  • Build package: class io.swagger.codegen.languages.GoClientCodegen
  • Build Info: Codegen IMG: 008d236784eb

For more information, please visit https://devcentral.f5.com/

Installation

Install the package into your project dir

go get github.com/bmarshall13/go-bigip-rest

Example

Here is a simple example to list virtual servers:

package main

import (
	"flag"
	"fmt"
	"github.com/bmarshall13/go-bigip-rest"
)

func main() {
	user := flag.String("user", "admin", "username on BIG-IP")
	pass := flag.String("pass", "admin", "password on BIG-IP")
	tlsNoVerify := flag.Bool("skipTlsVerify", false, "Don't verifiy BigIP certificate")
	flag.Parse()
	if flag.NArg() != 1 {
		panic(fmt.Sprintf("Usage: f5api [--user USER] [--pass PASS] [--skipTlsVerify] <bigip>\n"))
	}
	host := flag.Arg(0)

	fmt.Printf("Connecting to BIG-IP %v (%v/%v)\n", host, *user, *pass)

	f5 := f5api.NewClient(host, *user, *pass, *tlsNoVerify)
	err := f5.DoLogin()
	if err != nil {
		panic(fmt.Sprintf("Error logging in: %v", err))
	}

	// Example: list all the virtuals (compare to "show /ltm virtual")
	virtuals, err := f5.Ltm.GetVirtualList()
	if err != nil {
		panic(fmt.Sprintf("Error getting list of virtual servers: %v", err))
	}
	for _, virtual := range virtuals.Items {
		fmt.Printf("Virtual %v Destination %v\n", virtual.Name, virtual.Destination)
	}
}

Documentation for API Endpoints

Operations are grouped by the first API path element:

Author

About

Swagger generated F5 iControl REST client libraries for go

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages