Skip to content

Commit d321a4c

Browse files
authored
Merge pull request #63 from dseevr/tenant_routes
Route consolidation + general docs cleanup
2 parents 9c0c2be + 56e739a commit d321a4c

12 files changed

+2127
-5127
lines changed

spec/auth_proxy.raml

+3-1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ securedBy: custom_scheme
4242

4343
/health:
4444
get:
45+
description: Returns the health status of Contiv API server and its netmaster
4546
securedBy: [ null ]
4647
responses:
4748
200:
@@ -66,12 +67,13 @@ securedBy: custom_scheme
6667

6768
/version:
6869
get:
70+
description: Returns the Contiv API server version
6971
securedBy: [ null ]
7072
responses:
7173
200:
7274
body:
7375
application/json: |
74-
{ "version": "1.0.0-beta" }
76+
{ "version": "1.0.0" }
7577
7678
/authorizations:
7779
type: {collection: {provider: auth_proxy}}

spec/auth_proxy/libraries/auth_proxy.raml

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ types:
1818
required: false
1919
description: omitted in case netmaster is unhealthy
2020
example: |
21-
{"netmaster":{"status":"healthy","version":"pv1.0.0-alpha-01-27-2017.23-16-47.UTC"},"status":"healthy","version":"1.0.0-alpha"}
21+
{"netmaster":{"status":"healthy","version":"1.0.0"},"status":"healthy","version":"1.0.0"}
2222
2323
ldap_configuration:
2424
properties:
@@ -95,7 +95,7 @@ types:
9595
properties:
9696
username:
9797
type: string
98-
description: user name. If a local user doesn't exist by that name, AD authentication will be tried using sAMAccountName=username in BaseDN scope of the AD server (see ldap configuration for more details)
98+
description: "username. If a local user doesn't exist by that name, AD authentication will be tried using sAMAccountName=username in BaseDN scope of the AD server (see ldap configuration for more details)"
9999
password: string
100100
example:
101101
username: johndoe

spec/auth_proxy/schemas/collection-item.raml

+17-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#%RAML 1.0 ResourceType
22
description: Entity representing <<resourcePathName|!singularize>>
33
get:
4-
description: returns <<resourcePathName|!singularize>>.
4+
description: Returns a <<resourcePathName|!singularize>>.
55
responses:
66
200:
77
body:
@@ -12,11 +12,25 @@ get:
1212
application/json: |
1313
{"message": "<<resourcePathName|!singularize>> not found" }
1414
delete:
15-
description: deletes <<resourcePathName|!singularize>>.
15+
description: Deletes a <<resourcePathName|!singularize>>.
1616
responses:
1717
204:
1818
put?:
19-
description: updates/creates <<resourcePathName|!singularize>>
19+
description: Updates a <<resourcePathName|!singularize>>
20+
body:
21+
application/json:
22+
type: <<provider>>.upd_<<resourcePathName|!singularize>>
23+
responses:
24+
200:
25+
body:
26+
application/json:
27+
type: <<provider>>.<<resourcePathName|!singularize>>
28+
404:
29+
body:
30+
application/json: |
31+
{"message": "<<resourcePathName|!singularize>> not found" }
32+
patch?:
33+
description: Updates part of a <<resourcePathName|!singularize>>
2034
body:
2135
application/json:
2236
type: <<provider>>.upd_<<resourcePathName|!singularize>>
@@ -29,4 +43,3 @@ put?:
2943
body:
3044
application/json: |
3145
{"message": "<<resourcePathName|!singularize>> not found" }
32-

spec/auth_proxy/schemas/collection.raml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
#%RAML 1.0 ResourceType
22
description: A collection of <<resourcePathName>>
33
get:
4-
description: returns a list of <<resourcePathName|!singularize>>.
4+
description: Returns a list of <<resourcePathName|!pluralize>>.
55
responses:
66
200:
77
body:
88
application/json:
9-
type: <<provider>>.<<resourcePathName>>
9+
type: <<provider>>.<<resourcePathName|!pluralize>>
1010
post:
11-
description: Add a new <<resourcePathName|!singularize>>.
11+
description: Create a new <<resourcePathName|!singularize>>.
1212
body:
1313
application/json:
1414
type: <<provider>>.<<resourcePathName|!singularize>>

spec/auth_proxy/schemas/non-upd-collection-item.raml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#%RAML 1.0 ResourceType
22
description: Entity representing <<resourcePathName|!singularize>>
33
get:
4-
description: returns <<resourcePathName|!singularize>>.
4+
description: Returns a <<resourcePathName|!singularize>>.
55
responses:
66
200:
77
body:
@@ -12,7 +12,7 @@ get:
1212
application/json: |
1313
{"message": "<<resourcePathName|!singularize>> not found" }
1414
delete:
15-
description: deletes <<resourcePathName|!singularize>>.
15+
description: Deletes a <<resourcePathName|!singularize>>.
1616
responses:
1717
204:
1818

