Serge Bazanski | 8d7843c | 2018-10-04 10:37:36 +0100 | [diff] [blame] | 1 | syntax = "proto3"; |
2 | |||||
Sergiusz Bazanski | 838cf65 | 2019-07-16 23:31:25 +0200 | [diff] [blame] | 3 | package topo; |
Sergiusz Bazanski | 61594bb | 2019-07-21 15:20:51 +0200 | [diff] [blame] | 4 | option go_package = "code.hackerspace.pl/hscloud/dc/topo/proto"; |
Serge Bazanski | 477ffe7 | 2018-10-25 05:36:18 -0700 | [diff] [blame] | 5 | |
Serge Bazanski | 8d7843c | 2018-10-04 10:37:36 +0100 | [diff] [blame] | 6 | message Config { |
7 | repeated Switch switch = 1; | ||||
Serge Bazanski | 9709eef | 2018-10-05 16:34:28 -0700 | [diff] [blame] | 8 | repeated Machine machine = 2; |
Serge Bazanski | 8d7843c | 2018-10-04 10:37:36 +0100 | [diff] [blame] | 9 | }; |
10 | |||||
11 | message Switch { | ||||
12 | string name = 1; | ||||
Serge Bazanski | 16e4ba2 | 2018-10-07 00:22:52 +0100 | [diff] [blame] | 13 | string control_address = 2; |
Serge Bazanski | 9709eef | 2018-10-05 16:34:28 -0700 | [diff] [blame] | 14 | message SwitchPort { |
15 | string name = 1; | ||||
16 | }; | ||||
Serge Bazanski | 16e4ba2 | 2018-10-07 00:22:52 +0100 | [diff] [blame] | 17 | repeated SwitchPort managed_port = 3; |
Serge Bazanski | 9709eef | 2018-10-05 16:34:28 -0700 | [diff] [blame] | 18 | message Segment { |
19 | enum Type { | ||||
20 | TYPE_INVALID = 0; | ||||
21 | TYPE_VLAN = 1; | ||||
22 | } | ||||
23 | Type segment_type = 1; | ||||
24 | int32 vlan_id = 2; | ||||
25 | }; | ||||
Serge Bazanski | 16e4ba2 | 2018-10-07 00:22:52 +0100 | [diff] [blame] | 26 | repeated Segment available_segment = 4; |
Serge Bazanski | 8d7843c | 2018-10-04 10:37:36 +0100 | [diff] [blame] | 27 | }; |
28 | |||||
Serge Bazanski | 9709eef | 2018-10-05 16:34:28 -0700 | [diff] [blame] | 29 | message Machine { |
Serge Bazanski | 8d7843c | 2018-10-04 10:37:36 +0100 | [diff] [blame] | 30 | string name = 1; |
Serge Bazanski | 9709eef | 2018-10-05 16:34:28 -0700 | [diff] [blame] | 31 | message Port { |
32 | string name = 1; | ||||
33 | }; | ||||
34 | repeated Port managed_port = 2; | ||||
Serge Bazanski | 8d7843c | 2018-10-04 10:37:36 +0100 | [diff] [blame] | 35 | }; |