Skip to content

Commit 971e9a7

Browse files
committed
Merge branch '654-summary-user'
2 parents 6c9fe48 + abf6ebf commit 971e9a7

File tree

18 files changed

+1044
-8
lines changed

18 files changed

+1044
-8
lines changed

cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/users/ReactorUsers.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
import org.cloudfoundry.client.v2.users.DeleteUserResponse;
2323
import org.cloudfoundry.client.v2.users.ListUsersRequest;
2424
import org.cloudfoundry.client.v2.users.ListUsersResponse;
25+
import org.cloudfoundry.client.v2.users.SummaryUserRequest;
26+
import org.cloudfoundry.client.v2.users.SummaryUserResponse;
2527
import org.cloudfoundry.client.v2.users.UpdateUserRequest;
2628
import org.cloudfoundry.client.v2.users.UpdateUserResponse;
2729
import org.cloudfoundry.client.v2.users.Users;
@@ -64,6 +66,12 @@ public Mono<ListUsersResponse> list(ListUsersRequest request) {
6466
.checkpoint();
6567
}
6668

69+
@Override
70+
public Mono<SummaryUserResponse> summary(SummaryUserRequest request) {
71+
return get(request, SummaryUserResponse.class, builder -> builder.pathSegment("v2", "users", request.getUserId(), "summary"))
72+
.checkpoint();
73+
}
74+
6775
@Override
6876
public Mono<UpdateUserResponse> update(UpdateUserRequest request) {
6977
return put(request, UpdateUserResponse.class, builder -> builder.pathSegment("v2", "users", request.getUserId()))

cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/users/ReactorUsersTest.java

Lines changed: 290 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 281 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,281 @@
1+
{
2+
"metadata": {
3+
"guid": "uaa-id-355",
4+
"created_at": "2016-06-08T16:41:40Z",
5+
"updated_at": "2016-06-08T16:41:26Z"
6+
},
7+
"entity": {
8+
"organizations": [
9+
{
10+
"metadata": {
11+
"guid": "a8f940a4-3b9f-4e26-9ceb-2e5062cc1513",
12+
"created_at": "2016-06-08T16:41:40Z",
13+
"updated_at": "2016-06-08T16:41:26Z"
14+
},
15+
"entity": {
16+
"name": "name-2041",
17+
"billing_enabled": false,
18+
"status": "active",
19+
"spaces": [
20+
{
21+
"metadata": {
22+
"guid": "db69758e-14e9-4fed-b69a-353a98a05a2e",
23+
"created_at": "2016-06-08T16:41:40Z",
24+
"updated_at": "2016-06-08T16:41:26Z"
25+
},
26+
"entity": {
27+
"name": "name-2043"
28+
}
29+
}
30+
],
31+
"quota_definition": {
32+
"metadata": {
33+
"guid": "6c6b51c9-823d-4c91-ab5c-9487a93360bc",
34+
"created_at": "2016-06-08T16:41:40Z",
35+
"updated_at": "2016-06-08T16:41:26Z"
36+
},
37+
"entity": {
38+
"name": "name-2042",
39+
"non_basic_services_allowed": true,
40+
"total_services": 60,
41+
"memory_limit": 20480,
42+
"trial_db_allowed": false,
43+
"total_routes": 1000,
44+
"instance_memory_limit": -1,
45+
"total_private_domains": -1,
46+
"app_instance_limit": -1,
47+
"app_task_limit": -1
48+
}
49+
},
50+
"managers": [
51+
{
52+
"metadata": {
53+
"guid": "uaa-id-355",
54+
"created_at": "2016-06-08T16:41:40Z",
55+
"updated_at": "2016-06-08T16:41:26Z"
56+
},
57+
"entity": {
58+
"admin": false,
59+
"active": false,
60+
"default_space_guid": null
61+
}
62+
}
63+
]
64+
}
65+
}
66+
],
67+
"managed_organizations": [
68+
{
69+
"metadata": {
70+
"guid": "a8f940a4-3b9f-4e26-9ceb-2e5062cc1513",
71+
"created_at": "2016-06-08T16:41:40Z",
72+
"updated_at": "2016-06-08T16:41:26Z"
73+
},
74+
"entity": {
75+
"name": "name-2041",
76+
"billing_enabled": false,
77+
"status": "active",
78+
"spaces": [
79+
{
80+
"metadata": {
81+
"guid": "db69758e-14e9-4fed-b69a-353a98a05a2e",
82+
"created_at": "2016-06-08T16:41:40Z",
83+
"updated_at": "2016-06-08T16:41:26Z"
84+
},
85+
"entity": {
86+
"name": "name-2043"
87+
}
88+
}
89+
],
90+
"quota_definition": {
91+
"metadata": {
92+
"guid": "6c6b51c9-823d-4c91-ab5c-9487a93360bc",
93+
"created_at": "2016-06-08T16:41:40Z",
94+
"updated_at": "2016-06-08T16:41:26Z"
95+
},
96+
"entity": {
97+
"name": "name-2042",
98+
"non_basic_services_allowed": true,
99+
"total_services": 60,
100+
"memory_limit": 20480,
101+
"trial_db_allowed": false,
102+
"total_routes": 1000,
103+
"instance_memory_limit": -1,
104+
"total_private_domains": -1,
105+
"app_instance_limit": -1,
106+
"app_task_limit": -1
107+
}
108+
},
109+
"managers": [
110+
{
111+
"metadata": {
112+
"guid": "uaa-id-355",
113+
"created_at": "2016-06-08T16:41:40Z",
114+
"updated_at": "2016-06-08T16:41:26Z"
115+
},
116+
"entity": {
117+
"admin": false,
118+
"active": false,
119+
"default_space_guid": null
120+
}
121+
}
122+
]
123+
}
124+
}
125+
],
126+
"billing_managed_organizations": [
127+
{
128+
"metadata": {
129+
"guid": "a8f940a4-3b9f-4e26-9ceb-2e5062cc1513",
130+
"created_at": "2016-06-08T16:41:40Z",
131+
"updated_at": "2016-06-08T16:41:26Z"
132+
},
133+
"entity": {
134+
"name": "name-2041",
135+
"billing_enabled": false,
136+
"status": "active",
137+
"spaces": [
138+
{
139+
"metadata": {
140+
"guid": "db69758e-14e9-4fed-b69a-353a98a05a2e",
141+
"created_at": "2016-06-08T16:41:40Z",
142+
"updated_at": "2016-06-08T16:41:26Z"
143+
},
144+
"entity": {
145+
"name": "name-2043"
146+
}
147+
}
148+
],
149+
"quota_definition": {
150+
"metadata": {
151+
"guid": "6c6b51c9-823d-4c91-ab5c-9487a93360bc",
152+
"created_at": "2016-06-08T16:41:40Z",
153+
"updated_at": "2016-06-08T16:41:26Z"
154+
},
155+
"entity": {
156+
"name": "name-2042",
157+
"non_basic_services_allowed": true,
158+
"total_services": 60,
159+
"memory_limit": 20480,
160+
"trial_db_allowed": false,
161+
"total_routes": 1000,
162+
"instance_memory_limit": -1,
163+
"total_private_domains": -1,
164+
"app_instance_limit": -1,
165+
"app_task_limit": -1
166+
}
167+
},
168+
"managers": [
169+
{
170+
"metadata": {
171+
"guid": "uaa-id-355",
172+
"created_at": "2016-06-08T16:41:40Z",
173+
"updated_at": "2016-06-08T16:41:26Z"
174+
},
175+
"entity": {
176+
"admin": false,
177+
"active": false,
178+
"default_space_guid": null
179+
}
180+
}
181+
]
182+
}
183+
}
184+
],
185+
"audited_organizations": [
186+
{
187+
"metadata": {
188+
"guid": "a8f940a4-3b9f-4e26-9ceb-2e5062cc1513",
189+
"created_at": "2016-06-08T16:41:40Z",
190+
"updated_at": "2016-06-08T16:41:26Z"
191+
},
192+
"entity": {
193+
"name": "name-2041",
194+
"billing_enabled": false,
195+
"status": "active",
196+
"spaces": [
197+
{
198+
"metadata": {
199+
"guid": "db69758e-14e9-4fed-b69a-353a98a05a2e",
200+
"created_at": "2016-06-08T16:41:40Z",
201+
"updated_at": "2016-06-08T16:41:26Z"
202+
},
203+
"entity": {
204+
"name": "name-2043"
205+
}
206+
}
207+
],
208+
"quota_definition": {
209+
"metadata": {
210+
"guid": "6c6b51c9-823d-4c91-ab5c-9487a93360bc",
211+
"created_at": "2016-06-08T16:41:40Z",
212+
"updated_at": "2016-06-08T16:41:26Z"
213+
},
214+
"entity": {
215+
"name": "name-2042",
216+
"non_basic_services_allowed": true,
217+
"total_services": 60,
218+
"memory_limit": 20480,
219+
"trial_db_allowed": false,
220+
"total_routes": 1000,
221+
"instance_memory_limit": -1,
222+
"total_private_domains": -1,
223+
"app_instance_limit": -1,
224+
"app_task_limit": -1
225+
}
226+
},
227+
"managers": [
228+
{
229+
"metadata": {
230+
"guid": "uaa-id-355",
231+
"created_at": "2016-06-08T16:41:40Z",
232+
"updated_at": "2016-06-08T16:41:26Z"
233+
},
234+
"entity": {
235+
"admin": false,
236+
"active": false,
237+
"default_space_guid": null
238+
}
239+
}
240+
]
241+
}
242+
}
243+
],
244+
"spaces": [
245+
{
246+
"metadata": {
247+
"guid": "db69758e-14e9-4fed-b69a-353a98a05a2e",
248+
"created_at": "2016-06-08T16:41:40Z",
249+
"updated_at": "2016-06-08T16:41:26Z"
250+
},
251+
"entity": {
252+
"name": "name-2043"
253+
}
254+
}
255+
],
256+
"managed_spaces": [
257+
{
258+
"metadata": {
259+
"guid": "db69758e-14e9-4fed-b69a-353a98a05a2e",
260+
"created_at": "2016-06-08T16:41:40Z",
261+
"updated_at": "2016-06-08T16:41:26Z"
262+
},
263+
"entity": {
264+
"name": "name-2043"
265+
}
266+
}
267+
],
268+
"audited_spaces": [
269+
{
270+
"metadata": {
271+
"guid": "db69758e-14e9-4fed-b69a-353a98a05a2e",
272+
"created_at": "2016-06-08T16:41:40Z",
273+
"updated_at": "2016-06-08T16:41:26Z"
274+
},
275+
"entity": {
276+
"name": "name-2043"
277+
}
278+
}
279+
]
280+
}
281+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/*
2+
* Copyright 2013-2017 the original author or authors.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package org.cloudfoundry.client.v2.users;
18+
19+
import org.cloudfoundry.client.v2.Resource;
20+
21+
/**
22+
* The base class for User Organization resources
23+
*/
24+
public abstract class AbstractUserOrganizationResource extends Resource<org.cloudfoundry.client.v2.users.UserOrganizationEntity> {
25+
26+
}

cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/AbstractUserResource.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
import org.cloudfoundry.client.v2.Resource;
2020

2121
/**
22-
* The base clasee for User resources
22+
* The base class for User resources
2323
*/
2424
public abstract class AbstractUserResource extends Resource<org.cloudfoundry.client.v2.users.UserEntity> {
2525

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/*
2+
* Copyright 2013-2017 the original author or authors.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package org.cloudfoundry.client.v2.users;
18+
19+
import org.cloudfoundry.client.v2.Resource;
20+
21+
/**
22+
* The base class for User Space resources
23+
*/
24+
public abstract class AbstractUserSpaceResource extends Resource<org.cloudfoundry.client.v2.users.UserSpaceEntity> {
25+
26+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/*
2+
* Copyright 2013-2017 the original author or authors.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package org.cloudfoundry.client.v2.users;
18+
19+
import org.cloudfoundry.client.v2.Resource;
20+
21+
/**
22+
* The base class for User Summary resources
23+
*/
24+
public abstract class AbstractUserSummaryResource extends Resource<org.cloudfoundry.client.v2.users.UserSummaryEntity> {
25+
26+
}

0 commit comments

Comments
 (0)