spec/auth_proxy/schemas/ro-collection-item.raml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#%RAML 1.0 ResourceType
22
description: Entity representing <<resourcePathName|!singularize>>
33
get:
4-
description: returns <<resourcePathName|!singularize>>.
4+
description: Returns a <<resourcePathName|!singularize>>.
55
responses:
66
200:
77
body:

spec/docs/contiv.html

+2,070-5,040
Large diffs are not rendered by default.

spec/netmaster.raml

+16-62
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,7 @@ securedBy: custom_scheme
4444
/aciGw:
4545
type: {ro-collection-item: {provider: netmaster}}
4646
/appProfiles:
47-
/{appProfileName}:
48-
type: {ro-collection-item: {provider: netmaster}}
49-
/{tenantName}:
47+
/{tenantName}:{appProfileName}:
5048
type: {ro-collection-item: {provider: netmaster}}
5149
/Bgps:
5250
/{hostname}:
@@ -55,44 +53,28 @@ securedBy: custom_scheme
5553
/{endpointID}:
5654
type: {ro-collection-item: {provider: netmaster}}
5755
/endpointGroups:
58-
/{tenantName}:
59-
type: {ro-collection-item: {provider: netmaster}}
60-
/{groupName}:
56+
/{tenantName}:{groupName}:
6157
type: {ro-collection-item: {provider: netmaster}}
6258
/extContractsGroups:
63-
/{tenantName}:
64-
type: {ro-collection-item: {provider: netmaster}}
65-
/{contractsGroupName}:
59+
/{tenantName}:{contractsGroupName}:
6660
type: {ro-collection-item: {provider: netmaster}}
6761
/globals:
6862
/global:
6963
type: {ro-collection-item: {provider: netmaster}}
7064
/netprofiles:
71-
/{tenantName}:
72-
type: {ro-collection-item: {provider: netmaster}}
73-
/{profileName}:
65+
/{tenantName}:{profileName}:
7466
type: {ro-collection-item: {provider: netmaster}}
7567
/networks:
76-
/{tenantName}:
77-
type: {ro-collection-item: {provider: netmaster}}
78-
/{networkName}:
68+
/{tenantName}:{networkName}:
7969
type: {ro-collection-item: {provider: netmaster}}
8070
/policys:
81-
/{tenantName}:
82-
type: {ro-collection-item: {provider: netmaster}}
83-
/{policyName}:
71+
/{tenantName}:{policyName}:
8472
type: {ro-collection-item: {provider: netmaster}}
8573
/rules:
86-
/{tenantName}:
87-
type: {ro-collection-item: {provider: netmaster}}
88-
/{policyName}:
89-
type: {ro-collection-item: {provider: netmaster}}
90-
/{ruleId}:
74+
/{tenantName}:{policyName}:{ruleId}:
9175
type: {ro-collection-item: {provider: netmaster}}
9276
/serviceLBs:
93-
/{tenantName}:
94-
type: {ro-collection-item: {provider: netmaster}}
95-
/{serviceName}:
77+
/{tenantName}:{serviceName}:
9678
type: {ro-collection-item: {provider: netmaster}}
9779
/tenants:
9880
/{tenantName}:
@@ -111,11 +93,7 @@ securedBy: custom_scheme
11193
type: {collection: {provider: netmaster}}
11294
displayName: Application Profiles
11395

114-
/{tenantName}:
115-
type: {collection-item: {provider: netmaster}}
116-
put:
117-
118-
/{appProfileName}:
96+
/{tenantName}:{appProfileName}:
11997
type: {collection-item: {provider: netmaster}}
12098
put:
12199

@@ -131,20 +109,14 @@ securedBy: custom_scheme
131109
/endpointGroups:
132110
type: {collection: {provider: netmaster}}
133111
displayName: Endpoint Groups
134-
/{tenantName}:
135-
type: {collection-item: {provider: netmaster}}
136-
put:
137-
/{groupName}:
112+
/{tenantName}:{groupName}:
138113
type: {collection-item: {provider: netmaster}}
139114
put:
140115

141116
/extContractsGroups:
142117
type: {collection: {provider: netmaster}}
143118
displayName: External Contract Groups
144-
/{tenantName}:
145-
type: {collection-item: {provider: netmaster}}
146-
put:
147-
/{contractsGroupName}:
119+
/{tenantName}:{contractsGroupName}:
148120
type: {collection-item: {provider: netmaster}}
149121
put:
150122

