Skip to content

Commit b2bc751

Browse files
authored
Add switch connected-machines endpoint (#93)
1 parent 20152f8 commit b2bc751

21 files changed

Lines changed: 1203 additions & 154 deletions

File tree

doc/index.html

Lines changed: 161 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1860,6 +1860,10 @@ <h2>Table of Contents</h2>
18601860
<a href="#metalstack.api.v2.SwitchNic"><span class="badge">M</span>SwitchNic</a>
18611861
</li>
18621862

1863+
<li>
1864+
<a href="#metalstack.api.v2.SwitchNicWithMachine"><span class="badge">M</span>SwitchNicWithMachine</a>
1865+
</li>
1866+
18631867
<li>
18641868
<a href="#metalstack.api.v2.SwitchOS"><span class="badge">M</span>SwitchOS</a>
18651869
</li>
@@ -1876,6 +1880,10 @@ <h2>Table of Contents</h2>
18761880
<a href="#metalstack.api.v2.SwitchSync"><span class="badge">M</span>SwitchSync</a>
18771881
</li>
18781882

1883+
<li>
1884+
<a href="#metalstack.api.v2.SwitchWithMachines"><span class="badge">M</span>SwitchWithMachines</a>
1885+
</li>
1886+
18791887

18801888
<li>
18811889
<a href="#metalstack.api.v2.BGPState"><span class="badge">E</span>BGPState</a>
@@ -1903,6 +1911,14 @@ <h2>Table of Contents</h2>
19031911
<a href="#metalstack%2fadmin%2fv2%2fswitch.proto">metalstack/admin/v2/switch.proto</a>
19041912
<ul>
19051913

1914+
<li>
1915+
<a href="#metalstack.admin.v2.SwitchServiceConnectedMachinesRequest"><span class="badge">M</span>SwitchServiceConnectedMachinesRequest</a>
1916+
</li>
1917+
1918+
<li>
1919+
<a href="#metalstack.admin.v2.SwitchServiceConnectedMachinesResponse"><span class="badge">M</span>SwitchServiceConnectedMachinesResponse</a>
1920+
</li>
1921+
19061922
<li>
19071923
<a href="#metalstack.admin.v2.SwitchServiceDeleteRequest"><span class="badge">M</span>SwitchServiceDeleteRequest</a>
19081924
</li>
@@ -15668,6 +15684,44 @@ <h3 id="metalstack.api.v2.SwitchNic">SwitchNic</h3>
1566815684

1566915685

1567015686

15687+
<h3 id="metalstack.api.v2.SwitchNicWithMachine">SwitchNicWithMachine</h3>
15688+
<p>SwitchNicWithMachine associates a switch port with its connected machine.</p>
15689+
15690+
15691+
<table class="field-table">
15692+
<thead>
15693+
<tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
15694+
</thead>
15695+
<tbody>
15696+
15697+
<tr>
15698+
<td>nic</td>
15699+
<td><a href="#metalstack.api.v2.SwitchNic">SwitchNic</a></td>
15700+
<td></td>
15701+
<td><p>Nic is the switch nic the machine is connected to. </p></td>
15702+
</tr>
15703+
15704+
<tr>
15705+
<td>machine</td>
15706+
<td><a href="#metalstack.api.v2.Machine">Machine</a></td>
15707+
<td></td>
15708+
<td><p>Machine connected to this nic. </p></td>
15709+
</tr>
15710+
15711+
<tr>
15712+
<td>fru</td>
15713+
<td><a href="#metalstack.api.v2.MachineFRU">MachineFRU</a></td>
15714+
<td></td>
15715+
<td><p>FRU of the connected machine. </p></td>
15716+
</tr>
15717+
15718+
</tbody>
15719+
</table>
15720+
15721+
15722+
15723+
15724+
1567115725
<h3 id="metalstack.api.v2.SwitchOS">SwitchOS</h3>
1567215726
<p>SwitchOS holds information about the NOS and versions running on the switch.</p>
1567315727

@@ -15820,6 +15874,51 @@ <h3 id="metalstack.api.v2.SwitchSync">SwitchSync</h3>
1582015874

1582115875

1582215876

15877+
<h3 id="metalstack.api.v2.SwitchWithMachines">SwitchWithMachines</h3>
15878+
<p>SwitchWithMachines contains a mapping from switch ports to connected machines.</p>
15879+
15880+
15881+
<table class="field-table">
15882+
<thead>
15883+
<tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
15884+
</thead>
15885+
<tbody>
15886+
15887+
<tr>
15888+
<td>id</td>
15889+
<td><a href="#string">string</a></td>
15890+
<td></td>
15891+
<td><p>Id of the switch. </p></td>
15892+
</tr>
15893+
15894+
<tr>
15895+
<td>partition</td>
15896+
<td><a href="#string">string</a></td>
15897+
<td></td>
15898+
<td><p>Partition of the switch. </p></td>
15899+
</tr>
15900+
15901+
<tr>
15902+
<td>rack</td>
15903+
<td><a href="#string">string</a></td>
15904+
<td></td>
15905+
<td><p>Rack of the switch. </p></td>
15906+
</tr>
15907+
15908+
<tr>
15909+
<td>connections</td>
15910+
<td><a href="#metalstack.api.v2.SwitchNicWithMachine">SwitchNicWithMachine</a></td>
15911+
<td>repeated</td>
15912+
<td><p>Connections associates switch ports with the machines connected to them. </p></td>
15913+
</tr>
15914+
15915+
</tbody>
15916+
</table>
15917+
15918+
15919+
15920+
15921+
1582315922

1582415923

1582515924
<h3 id="metalstack.api.v2.BGPState">BGPState</h3>
@@ -15980,6 +16079,61 @@ <h2 id="metalstack/admin/v2/switch.proto">metalstack/admin/v2/switch.proto</h2><
1598016079
<p></p>
1598116080

1598216081

16082+
<h3 id="metalstack.admin.v2.SwitchServiceConnectedMachinesRequest">SwitchServiceConnectedMachinesRequest</h3>
16083+
<p>SwitchServiceConnectedMachinesRequest.</p>
16084+
16085+
16086+
<table class="field-table">
16087+
<thead>
16088+
<tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
16089+
</thead>
16090+
<tbody>
16091+
16092+
<tr>
16093+
<td>query</td>
16094+
<td><a href="#metalstack.api.v2.SwitchQuery">metalstack.api.v2.SwitchQuery</a></td>
16095+
<td></td>
16096+
<td><p>Query to filter the switch results. </p></td>
16097+
</tr>
16098+
16099+
<tr>
16100+
<td>machine_query</td>
16101+
<td><a href="#metalstack.api.v2.MachineQuery">metalstack.api.v2.MachineQuery</a></td>
16102+
<td></td>
16103+
<td><p>MachineQuery to filter the machine results. </p></td>
16104+
</tr>
16105+
16106+
</tbody>
16107+
</table>
16108+
16109+
16110+
16111+
16112+
16113+
<h3 id="metalstack.admin.v2.SwitchServiceConnectedMachinesResponse">SwitchServiceConnectedMachinesResponse</h3>
16114+
<p>SwitchServiceConnectedMachinesResponse.</p>
16115+
16116+
16117+
<table class="field-table">
16118+
<thead>
16119+
<tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
16120+
</thead>
16121+
<tbody>
16122+
16123+
<tr>
16124+
<td>switches_with_machines</td>
16125+
<td><a href="#metalstack.api.v2.SwitchWithMachines">metalstack.api.v2.SwitchWithMachines</a></td>
16126+
<td>repeated</td>
16127+
<td><p>SwitchesWithMachines contains all switches with their machine connections. </p></td>
16128+
</tr>
16129+
16130+
</tbody>
16131+
</table>
16132+
16133+
16134+
16135+
16136+
1598316137
<h3 id="metalstack.admin.v2.SwitchServiceDeleteRequest">SwitchServiceDeleteRequest</h3>
1598416138
<p>SwitchServiceDeleteRequest.</p>
1598516139

@@ -16416,6 +16570,13 @@ <h3 id="metalstack.admin.v2.SwitchService">SwitchService</h3>
1641616570
<td><p>Port set the port status of a switch port.</p></td>
1641716571
</tr>
1641816572

16573+
<tr>
16574+
<td>ConnectedMachines</td>
16575+
<td><a href="#metalstack.admin.v2.SwitchServiceConnectedMachinesRequest">SwitchServiceConnectedMachinesRequest</a></td>
16576+
<td><a href="#metalstack.admin.v2.SwitchServiceConnectedMachinesResponse">SwitchServiceConnectedMachinesResponse</a></td>
16577+
<td><p>ConnectedMachines lists all switches with their machine connections.</p></td>
16578+
</tr>
16579+
1641916580
</tbody>
1642016581
</table>
1642116582

go/metalstack/admin/v2/adminv2connect/switch.connect.go

Lines changed: 41 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)