Browse code

Remove obsolete parts of API

- Remove obsolete files
- Unify & rename /lbservices to /services
- Mark API endpoints "Not implemented" where appropriate

Vojtech Vitek (V-Teq) authored on 2014/09/17 23:46:30
Showing 7 changed files
1 1
deleted file mode 100644
2 2
Binary files a/api/build_flow.odg and /dev/null differ
3 3
deleted file mode 100644
... ...
@@ -1,11 +0,0 @@
1
-{
2
-  "id": "example",
3
-  "port": 8000,
4
-  "labels": {
5
-     "name": "nginx"
6
-  },
7
-  "selector": {
8
-     "name": "nginx"
9
-  },
10
-  "createExternalLoadBalancer": true
11
-}
12 1
deleted file mode 100644
... ...
@@ -1,10 +0,0 @@
1
-{
2
-  "id": "example",
3
-  "port": 8000,
4
-  "labels": {
5
-     "name": "nginx"
6
-  },
7
-  "selector": {
8
-     "name": "nginx"
9
-  }
10
-}
11 1
deleted file mode 100644
... ...
@@ -1,36 +0,0 @@
1
-{
2
-  "list":
3
-  [
4
-    {
5
-      "id": "53c4249f076573c0f4000001",
6
-      "name": "service-name",
7
-      "domain": "domain-id",
8
-      "desiredState": 
9
-      {
10
-        "replicas": 3,
11
-        "replicaSelector": { "name": "service-name" },
12
-        "replicaPolicy": {
13
-          "atLeast": 2
14
-        },
15
-        "activeDeployment": "a_deployment_id",
16
-        "podTemplate": 
17
-        {
18
-           "desiredState":
19
-           {
20
-             "image": "server/domain/name",
21
-             "network-ports": [
22
-               {
23
-                 "hostPort": 8080,
24
-                 "containerPort": 80
25
-               }
26
-             ],
27
-             "owner": true
28
-           },
29
-           "labels": {
30
-             "name": "service-name"
31
-           }
32
-        }
33
-      }
34
-    ]
35
-  }
36
-}
37 1
deleted file mode 100644
... ...
@@ -1,51 +0,0 @@
1
-{
2
-  "data":
3
-  {
4
-    "services": [
5
-      {
6
-        "name": "service-name",
7
-        "domain": "domain-id",
8
-        "desiredState": 
9
-        {
10
-          "replicas": 3,
11
-          "replicaSelector": { "name": "service-name" },
12
-          "replicaPolicy": {
13
-            "atLeast": 2
14
-          },
15
-          "activeDeployment": "a_deployment_id",
16
-          "podTemplate": 
17
-          {
18
-             "desiredState":
19
-             {
20
-               "image": "server/domain/name",
21
-               "network-ports": [
22
-                 {
23
-                   "hostPort": 8080,
24
-                   "containerPort": 80
25
-                 }
26
-               ],
27
-               "owner": true
28
-             },
29
-             "labels": {
30
-               "name": "service-name"
31
-             }
32
-          }
33
-        }
34
-      }
35
-    ],
36
-    "links": [
37
-      {
38
-        "id": "53c4249f076573c0f4000001",
39
-        "projectId": "myproject-1234123132",
40
-        "source": {
41
-          "serviceId": "nginx-1893747912737"
42
-        },
43
-        "destination": {
44
-          "serviceId": "ruby1.9-1237471273",
45
-          "port": 8080
46
-        }
47
-        "policy": "round-robin"
48
-      }
49
-    ]
50
-  }
51
-}
52 1
deleted file mode 100644
... ...
@@ -1,53 +0,0 @@
1
-{
2
-  "list":
3
-  [
4
-    {
5
-      "services": [
6
-        {
7
-          "name": "service-name",
8
-          "domain": "domain-id",
9
-          "desiredState": 
10
-          {
11
-            "replicas": 3,
12
-            "replicaSelector": { "name": "service-name" },
13
-            "replicaPolicy": {
14
-              "atLeast": 2
15
-            },
16
-            "activeDeployment": "a_deployment_id",
17
-            "podTemplate": 
18
-            {
19
-               "desiredState":
20
-               {
21
-                 "image": "server/domain/name",
22
-                 "network-ports": [
23
-                   {
24
-                     "hostPort": 8080,
25
-                     "containerPort": 80
26
-                   }
27
-                 ],
28
-                 "owner": true
29
-               },
30
-               "labels": {
31
-                 "name": "service-name"
32
-               }
33
-            }
34
-          }
35
-        }
36
-      ],
37
-      "links": [
38
-        {
39
-          "id": "53c4249f076573c0f4000001",
40
-          "projectId": "myproject-1234123132",
41
-          "source": {
42
-            "serviceId": "nginx-1893747912737"
43
-          },
44
-          "destination": {
45
-            "serviceId": "ruby1.9-1237471273",
46
-            "port": 8080
47
-          }
48
-          "policy": "round-robin"
49
-        }
50
-      ]
51
-    }
52
-  ]
53
-}
... ...
@@ -7,7 +7,9 @@ mediaType: application/json
7 7
 documentation:
