David K. Bainbridge | 528b318 | 2017-01-23 08:51:59 -0800 | [diff] [blame] | 1 | // Copyright 2012-2016 Canonical Ltd. |
| 2 | // Licensed under the LGPLv3, see LICENCE file for details. |
| 3 | |
| 4 | package gomaasapi |
| 5 | |
| 6 | import ( |
| 7 | "fmt" |
| 8 | "net/http" |
| 9 | ) |
| 10 | |
| 11 | func getVLANsEndpoint(version string) string { |
| 12 | return fmt.Sprintf("/api/%s/vlans/", version) |
| 13 | } |
| 14 | |
| 15 | // TestVLAN is the MAAS API VLAN representation |
| 16 | type TestVLAN struct { |
| 17 | Name string `json:"name"` |
| 18 | Fabric string `json:"fabric"` |
| 19 | VID uint `json:"vid"` |
| 20 | |
| 21 | ResourceURI string `json:"resource_uri"` |
| 22 | ID uint `json:"id"` |
| 23 | } |
| 24 | |
| 25 | // PostedVLAN is the MAAS API posted VLAN representation |
| 26 | type PostedVLAN struct { |
| 27 | Name string `json:"name"` |
| 28 | VID uint `json:"vid"` |
| 29 | } |
| 30 | |
| 31 | func vlansHandler(server *TestServer, w http.ResponseWriter, r *http.Request) { |
| 32 | //TODO |
| 33 | } |