Browse Source

Inital Spec - API

Change-Id: I10257d311a7218bd2d9cca3a5d8ca3f0b4c3105c
Graham Hayes 3 years ago
parent
commit
2e72a70820
2 changed files with 279 additions and 163 deletions
  1. 279
    0
      specs/liberty/api.rst
  2. 0
    163
      specs/liberty/placeholder.rst

+ 279
- 0
specs/liberty/api.rst View File

@@ -0,0 +1,279 @@
1
+..
2
+
3
+This work is licensed under a Creative Commons Attribution 3.0 Unported License.
4
+http://creativecommons.org/licenses/by/3.0/legalcode
5
+
6
+..
7
+  This template should be in ReSTructured text. The filename in the git
8
+  repository should match the launchpad URL, for example a URL of
9
+  https://blueprints.launchpad.net/gslb/+spec/awesome-thing should be named
10
+  awesome-thing.rst .  Please do not delete any of the sections in this
11
+  template.  If you have nothing to say for a whole section, just write: None
12
+  For help with syntax, see http://sphinx-doc.org/rest.html
13
+  To test out your formatting, see http://www.tele3.cz/jbar/rest/rest.html
14
+
15
+=====
16
+ API
17
+=====
18
+
19
+https://blueprints.launchpad.net/kosmos/+spec/api
20
+
21
+We need an API, so defining it is a good start.
22
+
23
+Example JSON Snippets
24
+=====================
25
+
26
+Load Balancer JSON Snippet
27
+--------------------------
28
+
29
+ .. code-block:: json
30
+
31
+    {
32
+      "id": "f9fc6210-8efa-4492-9b4f-d87ba98f35b8",
33
+      "name": "Main Website",
34
+      "fqdn": "www.gslb.example.com.",
35
+      "domain_name": "example.com.",
36
+      "flavor": "example_1",
37
+      "status": "ACTIVE",
38
+      "links": {
39
+        "self": "http://example.gslb.openstack.org/v0.1/gslbs/f9fc6210-8efa-4492-9b4f-d87ba98f35b8",
40
+        "pools": "http://example.gslb.openstack.org/v0.1/gslbs/f9fc6210-8efa-4492-9b4f-d87ba98f35b8/pools",
41
+        "status": "http://example.gslb.openstack.org/v0.1/gslbs/f9fc6210-8efa-4492-9b4f-d87ba98f35b8/status"
42
+      }
43
+    }
44
+
45
+
46
+Pool JSON Snippet
47
+-----------------
48
+
49
+ .. code-block:: json
50
+
51
+    {
52
+      "id": "f9fc6210-8efa-4492-9b4f-d87ba98f35b8",
53
+      "name": "Main Website Pool",
54
+      "flavor": "example_1",
55
+      "status": "ACTIVE",
56
+      "members":["SEE MEMBER SNIPPETS BELOW"],
57
+      "links": {
58
+        "self": "http://example.gslb.openstack.org/v0.1/pools/f9fc6210-8efa-4492-9b4f-d87ba98f35b8",
59
+        "pool_members": "http://example.gslb.openstack.org/v0.1/pools/f9fc6210-8efa-4492-9b4f-d87ba98f35b8/pool_members",
60
+        "status": "http://example.gslb.openstack.org/v0.1/pools/f9fc6210-8efa-4492-9b4f-d87ba98f35b8/status"
61
+      }
62
+    }
63
+
64
+Pool Member JSON Snippet - Neutron LBaaS
65
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
66
+
67
+ .. code-block:: json
68
+
69
+    {
70
+      "id": "f9fc6210-8efa-4492-9b4f-d87ba98f35b8",
71
+      "name": "Main Website",
72
+      "type": "neutron_lbaas_v2",
73
+      "region": "RegionTwo",
74
+      "neutron_id": "df40954c-982a-4778-a1b2-32b93cf75af9",
75
+      "status": "ACTIVE",
76
+      "endpoints": [
77
+        "10.10.0.1"
78
+      ]
79
+    }
80
+
81
+
82
+Pool Member JSON Snippet - Neutron Port
83
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
84
+
85
+ .. code-block:: json
86
+
87
+    {
88
+      "id": "f9fc6210-8efa-4492-9b4f-d87ba98f35b8",
89
+      "name": "Main Website",
90
+      "type": "neutron_port",
91
+      "region": "RegionTwo",
92
+      "neutron_id": "78fa9c7f-f200-49df-912b-ae4679fd21e9",
93
+      "status": "ACTIVE",
94
+      "endpoints": [
95
+        "10.10.0.1"
96
+      ]
97
+    }
98
+
99
+Pool Member JSON Snippet - IP
100
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
101
+
102
+ .. code-block:: json
103
+
104
+    {
105
+      "id": "f9fc6210-8efa-4492-9b4f-d87ba98f35b8",
106
+      "name": "Main Website",
107
+      "type": "IP",
108
+      "status": "ACTIVE",
109
+      "endpoints": [
110
+        "10.10.0.1"
111
+      ]
112
+    }
113
+
114
+
115
+Monitor JSON Snippet - TCP Basic
116
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
117
+
118
+ .. code-block:: json
119
+
120
+    {
121
+      "id" : "f9fc6210-8efa-4492-9b4f-d87ba98f35b8",
122
+      "type" : "TCP",
123
+      "delay" : 20,
124
+      "timeout": 10,
125
+      "max_retries": 3,
126
+      "port" : 22,
127
+      "name": "ssh_generic"
128
+    }
129
+
130
+Monitor JSON Snippet - Ping Basic
131
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
132
+
133
+ .. code-block:: json
134
+
135
+    {
136
+      "id" : "f9fc6210-8efa-4492-9b4f-d87ba98f35b8",
137
+      "type" : "PING",
138
+      "delay" : 20,
139
+      "timeout": 10,
140
+      "max_retries": 3,
141
+      "name": "ping_generic"
142
+    }
143
+
144
+Monitor JSON Snippet - HTTP
145
+^^^^^^^^^^^^^^^^^^^^^^^^^^^
146
+
147
+ .. code-block:: json
148
+
149
+    {
150
+      "id" : "f9fc6210-8efa-4492-9b4f-d87ba98f35b8",
151
+      "delay": 20,
152
+      "timeout": 10,
153
+      "max_retries": 3,
154
+      "type": "HTTP",
155
+      "http_method": "GET",
156
+      "url_path": "/healthchecks",
157
+      "receive_string": "SUCCESS",
158
+      "expected_codes": [
159
+        200,
160
+        202
161
+      ],
162
+      "name": "http-generic",
163
+      "port" : 80
164
+    }
165
+
166
+Monitor JSON Snippet - HTTPS
167
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^
168
+
169
+ .. code-block:: json
170
+
171
+    {
172
+      "id" : "f9fc6210-8efa-4492-9b4f-d87ba98f35b8",
173
+      "delay": 20,
174
+      "timeout": 10,
175
+      "max_retries": 3,
176
+      "type": "HTTPS",
177
+      "insecure": false,
178
+      "http_method": "POST",
179
+      "payload": {
180
+        "content_type" : "application/json",
181
+        "content": "{'demo': 'JSON', 'Blob': 'of data'}"
182
+      },
183
+      "ca_cert": "<CA_CERT_BLOB>",
184
+      "url_path": "/healthchecks",
185
+      "receive_string" "SUCCESS",
186
+      "expected_codes": [
187
+        200,
188
+        202
189
+      ],
190
+      "name": "https-generic",
191
+      "port" : 443
192
+    }
193
+
194
+Endpoints
195
+=========
196
+
197
+All of these endpoints will have the usual CRUD methods available
198
+
199
+/v0.1/gslbs
200
+-----------
201
+
202
+Returns a list of GLSBs
203
+
204
+/v0.1/gslbs/<uuid>
205
+------------------
206
+
207
+Returns a GLSB
208
+
209
+/v0.1/gslbs/<uuid>/pools
210
+------------------------
211
+
212
+Returns GLSB's list of pools
213
+
214
+/v0.1/gslbs/<uuid>/history
215
+--------------------------
216
+
217
+Returns GLSB's history (up/down/degraded etc)
218
+
219
+.. note:: This may or may not make MVP. This should only be a limited history, and for MVP my just be a "last updated" field
220
+
221
+/v0.1/pools
222
+-----------
223
+
224
+Returns a list of Pools
225
+
226
+/v0.1/pools/<uuid>
227
+------------------
228
+
229
+Returns a pool
230
+
231
+/v0.1/pools/<uuid>/monitors
232
+---------------------------
233
+
234
+Returns a pool's list of monitors
235
+
236
+/v0.1/pools/<uuid>/pool_members
237
+-------------------------------
238
+
239
+Returns a pool's list of members
240
+
241
+/v0.1/pools/<uuid>/pool_members/<uuid>
242
+--------------------------------------
243
+
244
+Returns a pool member
245
+
246
+/v0.1/pools/<uuid>/pool_members/<uuid>/status
247
+---------------------------------------------
248
+
249
+Returns a pool members status (Up/Down etc)
250
+
251
+/v0.1/pools/<uuid>/pool_members/<uuid>/monitors
252
+-----------------------------------------------
253
+
254
+Returns a members list of monitors
255
+
256
+/v0.1/pools/<uuid>/status
257
+-------------------------
258
+
259
+Returns the status of a pool
260
+
261
+/v0.1/monitors
262
+--------------
263
+
264
+Returns a list of health monitors
265
+
266
+/v0.1/monitors/<uuid>
267
+---------------------
268
+
269
+Returns a monitor
270
+
271
+Implementation
272
+==============
273
+
274
+Assignee(s)
275
+-----------
276
+
277
+
278
+Primary assignee:
279
+  gslb-core