@@ -161,53 +133,35 @@ securedBy: custom_scheme
161133
/netprofiles:
162134
type: {collection: {provider: netmaster}}
163135
displayName: Network Profiles
164-
/{tenantName}:
165-
type: {collection-item: {provider: netmaster}}
166-
put:
167-
/{profileName}:
136+
/{tenantName}:{profileName}:
168137
type: {collection-item: {provider: netmaster}}
169138
put:
170139

171140
/networks:
172141
type: {collection: {provider: netmaster}}
173142
displayName: Networks
174-
/{tenantName}:
175-
type: {collection-item: {provider: netmaster}}
176-
put:
177-
/{networkName}:
143+
/{tenantName}:{networkName}:
178144
type: {collection-item: {provider: netmaster}}
179145
put:
180146

181147
/policys:
182148
type: {collection: {provider: netmaster}}
183149
displayName: Policies
184-
/{tenantName}:
185-
type: {collection-item: {provider: netmaster}}
186-
put:
187-
/{policyName}:
150+
/{tenantName}:{policyName}:
188151
type: {collection-item: {provider: netmaster}}
189152
put:
190153

191154
/rules:
192155
type: {collection: {provider: netmaster}}
193156
displayName: Rules
194-
/{tenantName}:
195-
type: {collection-item: {provider: netmaster}}
196-
put:
197-
/{policyName}:
198-
type: {collection-item: {provider: netmaster}}
199-
put:
200-
/{ruleId}:
157+
/{tenantName}:{policyName}:{ruleId}:
201158
type: {collection-item: {provider: netmaster}}
202159
put:
203160

204161
/serviceLBs:
205162
type: {collection: {provider: netmaster}}
206163
displayName: Service Load Balancers
207-
/{tenantName}:
208-
type: {collection-item: {provider: netmaster}}
209-
put:
210-
/{serviceName}:
164+
/{tenantName}:{serviceName}:
211165
type: {collection-item: {provider: netmaster}}
212166
put:
213167

spec/netmaster/schemas/collection-item.raml

+7-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#%RAML 1.0 ResourceType
22
description: Entity representing <<resourcePathName|!singularize>>
33
get:
4-
description: returns <<resourcePathName|!singularize>>.
4+
description: Returns a <<resourcePathName|!singularize>>.
55
responses:
66
200:
77
body:
@@ -12,19 +12,20 @@ get:
1212
application/json: |
1313
{"message": "<<resourcePathName|!singularize>> not found" }
1414
post:
15-
description: Add a new <<resourcePathName|!singularize>>.
15+
description: Creates a new <<resourcePathName|!singularize>>.
1616
body:
1717
application/json:
1818
type: <<provider>>.<<resourcePathName|!singularize>>
1919
responses:
20-
201:
20+
200:
2121
404:
2222
delete:
23-
description: deletes <<resourcePathName|!singularize>>.
23+
description: Deletes a <<resourcePathName|!singularize>>.
2424
responses:
25-
204:
25+
200:
26+
404:
2627
put?:
27-
description: updates/creates <<resourcePathName|!singularize>>
28+
description: Updates a <<resourcePathName|!singularize>>
2829
body:
2930
application/json:
3031
type: <<provider>>.upd_<<resourcePathName|!singularize>>
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#%RAML 1.0 ResourceType
22
description: A collection of <<resourcePathName>>
33
get:
4-
description: returns a list of <<resourcePathName|!singularize>>.
4+
description: Returns a list of <<resourcePathName|!pluralize>>.
55
responses:
66
200:
77
body:
88
application/json:
9-
type: <<provider>>.<<resourcePathName>>
9+
type: <<provider>>.<<resourcePathName|!pluralize>>
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#%RAML 1.0 ResourceType
22
description: Entity representing <<resourcePathName|!singularize>>
33
get:
4-
description: returns <<resourcePathName|!singularize>>.
4+
description: Returns a <<resourcePathName|!singularize>>.
55
responses:
66
200:
77
body:
@@ -12,7 +12,7 @@ get:
1212
application/json: |
1313
{"message": "<<resourcePathName|!singularize>> not found" }
1414
delete:
15-
description: deletes <<resourcePathName|!singularize>>.
15+
description: Deletes a <<resourcePathName|!singularize>>.
1616
responses:
17-
204:
17+
200:
1818

spec/netmaster/schemas/ro-collection-item.raml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#%RAML 1.0 ResourceType
22
description: Entity representing <<resourcePathName|!singularize>>
33
get:
4-
description: returns <<resourcePathName|!singularize>>.
4+
description: Returns a <<resourcePathName|!singularize>>.
55
responses:
66
200:
77
body:

0 commit comments

Comments
 (0)