https://github.com/juniper/contrail-go-api
golang API bindings for OpenContrail
https://github.com/juniper/contrail-go-api
Last synced: about 1 year ago
JSON representation
golang API bindings for OpenContrail
- Host: GitHub
- URL: https://github.com/juniper/contrail-go-api
- Owner: Juniper
- License: apache-2.0
- Created: 2014-11-22T00:15:31.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2020-08-06T18:12:17.000Z (almost 6 years ago)
- Last Synced: 2025-04-09T04:26:17.609Z (about 1 year ago)
- Language: Go
- Size: 128 KB
- Stars: 11
- Watchers: 148
- Forks: 25
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://travis-ci.org/Juniper/contrail-go-api)
contrail-go-api
===============
golang API bindings for OpenContrail
The library consists on the contrail package plus an autogenerated
package "contrail-go-api/types" that contains types corresponding to
the OpenContrail datamodel defined in contrail-controller/src/schema.
The contail-go-api package can be installed with the "go get" command:
```
go get github.com/Juniper/contrail-go-api
```
The types package is generated using the command:
```
tools/generateds/generateDS.py -f -o $GOPATH/src/github.com/Juniper/contrail-go-api/types -g golang-api controller/src/schema/vnc_cfg.xsd
```
Pre-generated tar files with the generated types are also available as part of each release. The golang types corresponding to the schema defined by OpenContrail R2.20 are available at:
- https://github.com/Juniper/contrail-go-api/releases/download/1.0.0/contrail-go-api-generated-types-r2.20.tar.gz
To build the CLI command:
```
go install github.com/Juniper/contrail-go-api/cli
```
TODO items:
- Links between two identifiers often have metadata which
consists of a list of elements (e.g. association between
virtual-network and network-ipam is a list of subnets). Currently the way to modify this metadata on a link is to delete it and re-add it; the generator should generate helper methods to make manipulating these lists simpler.
- VRouter API: The library needs to be extended in order to have a class that communicates with the vrouter-agent process in order to add/delete ports.
- Provisioning taks: there is the need to capture common provisining tasks such as configuring BGP routers.
- CLI: The CLI currently supports operations on networks, policies and virtual-routers. Additional support needs to be added for other common configuration and provisioning tasks.