Skip to content
This repository has been archived by the owner on Aug 3, 2022. It is now read-only.

Commit

Permalink
remove authCode (scope should suffice), add org and env to bundles.
Browse files Browse the repository at this point in the history
  • Loading branch information
theganyo committed Nov 1, 2016
1 parent 18f1188 commit 49252c3
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 12 deletions.
37 changes: 25 additions & 12 deletions apidGatewayDeploy-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,22 @@ paths:
"bundles": [
{
"bundleId": "system-bundle-rev-3",
"authCode": "@#$nike#$#$stage&#$(^#",
"uri": "file:///apid/bundles/system-bundle-release-1-1233.zip"
"uri": "file:///apid/bundles/system-bundle-release-1-1233.zip",
"scope": "@#$nike#$#$stage&#$(^#",
"org": "nike",
"env": "stage",
},{
"bundleId": "bundleA-rev-9",
"authCode": "@#$nike#$#$prod&#$(^#",
"uri": "file:///apid/bundles/bundleA-rev-9-26372.zip"
"uri": "file:///apid/bundles/bundleA-rev-9-26372.zip",
"scope": "@#$nike#$#$prod&#$(^#",
"org": "nike",
"env": "prod",
},{
"bundleId": "bundleB-rev-1",
"authCode": "@#$nike#$#$test&#$(^#",
"uri": "file:///somewhere/bundles/bundleB-rev-1-72351.zip"
"uri": "file:///somewhere/bundles/bundleB-rev-1-72351.zip",
"scope": "@#$nike#$#$test&#$(^#",
"org": "nike",
"env": "test",
}
]
}
Expand Down Expand Up @@ -126,20 +132,28 @@ definitions:
type: object
required:
- bundleId
- url
- uri
properties:
bundleId:
type: string
url:
uri:
type: string

UserBundle:
allOf:
- $ref: '#/definitions/SystemBundle'
required:
- authCode
- scope
properties:
authCode:
scope:
type: string
description: Used to convey request scope information to APID APIs
org:
type: string
description: Available for legacy purposes
env:
type: string
description: Available for legacy purposes

DeploymentResult:
type: object
Expand All @@ -158,7 +172,6 @@ definitions:
"status": "SUCCESS"
}


DeploymentResultError:
type: object
required:
Expand All @@ -176,7 +189,7 @@ definitions:
example: {
"error": {
"errorCode": 5,
"reason": "Failed to restart NGINX",
"reason": "Failed restart",
"bundleErrors": [
{
"bundleId": "system-bundle-rev-3",
Expand Down
2 changes: 2 additions & 0 deletions deployments.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ type systemBundle struct {
type dependantBundle struct {
URI string `json:"uri"`
Scope string `json:"scope"`
Org string `json:"org"`
Env string `json:"env"`
}

type bundleManifest struct {
Expand Down

0 comments on commit 49252c3

Please sign in to comment.