8 8
  - title: Overview
9 9
    content: !include doc/overview.md
10
+
10 11
 /projects:
12
+  displayName: /projects (NOT IMPLEMENTED)
11 13
   get:
12 14
     description: |
13 15
       List all projects for your account.
... ...
@@ -25,26 +27,27 @@ documentation:
25 25
       example: !include examples/project.json
26 26
 
27 27
 /project/{projectID}:
28
-    get:
29
-      description: Get a specific project
30
-      responses:
31
-        200:
32
-          body:
33
-            example: !include examples/project.json
34
-    put:
35
-      description: Update a project
36
-      body:
37
-        example: !include examples/project-put.json
38
-    delete:
39
-      description: Delete a project
40
-      responses:
41
-        200:
42
-          body:
43
-            example: !include examples/status-success.json
44
-    post:
45
-      description: Instantiate a template in the given project
46
-      body:
47
-        example: !include examples/project-post.json
28
+  displayName: /project/{projectID} (NOT IMPLEMENTED)   
29
+  get:
30
+    description: Get a specific project
31
+    responses:
32
+      200:
33
+        body:
34
+          example: !include examples/project.json
35
+  put:
36
+    description: Update a project
37
+    body:
38
+      example: !include examples/project-put.json
39
+  delete:
40
+    description: Delete a project
41
+    responses:
42
+      200:
43
+        body:
44
+          example: !include examples/status-success.json
45
+  post:
46
+    description: Instantiate a template in the given project
47
+    body:
48
+      example: !include examples/project-post.json
48 49
 
49 50
 /imageRepositories:
50 51
   get:
... ...
@@ -121,72 +124,8 @@ documentation:
121 121
     body:
122 122
       example: !include examples/create-image-repository-mapping.json
123 123
 
124
-/services:
125
-  get:
126
-    description: |
127
-      Lists all services that your account has access to
128
-
129
-      Services can be public or owned by a project. They contain a template of a pod and
130
-      reference image repositories that supply the images for those templates. A service may
131
-      be configured to react to an image being pushed to an image repository by initiating a
132
-      deployment. Deployments are associated with a service and make use of
133
-      Kubernetes replication controllers to manage pods in a cluster.
134
-      For deployments, a service contains a policy that constrains how deployments can occur.
135
-      For example, it may require that there exist at least 2 operational pods at all times.
136
-      A deployment needs to operate under those constraints when making changes.
137
-    queryParameters:
138
-      projectId:
139
-        description: filter the services owned by a particular project
140
-    responses:
141
-      200:
142
-        body:
143
-          example: !include examples/services.json
144
-  post:
145
-    description: Create a new service
146
-    body:
147
-      example: !include examples/create-service.json
148
-/service/{serviceID}:
149
-    get:
150
-      description: Get a specific service definition
151
-      body:
152
-        example: !include examples/service.json
153
-    put:
154
-      description: Update a service
155
-      body:
156
-        example: !include examples/service.json
157
-    delete:
158
-      description: Delete a service
159
-      responses:
160
-        200:
161
-          body:
162
-            example: !include examples/status-success.json
163
-    /environment-variables:
164
-      get:
165
-        description: Environment variables associated with this service
166
-        responses:
167
-          200:
168
-            body:
169
-              example: !include examples/envvars.json
170
-      post:
171
-        description: Create/update environment variables
172
-        body:
173
-          example: !include examples/envvars.json
174
-      /{variableName}:
175
-        get:
176
-          description: Get environment variable
177
-          body:
178
-            example: !include examples/envvar.json
179
-        put:
180
-          description: Update an environment variable's value
181
-          body:
182
-            example: !include examples/envvar.json
183
-        delete:
184
-          description: Delete an environment variable
185
-          responses:
186
-            200:
187
-              body:
188
-                example: !include examples/status-success.json
189 124
 /deployments:
