22
33This project aims to be a simple-to-consume client library for Apstra.
44
5- It was initially developed to collect metric/event/anomaly/statistics kinds of
6- things, but could eventually support the whole Apstra API.
7-
8- It's only ever been tested against AOS 4.1.0, and 4.1.1, and will complain when
9- asked to connect to unsupported versions of AOS.
10-
11- It has three major features: Client, TwoStageL3ClosClient, and StreamTarget.
5+ Currently supports Apstra 4.2.0 - 6.0.0. It will complain when
6+ asked to connect to unsupported versions of Apstra.
127
138### Client
149The ` Client{} ` object has methods closely related to Apstra platform API
@@ -28,28 +23,20 @@ The `TwoStageL3ClosClient{}` object is intended for interaction with a single
2823* blueprint* of the ** Datacenter** reference design type. ` TwoStageL3ClosClient `
2924has both a ` Client ` and a single blueprint ID embedded within.
3025
31- ### StreamTarget
26+ ### FreeformClient
27+ The ` FreeformClient{} ` object is intended for interaction with a single
28+ * blueprint* of the ** Freeform** reference design type. ` FreeformClient `
29+ has both a ` Client ` and a single blueprint ID embedded within.
3230
31+
32+ ### StreamTarget
3333` StreamTarget ` is a listener/decoder for Apstra's "Streaming Receiver" feature.
3434
3535It has Start/Stop (listening) methods and Register/Unregister methods which
3636add Streaming Receiver configurations via the Apstra API.
3737
3838Messages and Errors are returned to the consuming code via channels.
3939
40- The proto file ` streaming-telemetry.proto ` came from an AOS server. The easiest way to grab
41- one is probably via the web UI:
42-
43- Click ` platform -> developers ` then ` Rest API Documentation ` .
44-
45- Scroll down to ` streaming-telemetry-schema-proto ` , click ` GET ` , ` Try it out ` and ` Execute `
46-
47- Render the go code by running the following in the main project directory
48- ``` shell
49- protoc --go_out=. --go_opt=Mapstra/streaming-telemetry.proto=./apstra \
50- apstra/streaming-telemetry.proto
51- ```
52-
5340### Using this library
5441
5542``` go
@@ -66,13 +53,3 @@ func main() {
6653 blueprintIds , _ := client.GetAllBlueprintIds (context.TODO ()) // error ignored
6754}
6855```
69-
70- There's an example program at ` cmd/example_streaming/main.go ` which implements
71- the streaming capability.
72-
73- ### Development
74-
75- 1 . Copy ` pre-push ` script to ` .git/hooks ` to run fast validations on ` git push ` ;
76- 2 . Use ` make ` targets to build, run tests or static analysis. This requires that
77- your environment has all the necessary tools, if not - use ` ci.Dockerfile `
78- docker image.
0 commit comments