+ 0
- 163
specs/liberty/placeholder.rst View File

@@ -1,163 +0,0 @@
1
-..
2
-
3
-This work is licensed under a Creative Commons Attribution 3.0 Unported License.
4
-http://creativecommons.org/licenses/by/3.0/legalcode
5
-
6
-..
7
-  This template should be in ReSTructured text. The filename in the git
8
-  repository should match the launchpad URL, for example a URL of
9
-  https://blueprints.launchpad.net/gslb/+spec/awesome-thing should be named
10
-  awesome-thing.rst .  Please do not delete any of the sections in this
11
-  template.  If you have nothing to say for a whole section, just write: None
12
-  For help with syntax, see http://sphinx-doc.org/rest.html
13
-  To test out your formatting, see http://www.tele3.cz/jbar/rest/rest.html
14
-
15
-=============================
16
- The title of your blueprint
17
-=============================
18
-
19
-Include the URL of your launchpad blueprint:
20
-
21
-https://blueprints.launchpad.net/kosmos/+spec/example
22
-
23
-Introduction paragraph -- why are we doing anything?
24
-
25
-
26
-Problem description
27
-===================
28
-
29
-A detailed description of the problem.
30
-
31
-Proposed change
32
-===============
33
-
34
-Here is where you cover the change you propose to make in detail. How do you
35
-propose to solve this problem?
36
-
37
-If this is one part of a larger effort make it clear where this piece ends. In
38
-other words, what's the scope of this effort?
39
-
40
-Include where in the designate tree hierarchy this will reside.
41
-
42
-API Changes
43
------------
44
-
45
-Include API Changes here. If you are adding endpoints / add major modifications
46
-please ensure you have examples for calls / results - eg:
47
-
48
-POST /v2/doohickey
49
-^^^^^^^^^^^^^^^^^^
50
-
51
-This creates a doohicky.
52
-
53
-It returns an ID and the doohickey
54
-
55
-.. code-block:: http
56
-
57
-    POST /v2/doohickey HTTP/1.1
58
-    Accept: application/json
59
-    Content-Type: application/json
60
-
61
-    {
62
-        "doohickey":{
63
-            "foo":"bar"
64
-        }
65
-    }
66
-
67
-    HTTP/1.1 201 Created
68
-    Content-Type: application/json; charset=UTF-8
69
-    Location: /v2/doohickey/cddda8f0-f558-11e3-a3ac-0800200c9a66
70
-
71
-    {
72
-        "doohickey":{
73
-            "id":"cddda8f0-f558-11e3-a3ac-0800200c9a66",
74
-            "foo":"bar",
75
-            "links":{
76
-                "self" : "/v2/doohickey/cddda8f0-f558-11e3-a3ac-0800200c9a66"
77
-            }
78
-        }
79
-    }
80
-
81
-It may be usefull to add a table with the parameters, and a info about them
82
-
83
-+-----------+--------------------------------+----------+
84
-| Parameter | Description                    | Required |
85
-+===========+================================+==========+
86
-| foo       | the foo value for the doohicky | Yes      |
87
-+-----------+--------------------------------+----------+
88
-
89
-Central Changes
90
----------------
91
-
92
-Any changes to the central service
93
-
94
-Storage Changes
95
----------------
96
-
97
-Any changes to the DB. This should be a table (if creating a new table)
98
-eg:
99
-
100
-
101
-New Table - DooHickey
102
-^^^^^^^^^^^^^^^^^^^^^
103
-
104
-+-----+---------+-----------+---------+
105
-| Row | Type    | Nullable? | Unique? |
106
-+=====+=========+===========+=========+
107
-| id  | uuid    | No        | Yes     |
108
-+-----+---------+-----------+---------+
109
-| foo | VARCHAR | No        | No      |
110
-+-----+---------+-----------+---------+
111
-
112
-Other Changes
113
--------------
114
-
115
-Any other changes to Designate, broken down by which sub system is being
116
-changed
117
-
118
-Alternatives
119
-------------
120
-
121
-This is an optional section, where it does apply we'd just like a demonstration
122
-that some thought has been put into why the proposed approach is the best one.
123
-
124
-Implementation
125
-==============
126
-
127
-Assignee(s)
128
------------
129
-
130
-Who is leading the writing of the code? Or is this a blueprint where you're
131
-throwing it out there to see who picks it up?
132
-
133
-If more than one person is working on the implementation, please designate the
134
-primary author and contact.
135
-
136
-Primary assignee:
137
-  <launchpad-id or None>
138
-
139
-Can optionally can list additional ids if they intend on doing
140
-substantial implementation work on this blueprint.
141
-
142
-Milestones
143
-----------
144
-
145
-Target Milestone for completion:
146
-  Juno-1
147
-
148
-Work Items
149
-----------
150
-
151
-Work items or tasks -- break the feature up into the things that need to be
152
-done to implement it. Those parts might end up being done by different people,
153
-but we're mostly trying to understand the timeline for implementation.
154
-
155
-
156
-Dependencies
157
-============
158
-
159
-- Include specific references to specs and/or blueprints in designate, or in other
160
-  projects, that this one either depends on or is related to.
161
-
162
-- Does this feature require any new library dependencies or code otherwise not
163
-  included in OpenStack? Or does it depend on a specific version of library?

Loading…
Cancel
Save