125
+  displayName: /deployments (NOT IMPLEMENTED)
190 126
   get:
191 127
     description: |
192 128
       Lists active deployments in the current project
... ...
@@ -205,11 +144,14 @@ documentation:
205 205
     body:
206 206
       example: !include examples/create-deployment.json
207 207
 /deployment/{deploymentID}:
208
+  displayName: /deployment/{deploymentID} (NOT IMPLEMENTED)
208 209
   get:
209 210
     description: Get deployment details
210 211
     body:
211 212
       example: !include examples/deployment.json
213
+
212 214
 /links:
215
+  displayName: /links (NOT IMPLEMENTED)
213 216
   get:
214 217
     description: |
215 218
       List of links between services in your account
... ...
@@ -231,6 +173,7 @@ documentation:
231 231
     body:
232 232
       example: !include examples/link.json
233 233
 /link/{linkID}:
234
+  displayName: /link/{linkID} (NOT IMPLEMENTED)
234 235
   get:
235 236
     description: Get link details
236 237
     body:
... ...
@@ -245,7 +188,9 @@ documentation:
245 245
       200:
246 246
         body:
247 247
           example: !include examples/status-success.json
248
+
248 249
 /aliases:
250
+  displayName: /aliases (NOT IMPLEMENTED)
249 251
   get:
250 252
     description: |
251 253
       List all aliases visible to you
... ...
@@ -264,6 +209,7 @@ documentation:
264 264
     body:
265 265
       example: !include examples/alias.json
266 266
 /alias/{aliasID}:
267
+  displayName: /alias/{aliasID} (NOT IMPLEMENTED)
267 268
   get:
268 269
     description: Get alias
269 270
     body:
... ...
@@ -278,6 +224,7 @@ documentation:
278 278
       200:
279 279
         body:
280 280
           example: !include examples/status-success.json
281
+
281 282
 /builds:
282 283
   get:
283 284
     description: |
... ...
@@ -354,6 +301,7 @@ documentation:
354 354
         description: No content
355 355
 
356 356
 /templates:
357
+  displayName: /templates (NOT IMPLEMENTED)
357 358
   get:
358 359
     description: |
359 360
       Lists all templates that your account has access to
... ...
@@ -363,27 +311,21 @@ documentation:
363 363
       that project.
364 364
     responses:
365 365
       200:
366
-        body:
367
-          example: !include examples/templates.json
368 366
   post:
369 367
     description: Create a new template
370
-    body:
371
-      example: !include examples/template.json
372 368
 /template/{templateID}:
369
+  displayName: /template/{templateID} (NOT IMPLEMENTED)
373 370
   get:
374 371
     description: Get a specific template
375
-    body:
376
-      example: !include examples/template.json
377 372
   put:
378 373
     description: Update a template
379
-    body:
380
-      example: !include examples/template.json
381 374
   delete:
382 375
     description: Delete a template
383 376
     responses:
384 377
       200:
385 378
         body:
386 379
           example: !include examples/status-success.json
380
+
387 381
 /pods:
388 382
   get:
389 383
     description: List all pods on this cluster
... ...
@@ -448,7 +390,7 @@ documentation:
448 448
           body:
449 449
             example: !include examples/status-success.json
450 450
 
451
-/lbservices:
451
+/services:
452 452
   get:
453 453
     description: List all services on this cluster
454 454
     responses:
... ...
@@ -459,7 +401,7 @@ documentation:
459 459
     description: Create a new service
460 460
     body:
461 461
       schema: !include doc/service-schema.json
462
-      example: !include examples/lbservice.json
462
+      example: !include examples/service.json
463 463
 
464 464
   /{serviceId}:
465 465
     get: