Skip to content

Commit 49d467b

Browse files
committed
split query to make it reusable between api and admin services
1 parent a189f26 commit 49d467b

File tree

6 files changed

+453
-533
lines changed

6 files changed

+453
-533
lines changed

doc/index.html

Lines changed: 98 additions & 126 deletions
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,10 @@ <h2>Table of Contents</h2>
379379
<a href="#metalstack.api.v2.IP"><span class="badge">M</span>IP</a>
380380
</li>
381381

382+
<li>
383+
<a href="#metalstack.api.v2.IPQuery"><span class="badge">M</span>IPQuery</a>
384+
</li>
385+
382386
<li>
383387
<a href="#metalstack.api.v2.IPServiceCreateRequest"><span class="badge">M</span>IPServiceCreateRequest</a>
384388
</li>
@@ -2590,6 +2594,93 @@ <h3 id="metalstack.api.v2.IP">IP</h3>
25902594

25912595

25922596

2597+
<h3 id="metalstack.api.v2.IPQuery">IPQuery</h3>
2598+
<p>IPQuery can be used to query a IP or a list of IP</p>
2599+
2600+
2601+
<table class="field-table">
2602+
<thead>
2603+
<tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
2604+
</thead>
2605+
<tbody>
2606+
2607+
<tr>
2608+
<td>ip</td>
2609+
<td><a href="#string">string</a></td>
2610+
<td>optional</td>
2611+
<td><p>Ip the ip to list </p></td>
2612+
</tr>
2613+
2614+
<tr>
2615+
<td>network</td>
2616+
<td><a href="#string">string</a></td>
2617+
<td>optional</td>
2618+
<td><p>Network from where the ips to list </p></td>
2619+
</tr>
2620+
2621+
<tr>
2622+
<td>project</td>
2623+
<td><a href="#string">string</a></td>
2624+
<td>optional</td>
2625+
<td><p>Project of the ips to list </p></td>
2626+
</tr>
2627+
2628+
<tr>
2629+
<td>name</td>
2630+
<td><a href="#string">string</a></td>
2631+
<td>optional</td>
2632+
<td><p>Name of this ip </p></td>
2633+
</tr>
2634+
2635+
<tr>
2636+
<td>uuid</td>
2637+
<td><a href="#string">string</a></td>
2638+
<td>optional</td>
2639+
<td><p>Uuid for which this ips should get filtered </p></td>
2640+
</tr>
2641+
2642+
<tr>
2643+
<td>machine_id</td>
2644+
<td><a href="#string">string</a></td>
2645+
<td>optional</td>
2646+
<td><p>MachineId for which this ips should get filtered </p></td>
2647+
</tr>
2648+
2649+
<tr>
2650+
<td>parent_prefix_cidr</td>
2651+
<td><a href="#string">string</a></td>
2652+
<td>optional</td>
2653+
<td><p>ParentPrefixCidr for which this ips should get filtered </p></td>
2654+
</tr>
2655+
2656+
<tr>
2657+
<td>tags</td>
2658+
<td><a href="#string">string</a></td>
2659+
<td>repeated</td>
2660+
<td><p>Tags for which this ips should get filtered </p></td>
2661+
</tr>
2662+
2663+
<tr>
2664+
<td>type</td>
2665+
<td><a href="#metalstack.api.v2.IPType">IPType</a></td>
2666+
<td>optional</td>
2667+
<td><p>Static if set to true, this will be a Static ip </p></td>
2668+
</tr>
2669+
2670+
<tr>
2671+
<td>address_family</td>
2672+
<td><a href="#metalstack.api.v2.IPAddressFamily">IPAddressFamily</a></td>
2673+
<td>optional</td>
2674+
<td><p>Addressfamily of the IPs to list, defaults to all addressfamilies </p></td>
2675+
</tr>
2676+
2677+
</tbody>
2678+
</table>
2679+
2680+
2681+
2682+
2683+
25932684
<h3 id="metalstack.api.v2.IPServiceCreateRequest">IPServiceCreateRequest</h3>
25942685
<p>IPServiceCreateRequest is the request payload for a ip create request</p>
25952686

@@ -2814,20 +2905,6 @@ <h3 id="metalstack.api.v2.IPServiceListRequest">IPServiceListRequest</h3>
28142905
</thead>
28152906
<tbody>
28162907

2817-
<tr>
2818-
<td>ip</td>
2819-
<td><a href="#string">string</a></td>
2820-
<td>optional</td>
2821-
<td><p>Ip the ip to list </p></td>
2822-
</tr>
2823-
2824-
<tr>
2825-
<td>network</td>
2826-
<td><a href="#string">string</a></td>
2827-
<td>optional</td>
2828-
<td><p>Network from where the ips to list </p></td>
2829-
</tr>
2830-
28312908
<tr>
28322909
<td>project</td>
28332910
<td><a href="#string">string</a></td>
@@ -2836,52 +2913,10 @@ <h3 id="metalstack.api.v2.IPServiceListRequest">IPServiceListRequest</h3>
28362913
</tr>
28372914

28382915
<tr>
2839-
<td>name</td>
2840-
<td><a href="#string">string</a></td>
2841-
<td>optional</td>
2842-
<td><p>Name of this ip </p></td>
2843-
</tr>
2844-
2845-
<tr>
2846-
<td>uuid</td>
2847-
<td><a href="#string">string</a></td>
2848-
<td>optional</td>
2849-
<td><p>Uuid for which this ips should get filtered </p></td>
2850-
</tr>
2851-
2852-
<tr>
2853-
<td>machine_id</td>
2854-
<td><a href="#string">string</a></td>
2855-
<td>optional</td>
2856-
<td><p>MachineId for which this ips should get filtered </p></td>
2857-
</tr>
2858-
2859-
<tr>
2860-
<td>parent_prefix_cidr</td>
2861-
<td><a href="#string">string</a></td>
2862-
<td>optional</td>
2863-
<td><p>ParentPrefixCidr for which this ips should get filtered </p></td>
2864-
</tr>
2865-
2866-
<tr>
2867-
<td>tags</td>
2868-
<td><a href="#string">string</a></td>
2869-
<td>repeated</td>
2870-
<td><p>Tags for which this ips should get filtered </p></td>
2871-
</tr>
2872-
2873-
<tr>
2874-
<td>type</td>
2875-
<td><a href="#metalstack.api.v2.IPType">IPType</a></td>
2876-
<td>optional</td>
2877-
<td><p>Static if set to true, this will be a Static ip </p></td>
2878-
</tr>
2879-
2880-
<tr>
2881-
<td>address_family</td>
2882-
<td><a href="#metalstack.api.v2.IPAddressFamily">IPAddressFamily</a></td>
2883-
<td>optional</td>
2884-
<td><p>Addressfamily of the IPs to list, defaults to all addressfamilies </p></td>
2916+
<td>query</td>
2917+
<td><a href="#metalstack.api.v2.IPQuery">IPQuery</a></td>
2918+
<td></td>
2919+
<td><p>Query to list one ore more ips </p></td>
28852920
</tr>
28862921

28872922
</tbody>
@@ -3190,73 +3225,10 @@ <h3 id="metalstack.admin.v2.IPServiceListRequest">IPServiceListRequest</h3>
31903225
<tbody>
31913226

31923227
<tr>
3193-
<td>ip</td>
3194-
<td><a href="#string">string</a></td>
3195-
<td>optional</td>
3196-
<td><p>Ip the ip to list </p></td>
3197-
</tr>
3198-
3199-
<tr>
3200-
<td>network</td>
3201-
<td><a href="#string">string</a></td>
3202-
<td>optional</td>
3203-
<td><p>Network from where the ips to list </p></td>
3204-
</tr>
3205-
3206-
<tr>
3207-
<td>project</td>
3208-
<td><a href="#string">string</a></td>
3228+
<td>query</td>
3229+
<td><a href="#metalstack.api.v2.IPQuery">metalstack.api.v2.IPQuery</a></td>
32093230
<td></td>
3210-
<td><p>Project of the ips to list </p></td>
3211-
</tr>
3212-
3213-
<tr>
3214-
<td>name</td>
3215-
<td><a href="#string">string</a></td>
3216-
<td>optional</td>
3217-
<td><p>Name of this ip </p></td>
3218-
</tr>
3219-
3220-
<tr>
3221-
<td>uuid</td>
3222-
<td><a href="#string">string</a></td>
3223-
<td>optional</td>
3224-
<td><p>Uuid for which this ips should get filtered </p></td>
3225-
</tr>
3226-
3227-
<tr>
3228-
<td>machine_id</td>
3229-
<td><a href="#string">string</a></td>
3230-
<td>optional</td>
3231-
<td><p>MachineId for which this ips should get filtered </p></td>
3232-
</tr>
3233-
3234-
<tr>
3235-
<td>parent_prefix_cidr</td>
3236-
<td><a href="#string">string</a></td>
3237-
<td>optional</td>
3238-
<td><p>ParentPrefixCidr for which this ips should get filtered </p></td>
3239-
</tr>
3240-
3241-
<tr>
3242-
<td>tags</td>
3243-
<td><a href="#string">string</a></td>
3244-
<td>repeated</td>
3245-
<td><p>Tags for which this ips should get filtered </p></td>
3246-
</tr>
3247-
3248-
<tr>
3249-
<td>type</td>
3250-
<td><a href="#metalstack.api.v2.IPType">metalstack.api.v2.IPType</a></td>
3251-
<td>optional</td>
3252-
<td><p>Static if set to true, this will be a Static ip </p></td>
3253-
</tr>
3254-
3255-
<tr>
3256-
<td>address_family</td>
3257-
<td><a href="#metalstack.api.v2.IPAddressFamily">metalstack.api.v2.IPAddressFamily</a></td>
3258-
<td>optional</td>
3259-
<td><p>Addressfamily of the IPs to list, defaults to all addressfamilies </p></td>
3231+
<td><p>Query to search for one or more ips </p></td>
32603232
</tr>
32613233

32623234
</tbody>

0 commit comments

Comments
 (0)