new_cfoundry 4.8.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (269) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +8 -0
  3. data/.gitmodules +3 -0
  4. data/.rspec +2 -0
  5. data/.ruby-gemset +1 -0
  6. data/.ruby-version +1 -0
  7. data/.travis.yml +11 -0
  8. data/Checkfile +2 -0
  9. data/Gemfile +3 -0
  10. data/LICENSE +987 -0
  11. data/NOTICE +10 -0
  12. data/README.md +9 -0
  13. data/Rakefile +14 -0
  14. data/VERSION +1 -0
  15. data/cfoundry.gemspec +40 -0
  16. data/config/locales/en.yml +168 -0
  17. data/lib/cc_api_stub/app_usage_events.rb +11 -0
  18. data/lib/cc_api_stub/applications.rb +57 -0
  19. data/lib/cc_api_stub/domains.rb +32 -0
  20. data/lib/cc_api_stub/events.rb +11 -0
  21. data/lib/cc_api_stub/frameworks.rb +22 -0
  22. data/lib/cc_api_stub/helper.rb +148 -0
  23. data/lib/cc_api_stub/login.rb +21 -0
  24. data/lib/cc_api_stub/organization_users.rb +27 -0
  25. data/lib/cc_api_stub/organizations.rb +82 -0
  26. data/lib/cc_api_stub/routes.rb +26 -0
  27. data/lib/cc_api_stub/runtimes.rb +22 -0
  28. data/lib/cc_api_stub/service_bindings.rb +22 -0
  29. data/lib/cc_api_stub/service_instances.rb +22 -0
  30. data/lib/cc_api_stub/services.rb +21 -0
  31. data/lib/cc_api_stub/space_users.rb +27 -0
  32. data/lib/cc_api_stub/spaces.rb +58 -0
  33. data/lib/cc_api_stub/users.rb +85 -0
  34. data/lib/cc_api_stub.rb +20 -0
  35. data/lib/cfoundry/auth_token.rb +63 -0
  36. data/lib/cfoundry/baseclient.rb +216 -0
  37. data/lib/cfoundry/chatty_hash.rb +46 -0
  38. data/lib/cfoundry/client.rb +42 -0
  39. data/lib/cfoundry/concerns/login_helpers.rb +14 -0
  40. data/lib/cfoundry/concerns/proxy_options.rb +17 -0
  41. data/lib/cfoundry/errors.rb +163 -0
  42. data/lib/cfoundry/rest_client.rb +317 -0
  43. data/lib/cfoundry/test_support.rb +3 -0
  44. data/lib/cfoundry/trace_helpers.rb +64 -0
  45. data/lib/cfoundry/uaaclient.rb +160 -0
  46. data/lib/cfoundry/upload_helpers.rb +222 -0
  47. data/lib/cfoundry/v2/app.rb +303 -0
  48. data/lib/cfoundry/v2/app_event.rb +13 -0
  49. data/lib/cfoundry/v2/app_instance.rb +74 -0
  50. data/lib/cfoundry/v2/app_usage_event.rb +14 -0
  51. data/lib/cfoundry/v2/base.rb +108 -0
  52. data/lib/cfoundry/v2/client.rb +104 -0
  53. data/lib/cfoundry/v2/domain.rb +20 -0
  54. data/lib/cfoundry/v2/event.rb +17 -0
  55. data/lib/cfoundry/v2/helper.rb +11 -0
  56. data/lib/cfoundry/v2/managed_service_instance.rb +12 -0
  57. data/lib/cfoundry/v2/model.rb +211 -0
  58. data/lib/cfoundry/v2/model_magic/attribute.rb +49 -0
  59. data/lib/cfoundry/v2/model_magic/client_extensions.rb +170 -0
  60. data/lib/cfoundry/v2/model_magic/has_summary.rb +49 -0
  61. data/lib/cfoundry/v2/model_magic/query_multi_value_helper.rb +21 -0
  62. data/lib/cfoundry/v2/model_magic/query_value_helper.rb +33 -0
  63. data/lib/cfoundry/v2/model_magic/queryable_by.rb +39 -0
  64. data/lib/cfoundry/v2/model_magic/to_many.rb +138 -0
  65. data/lib/cfoundry/v2/model_magic/to_one.rb +81 -0
  66. data/lib/cfoundry/v2/model_magic.rb +134 -0
  67. data/lib/cfoundry/v2/organization.rb +44 -0
  68. data/lib/cfoundry/v2/quota_definition.rb +12 -0
  69. data/lib/cfoundry/v2/route.rb +25 -0
  70. data/lib/cfoundry/v2/service.rb +22 -0
  71. data/lib/cfoundry/v2/service_auth_token.rb +9 -0
  72. data/lib/cfoundry/v2/service_binding.rb +10 -0
  73. data/lib/cfoundry/v2/service_broker.rb +12 -0
  74. data/lib/cfoundry/v2/service_instance.rb +14 -0
  75. data/lib/cfoundry/v2/service_plan.rb +16 -0
  76. data/lib/cfoundry/v2/space.rb +30 -0
  77. data/lib/cfoundry/v2/stack.rb +10 -0
  78. data/lib/cfoundry/v2/user.rb +93 -0
  79. data/lib/cfoundry/v2/user_provided_service_instance.rb +15 -0
  80. data/lib/cfoundry/validator.rb +41 -0
  81. data/lib/cfoundry/version.rb +4 -0
  82. data/lib/cfoundry/zip.rb +56 -0
  83. data/lib/cfoundry.rb +5 -0
  84. data/release_notes/release_1_5_3.md +177 -0
  85. data/release_notes/release_2.3.1.md +14 -0
  86. data/release_notes/release_2.3.3.md +38 -0
  87. data/release_notes/release_2.3.4.md +16 -0
  88. data/release_notes/release_2.3.5.md +14 -0
  89. data/release_notes/release_2.3.6.md +14 -0
  90. data/release_notes/release_2.3.6.rc1.md +29 -0
  91. data/release_notes/release_2.3.6.rc2.md +19 -0
  92. data/release_notes/release_2.3.7.rc1.md +14 -0
  93. data/release_notes/release_2.4.0.md +41 -0
  94. data/release_notes/release_2.4.1.rc1.md +58 -0
  95. data/release_notes/release_3.0.0.md +21 -0
  96. data/release_notes/release_3.0.1.md +16 -0
  97. data/release_notes/release_3.0.2.rc1.md +19 -0
  98. data/release_notes/release_4.0.0.md +19 -0
  99. data/release_notes/release_4.0.1.md +14 -0
  100. data/release_notes/release_4.0.2.rc1.md +14 -0
  101. data/release_notes/release_4.0.2.rc2.md +11 -0
  102. data/release_notes/release_4.0.2.rc3.md +11 -0
  103. data/release_notes/release_4.0.2.rc4.md +19 -0
  104. data/release_notes/release_4.0.2.rc5.md +14 -0
  105. data/release_notes/release_4.0.3.md +19 -0
  106. data/release_notes/release_4.0.4.rc1.md +14 -0
  107. data/release_notes/release_4.0.4.rc2.md +14 -0
  108. data/release_notes/release_4.1.0.md +19 -0
  109. data/release_notes/release_4.2.0.rc.md +24 -0
  110. data/release_notes/release_4.3.0.md +22 -0
  111. data/release_notes/release_4.3.1.md +14 -0
  112. data/release_notes/release_4.3.10.md +14 -0
  113. data/release_notes/release_4.3.11.md +14 -0
  114. data/release_notes/release_4.3.12.md +14 -0
  115. data/release_notes/release_4.3.2.rc1.md +21 -0
  116. data/release_notes/release_4.3.3.md +24 -0
  117. data/release_notes/release_4.3.4.md +11 -0
  118. data/release_notes/release_4.3.4.rc1.md +24 -0
  119. data/release_notes/release_4.3.5.md +36 -0
  120. data/release_notes/release_4.3.5.rc1.md +21 -0
  121. data/release_notes/release_4.3.6.md +14 -0
  122. data/release_notes/release_4.3.7.md +50 -0
  123. data/release_notes/release_4.3.8.md +19 -0
  124. data/release_notes/release_4.3.9.md +14 -0
  125. data/release_notes/release_4.4.0.md +16 -0
  126. data/release_notes/release_4.5.1.md +11 -0
  127. data/release_notes/release_4.5.2.md +14 -0
  128. data/release_notes/release_4.5.3.md +29 -0
  129. data/release_notes/release_4.6.0.md +24 -0
  130. data/release_notes/release_4.6.1.md +14 -0
  131. data/release_notes/release_4.6.2.md +16 -0
  132. data/release_notes/release_4.6.3.rc1.md +14 -0
  133. data/release_notes/release_4.6.3.rc2.md +14 -0
  134. data/release_notes/release_4.6.3.rc3.md +17 -0
  135. data/release_notes/release_4.7.0.md +11 -0
  136. data/release_notes/release_4.7.1.md +14 -0
  137. data/release_notes/release_4.7.1.rc.1.md +14 -0
  138. data/release_notes/release_4.7.1.rc1.md +19 -0
  139. data/script/gpp +3 -0
  140. data/spec/cc_api_stub/app_usage_events_spec.rb +12 -0
  141. data/spec/cc_api_stub/applications_spec.rb +69 -0
  142. data/spec/cc_api_stub/domains_spec.rb +40 -0
  143. data/spec/cc_api_stub/events_spec.rb +12 -0
  144. data/spec/cc_api_stub/frameworks_spec.rb +19 -0
  145. data/spec/cc_api_stub/login_spec.rb +20 -0
  146. data/spec/cc_api_stub/organization_users_spec.rb +35 -0
  147. data/spec/cc_api_stub/organizations_spec.rb +118 -0
  148. data/spec/cc_api_stub/routes_spec.rb +19 -0
  149. data/spec/cc_api_stub/runtimes_spec.rb +19 -0
  150. data/spec/cc_api_stub/service_bindings_spec.rb +13 -0
  151. data/spec/cc_api_stub/service_instances_spec.rb +19 -0
  152. data/spec/cc_api_stub/services_spec.rb +11 -0
  153. data/spec/cc_api_stub/space_users_spec.rb +35 -0
  154. data/spec/cc_api_stub/spaces_spec.rb +38 -0
  155. data/spec/cc_api_stub/users_spec.rb +107 -0
  156. data/spec/cfoundry/auth_token_spec.rb +154 -0
  157. data/spec/cfoundry/baseclient_spec.rb +298 -0
  158. data/spec/cfoundry/client_spec.rb +13 -0
  159. data/spec/cfoundry/errors_spec.rb +117 -0
  160. data/spec/cfoundry/rest_client_spec.rb +349 -0
  161. data/spec/cfoundry/trace_helpers_spec.rb +91 -0
  162. data/spec/cfoundry/uaaclient_spec.rb +435 -0
  163. data/spec/cfoundry/upload_helpers_spec.rb +182 -0
  164. data/spec/cfoundry/v2/app_event_spec.rb +97 -0
  165. data/spec/cfoundry/v2/app_instance_spec.rb +31 -0
  166. data/spec/cfoundry/v2/app_spec.rb +354 -0
  167. data/spec/cfoundry/v2/app_usage_event_spec.rb +15 -0
  168. data/spec/cfoundry/v2/base_spec.rb +375 -0
  169. data/spec/cfoundry/v2/client_spec.rb +121 -0
  170. data/spec/cfoundry/v2/domain_spec.rb +63 -0
  171. data/spec/cfoundry/v2/event_spec.rb +15 -0
  172. data/spec/cfoundry/v2/managed_service_instance_spec.rb +149 -0
  173. data/spec/cfoundry/v2/model_magic/attribute_spec.rb +123 -0
  174. data/spec/cfoundry/v2/model_magic/has_summary_spec.rb +17 -0
  175. data/spec/cfoundry/v2/model_magic/to_many_spec.rb +53 -0
  176. data/spec/cfoundry/v2/model_magic/to_one_spec.rb +106 -0
  177. data/spec/cfoundry/v2/model_magic_spec.rb +43 -0
  178. data/spec/cfoundry/v2/model_spec.rb +434 -0
  179. data/spec/cfoundry/v2/organization_spec.rb +135 -0
  180. data/spec/cfoundry/v2/quota_definition_spec.rb +50 -0
  181. data/spec/cfoundry/v2/route_spec.rb +42 -0
  182. data/spec/cfoundry/v2/service_plan_spec.rb +53 -0
  183. data/spec/cfoundry/v2/service_spec.rb +58 -0
  184. data/spec/cfoundry/v2/space_spec.rb +13 -0
  185. data/spec/cfoundry/v2/user_provided_service_instance_spec.rb +57 -0
  186. data/spec/cfoundry/v2/user_spec.rb +206 -0
  187. data/spec/cfoundry/validator_spec.rb +94 -0
  188. data/spec/factories/app_events_factory.rb +7 -0
  189. data/spec/factories/app_usage_events_factory.rb +32 -0
  190. data/spec/factories/apps_factory.rb +11 -0
  191. data/spec/factories/clients_factory.rb +7 -0
  192. data/spec/factories/domains_factory.rb +10 -0
  193. data/spec/factories/events_factory.rb +50 -0
  194. data/spec/factories/organizations_factory.rb +12 -0
  195. data/spec/factories/quota_definitions_factory.rb +8 -0
  196. data/spec/factories/routes_factory.rb +10 -0
  197. data/spec/factories/service_instances_factory.rb +10 -0
  198. data/spec/factories/service_plans_factory.rb +10 -0
  199. data/spec/factories/services_factory.rb +10 -0
  200. data/spec/factories/spaces_factory.rb +10 -0
  201. data/spec/factories/user_provided_service_instances_factory.rb +10 -0
  202. data/spec/factories/users_factory.rb +10 -0
  203. data/spec/fixtures/apps/with_cfignore/.cfignore +4 -0
  204. data/spec/fixtures/apps/with_cfignore/.hidden_file +1 -0
  205. data/spec/fixtures/apps/with_cfignore/ambiguous_ignored +0 -0
  206. data/spec/fixtures/apps/with_cfignore/ignored_dir/file_in_ignored_dir.txt +1 -0
  207. data/spec/fixtures/apps/with_cfignore/ignored_file.txt +1 -0
  208. data/spec/fixtures/apps/with_cfignore/non_ignored_dir/file_in_non_ignored_dir.txt +1 -0
  209. data/spec/fixtures/apps/with_cfignore/non_ignored_dir/ignored_file.txt +1 -0
  210. data/spec/fixtures/apps/with_cfignore/non_ignored_dir/toplevel_ignored.txt +0 -0
  211. data/spec/fixtures/apps/with_cfignore/non_ignored_file.txt +1 -0
  212. data/spec/fixtures/apps/with_cfignore/toplevel_ignored.txt +0 -0
  213. data/spec/fixtures/apps/with_dotfiles/.dotfile +1 -0
  214. data/spec/fixtures/apps/with_dotfiles/xyz +1 -0
  215. data/spec/fixtures/apps/with_external_symlink/foo +1 -0
  216. data/spec/fixtures/apps/with_ignored_external_symlink/.cfignore +1 -0
  217. data/spec/fixtures/apps/with_ignored_external_symlink/foo +1 -0
  218. data/spec/fixtures/apps/with_nested_directories/foo/bar/baz/fizz +0 -0
  219. data/spec/fixtures/apps/with_nested_directories/xyz +0 -0
  220. data/spec/fixtures/empty_file +0 -0
  221. data/spec/fixtures/fake_cc_app_usage_events.json +152 -0
  222. data/spec/fixtures/fake_cc_application.json +20 -0
  223. data/spec/fixtures/fake_cc_application_summary.json +56 -0
  224. data/spec/fixtures/fake_cc_created_application.json +11 -0
  225. data/spec/fixtures/fake_cc_created_domain.json +15 -0
  226. data/spec/fixtures/fake_cc_created_organization.json +11 -0
  227. data/spec/fixtures/fake_cc_created_route.json +13 -0
  228. data/spec/fixtures/fake_cc_created_service_instance.json +11 -0
  229. data/spec/fixtures/fake_cc_created_space.json +11 -0
  230. data/spec/fixtures/fake_cc_created_user.json +11 -0
  231. data/spec/fixtures/fake_cc_domain.json +55 -0
  232. data/spec/fixtures/fake_cc_domain_spaces.json +27 -0
  233. data/spec/fixtures/fake_cc_empty_search.json +7 -0
  234. data/spec/fixtures/fake_cc_events.json +419 -0
  235. data/spec/fixtures/fake_cc_frameworks.json +20 -0
  236. data/spec/fixtures/fake_cc_managed_service_instance.json +83 -0
  237. data/spec/fixtures/fake_cc_organization.json +161 -0
  238. data/spec/fixtures/fake_cc_organization_domains.json +59 -0
  239. data/spec/fixtures/fake_cc_organization_search.json +37 -0
  240. data/spec/fixtures/fake_cc_organization_spaces.json +99 -0
  241. data/spec/fixtures/fake_cc_organization_summary.json +20 -0
  242. data/spec/fixtures/fake_cc_organization_users.json +81 -0
  243. data/spec/fixtures/fake_cc_route.json +16 -0
  244. data/spec/fixtures/fake_cc_runtimes.json +20 -0
  245. data/spec/fixtures/fake_cc_service_binding.json +22 -0
  246. data/spec/fixtures/fake_cc_service_bindings.json +24 -0
  247. data/spec/fixtures/fake_cc_service_instance.json +83 -0
  248. data/spec/fixtures/fake_cc_service_instances.json +72 -0
  249. data/spec/fixtures/fake_cc_services.json +160 -0
  250. data/spec/fixtures/fake_cc_space.json +45 -0
  251. data/spec/fixtures/fake_cc_space_apps.json +49 -0
  252. data/spec/fixtures/fake_cc_space_summary.json +84 -0
  253. data/spec/fixtures/fake_cc_spaces.json +92 -0
  254. data/spec/fixtures/fake_cc_stats.json +29 -0
  255. data/spec/fixtures/fake_cc_user.json +139 -0
  256. data/spec/fixtures/fake_cc_user_organizations.json +92 -0
  257. data/spec/fixtures/fake_cc_user_provided_service_instance.json +51 -0
  258. data/spec/fixtures/fake_cc_user_with_managers.json +85 -0
  259. data/spec/integration/client_spec.rb +38 -0
  260. data/spec/spec_helper.rb +22 -0
  261. data/spec/support/factory_girl.rb +6 -0
  262. data/spec/support/shared_examples/cc_api_stub_request_examples.rb +79 -0
  263. data/spec/support/shared_examples/client_login_examples.rb +46 -0
  264. data/spec/support/shared_examples/model_summary_examples.rb +34 -0
  265. data/spec/support/test_model_builder.rb +10 -0
  266. data/vendor/errors/README.md +4 -0
  267. data/vendor/errors/v1.yml +189 -0
  268. data/vendor/errors/v2.yml +384 -0
  269. metadata +693 -0
@@ -0,0 +1,160 @@
1
+ {
2
+ "total_results": 1,
3
+ "total_pages": 1,
4
+ "prev_url": null,
5
+ "next_url": null,
6
+ "resources": [
7
+ {
8
+ "metadata": {
9
+ "guid": "service-id-1",
10
+ "url": "/v2/services/service-id-1"
11
+ },
12
+ "entity": {
13
+ "label": "postgresql",
14
+ "provider": "core",
15
+ "version": "9.1",
16
+ "url": "service-url",
17
+ "info_url": "service-info-url",
18
+ "description": "service1-description",
19
+ "service_plans_url": "/v2/services/service-id-1/service_plans",
20
+ "extra": "{\"businessLogicSampleData\":\"goes here\",\"provider\": {\"name\": \"core\"},\"listing\": {\"imageUrl\": \"https://image-url.png\",\"blurb\": \"Manage and monitor your apps\"}}",
21
+ "service_plans": [
22
+ {
23
+ "metadata": {
24
+ "guid": "paid-postgresql-id-1",
25
+ "url": "/v2/service_plans/paid-postgresql-id-1"
26
+ },
27
+ "entity": {
28
+ "name": "300",
29
+ "description": "2TB, 1.7GB Memory, 100 Connections, CPU? (Dedicated)",
30
+ "extra": "{\"businessLogicSampleData\":\"goes here\",\"cost\": 3.50, \"bullets\": [{\"content\": \"has memory and things\", \"tooltip\": \"for real! things!\"}, {\"content\": \"has other memory and things\", \"tooltip\": \"still for real! things!\"}]}",
31
+ "service_guid": "service-id-1",
32
+ "service_url": "/v2/services/service-id-1",
33
+ "service_instances_url": "/v2/service_plans/paid-postgresql-id-1/service_instances"
34
+ }
35
+ },
36
+ {
37
+ "metadata": {
38
+ "guid": "development-postgresql-id-1",
39
+ "url": "/v2/service_plans/development-postgresql-id-1"
40
+ },
41
+ "entity": {
42
+ "name": "100",
43
+ "description": "Free Postgres, one per customer",
44
+ "extra": "{\"businessLogicSampleData\":\"goes here\",\"cost\": 23.50, \"bullets\": [{\"content\": \"costs nothing\", \"tooltip\": \"for real! things!\"}, {\"content\": \"is a database\", \"tooltip\": \"for real! things!\"}]}",
45
+ "service_guid": "service-id-1",
46
+ "service_url": "/v2/services/service-id-1",
47
+ "service_instances_url": "/v2/service_plans/development-postgresql-id-1/service_instances"
48
+ }
49
+ }
50
+ ]
51
+ }
52
+ },
53
+ {
54
+ "metadata": {
55
+ "guid": "service-id-2",
56
+ "url": "/v2/services/service-id-2"
57
+ },
58
+ "entity": {
59
+ "label": "mongodb",
60
+ "provider": "core",
61
+ "version": "1.8",
62
+ "url": "service2-url",
63
+ "info_url": "service2-info-url",
64
+ "description": "service2-description",
65
+ "service_plans_url": "/v2/services/service-id-2/service_plans",
66
+ "extra": "{\"businessLogicSampleData\":\"goes here\",\"provider\": {\"name\": \"core\"},\"listing\": {\"imageUrl\": \"https://image-url.png\",\"blurb\": \"Manage and monitor your apps\"}}",
67
+ "service_plans": [
68
+ {
69
+ "metadata": {
70
+ "guid": "development-mongodb-id-1",
71
+ "url": "/v2/service_plans/development-mongodb-id-1"
72
+ },
73
+ "entity": {
74
+ "name": "100",
75
+ "description": "service-plan-description",
76
+ "extra": "{\"businessLogicSampleData\":\"goes here\",\"cost\": 43.50, \"bullets\": [{\"content\": \"it's web scale, like php\", \"tooltip\": \"for real! things!\"}, {\"content\": \"this is a bullet\", \"tooltip\": \"for real! things!\"}]}",
77
+ "service_guid": "service-id-1",
78
+ "service_url": "/v2/services/service-id-1",
79
+ "service_instances_url": "/v2/service_plans/development-mongodb-id-1/service_instances"
80
+ }
81
+ },
82
+ {
83
+ "metadata": {
84
+ "guid": "paid-mongodb-id-1",
85
+ "url": "/v2/service_plans/paid-mongodb-id-1"
86
+ },
87
+ "entity": {
88
+ "name": "200",
89
+ "description": "20GB, 1GB Memory, 10 Connections, CPU? (Shared)",
90
+ "extra": "{\"businessLogicSampleData\":\"goes here\",\"cost\": 103.50, \"bullets\": [{\"content\": \"is mongo, and a db\", \"tooltip\": \"for real! things!\"}, {\"content\": \"24x7 shards\", \"tooltip\": \"for real! things!\"}]}",
91
+ "service_guid": "service-id-2",
92
+ "service_url": "/v2/services/service-id-2",
93
+ "service_instances_url": "/v2/service_plans/paid-mongodb-id-1/service_instances"
94
+ }
95
+ }
96
+ ]
97
+ }
98
+ },
99
+ {
100
+ "metadata": {
101
+ "guid": "service-id-3",
102
+ "url": "/v2/services/service-id-3"
103
+ },
104
+ "entity": {
105
+ "label": "mongolab-mongodb",
106
+ "provider": "mongolab",
107
+ "version": "1.0",
108
+ "url": "service3-url",
109
+ "info_url": "service3-info-url",
110
+ "description": "service3-description",
111
+ "service_plans_url": "/v2/services/service-id-3/service_plans",
112
+ "extra": "{\"businessLogicSampleData\":\"goes here\",\"provider\": {\"name\": \"core\"},\"listing\": {\"imageUrl\": \"https://image-url.png\",\"blurb\": \"Manage and monitor your apps\"}}",
113
+ "service_plans": [
114
+ {
115
+ "metadata": {
116
+ "guid": "paid-mongolab-mongodb-id-1",
117
+ "url": "/v2/service_plans/paid-mongolab-mongodb-id-1"
118
+ },
119
+ "entity": {
120
+ "name": "100",
121
+ "description": "1GB, 0.25GB Memory, 5 Connections, a CPU",
122
+ "extra": "{\"businessLogicSampleData\":\"goes here\",\"cost\": 0, \"bullets\": [{\"content\": \"it's free as in beer\", \"tooltip\": \"for real! things!\"}, {\"content\": \"cheap beer\", \"tooltip\": \"for real! things!\"}]}",
123
+ "service_guid": "service-id-3",
124
+ "service_url": "/v2/services/service-id-3",
125
+ "service_instances_url": "/v2/service_plans/paid-mongolab-mongodb-id-1/service_instances"
126
+ }
127
+ },
128
+ {
129
+ "metadata": {
130
+ "guid": "paid-mongolab-mongodb-id-2",
131
+ "url": "/v2/service_plans/paid-mongolab-mongodb-id-2"
132
+ },
133
+ "entity": {
134
+ "name": "200",
135
+ "description": "2GB, 2GB Memory, 10 Connections, CPU!",
136
+ "extra": "{\"businessLogicSampleData\":\"goes here\",\"cost\": 83.50, \"bullets\": [{\"content\": \"cost is nil for this service\", \"tooltip\": \"for real! things!\"}, {\"content\": \"we know nothing about this one\", \"tooltip\": \"for real! things!\"}]}",
137
+ "service_guid": "service-id-3",
138
+ "service_url": "/v2/services/service-id-3",
139
+ "service_instances_url": "/v2/service_plans/paid-mongolab-mongodb-id-2/service_instances"
140
+ }
141
+ },
142
+ {
143
+ "metadata": {
144
+ "guid": "paid-mongolab-mongodb-id-3",
145
+ "url": "/v2/service_plans/paid-mongolab-mongodb-id-3"
146
+ },
147
+ "entity": {
148
+ "name": "300",
149
+ "description": "2GB, 2GB Memory, 10 Connections, CPU!",
150
+ "extra": "{\"businessLogicSampleData\":\"goes here\",\"cost\": 102.50, \"bullets\": [{\"content\": \"was grown in a lab\", \"tooltip\": \"for real! things!\"}, {\"content\": \"we know nothing about this one\", \"tooltip\": \"for real! things!\"}]}",
151
+ "service_guid": "service-id-3",
152
+ "service_url": "/v2/services/service-id-3",
153
+ "service_instances_url": "/v2/service_plans/paid-mongolab-mongodb-id-3/service_instances"
154
+ }
155
+ }
156
+ ]
157
+ }
158
+ }
159
+ ]
160
+ }
@@ -0,0 +1,45 @@
1
+ {
2
+ "metadata": {
3
+ "guid": "space-id-1",
4
+ "url": "/v2/spaces/space-id-1",
5
+ "created_at": "2012-10-25 14:10:45 -0700",
6
+ "updated_at": null
7
+ },
8
+ "entity": {
9
+ "name": "space-name-1",
10
+ "organization_guid": "organization-id-1",
11
+ "domains_url": "/v2/spaces/space-id-1/domains",
12
+ "domains": [
13
+ {
14
+ "metadata": {
15
+ "guid": "domain-id-1",
16
+ "url": "/v2/domains/domain-id-1",
17
+ "created_at": "2012-10-25 14:08:38 -0700",
18
+ "updated_at": null
19
+ },
20
+ "entity": {
21
+ "name": "vcap.me",
22
+ "owning_organization_guid": null
23
+ }
24
+ }
25
+ ],
26
+ "organization_url": "/v2/organizations/organization-id-1",
27
+ "organization": {
28
+ "metadata": {
29
+ "guid": "organization-id-1",
30
+ "url": "/v2/organizations/organization-id-1",
31
+ "created_at": "2012-10-25 14:10:41 -0700",
32
+ "updated_at": null
33
+ },
34
+ "entity": {
35
+ "name": "organization-name-1",
36
+ "spaces_url": "/v2/organizations/organization-id-1/spaces",
37
+ "domains_url": "/v2/organizations/organization-id-1/domains",
38
+ "users_url": "/v2/organizations/organization-id-1/users",
39
+ "managers_url": "/v2/organizations/organization-id-1/managers",
40
+ "billing_managers_url": "/v2/organizations/organization-id-1/billing_managers",
41
+ "auditors_url": "/v2/organizations/organization-id-1/auditors"
42
+ }
43
+ }
44
+ }
45
+ }
@@ -0,0 +1,49 @@
1
+ {
2
+ "total_results": 2,
3
+ "total_pages": 1,
4
+ "prev_url": null,
5
+ "next_url": null,
6
+ "resources": [
7
+ {
8
+ "metadata": {
9
+ "guid": "application-id-1",
10
+ "url": "/v2/apps/application-id-1",
11
+ "created_at": "2012-08-13 12:48:41 -0700",
12
+ "updated_at": "2012-08-13 12:55:10 -0700"
13
+ },
14
+ "entity": {
15
+ "name": "app-name-1",
16
+ "space_guid": "space-id-1",
17
+ "environment_json": null,
18
+ "memory": 2048,
19
+ "instances": 1,
20
+ "file_descriptors": 100,
21
+ "disk_quota": 500,
22
+ "state": "STARTED",
23
+ "service_bindings_url": "/v2/service_bindings?q=app_guid:application-id-1",
24
+ "space_url": "/v2/spaces/space-id-1"
25
+ }
26
+ },
27
+ {
28
+ "metadata": {
29
+ "guid": "application-id-2",
30
+ "url": "/v2/apps/application-id-2",
31
+ "created_at": "2012-08-13 12:48:41 -0700",
32
+ "updated_at": "2012-08-13 12:55:10 -0700"
33
+ },
34
+ "entity": {
35
+ "name": "app-name-2",
36
+ "space_guid": "space-id-1",
37
+ "environment_json": null,
38
+ "memory": 2048,
39
+ "instances": 1,
40
+ "file_descriptors": 100,
41
+ "disk_quota": 500,
42
+ "state": "STARTED",
43
+ "service_bindings_url": "/v2/service_bindings?q=app_guid:application-id-2",
44
+ "space_url": "/v2/spaces/space-id-1"
45
+ }
46
+ }
47
+
48
+ ]
49
+ }
@@ -0,0 +1,84 @@
1
+ {
2
+ "guid":"space-id-1",
3
+ "name":"space-name-1",
4
+ "apps":[
5
+ {
6
+ "guid":"application-id-1",
7
+ "name":"application-name-1",
8
+ "routes":[
9
+ { "guid": "aa14f148-3d82-4db3-982e-fe0fd00582f4", "host": "app", "domain": { "name": "example.com"}}
10
+ ],
11
+ "urls":[
12
+ "app.example.com"
13
+ ],
14
+ "state":"STARTED",
15
+ "memory":128,
16
+ "instances":1,
17
+ "running_instances":1,
18
+ "service_count":1,
19
+ "space_guid":"space-id-1",
20
+ "environment_json":{},
21
+ "file_descriptors":256,
22
+ "disk_quota":256
23
+ },
24
+ {
25
+ "guid":"application-id-2",
26
+ "name":"application-name-2",
27
+ "routes":[
28
+ { "guid": "a14c5666-5354-49a7-8da8-2c29eaaaac18", "host": "app2-1", "domain": { "name": "example.com"}},
29
+ { "guid": "7c183670-2e4b-4dd1-b2b5-d7ada5d470fb", "host": "app2-2", "domain": { "name": "example.com"}}
30
+ ],
31
+ "urls":[
32
+ "app2-1.example.com",
33
+ "app2-2.example.com"
34
+ ],
35
+ "state":"STOPPED",
36
+ "memory":256,
37
+ "instances":2,
38
+ "running_instances":0,
39
+ "service_count":2,
40
+ "space_guid":"space-id-1",
41
+ "environment_json":{},
42
+ "file_descriptors":256,
43
+ "disk_quota":256
44
+ }
45
+ ],
46
+ "services":[
47
+ {
48
+ "guid":"service-instance-id-1",
49
+ "name":"service-name-1",
50
+ "bound_app_count":1,
51
+ "dashboard_url":"https://dev3cloudfoundry.appdirect.com/api/custom/cloudfoundry/v1/services/service-instance-id-1/sso",
52
+ "service_plan": {
53
+ "guid":"service-plan-id-1",
54
+ "name":"300",
55
+ "service":{
56
+ "guid":"paid-postgresql-id-1",
57
+ "provider":"core",
58
+ "label":"postgresql",
59
+ "version":"9.0"
60
+ }
61
+ }
62
+ },
63
+ {
64
+ "guid":"service-id-2",
65
+ "name":"service-name-2",
66
+ "bound_app_count":2,
67
+ "dashboard_url": null,
68
+ "service_plan": {
69
+ "guid":"service-plan-id-2",
70
+ "name":"100",
71
+ "service":{
72
+ "guid":"development-mongolab-mongodb-id-1",
73
+ "provider":"mongolab",
74
+ "label":"mongolab-mongodb",
75
+ "version":"1.0"
76
+ }
77
+ }
78
+ },
79
+ {
80
+ "guid": "user-provided-id-3",
81
+ "name": "user-provided-service-name-3"
82
+ }
83
+ ]
84
+ }
@@ -0,0 +1,92 @@
1
+ [
2
+ {
3
+ "metadata": {
4
+ "guid": "space-id-1",
5
+ "url": "/v2/spaces/space-id-1",
6
+ "created_at": "2012-10-25 14:10:45 -0700",
7
+ "updated_at": null
8
+ },
9
+ "entity": {
10
+ "name": "space-name-1",
11
+ "organization_guid": "organization-id-1",
12
+ "domains_url": "/v2/spaces/space-id-1/domains",
13
+ "domains": [
14
+ {
15
+ "metadata": {
16
+ "guid": "domain-id-1",
17
+ "url": "/v2/domains/domain-id-1",
18
+ "created_at": "2012-10-25 14:08:38 -0700",
19
+ "updated_at": null
20
+ },
21
+ "entity": {
22
+ "name": "vcap.me",
23
+ "owning_organization_guid": null
24
+ }
25
+ }
26
+ ],
27
+ "organization_url": "/v2/organizations/organization-id-1",
28
+ "organization": {
29
+ "metadata": {
30
+ "guid": "organization-id-1",
31
+ "url": "/v2/organizations/organization-id-1",
32
+ "created_at": "2012-10-25 14:10:41 -0700",
33
+ "updated_at": null
34
+ },
35
+ "entity": {
36
+ "name": "organization-name-1",
37
+ "spaces_url": "/v2/organizations/organization-id-1/spaces",
38
+ "domains_url": "/v2/organizations/organization-id-1/domains",
39
+ "users_url": "/v2/organizations/organization-id-1/users",
40
+ "managers_url": "/v2/organizations/organization-id-1/managers",
41
+ "billing_managers_url": "/v2/organizations/organization-id-1/billing_managers",
42
+ "auditors_url": "/v2/organizations/organization-id-1/auditors"
43
+ }
44
+ }
45
+ }
46
+ },
47
+ {
48
+ "metadata": {
49
+ "guid": "space-id-2",
50
+ "url": "/v2/spaces/space-id-2",
51
+ "created_at": "2012-10-25 14:10:45 -0700",
52
+ "updated_at": null
53
+ },
54
+ "entity": {
55
+ "name": "space-name-2",
56
+ "organization_guid": "organization-id-1",
57
+ "domains_url": "/v2/spaces/space-id-2/domains",
58
+ "domains": [
59
+ {
60
+ "metadata": {
61
+ "guid": "domain-id-1",
62
+ "url": "/v2/domains/domain-id-1",
63
+ "created_at": "2012-10-25 14:08:38 -0700",
64
+ "updated_at": null
65
+ },
66
+ "entity": {
67
+ "name": "vcap.me",
68
+ "owning_organization_guid": null
69
+ }
70
+ }
71
+ ],
72
+ "organization_url": "/v2/organizations/organization-id-1",
73
+ "organization": {
74
+ "metadata": {
75
+ "guid": "organization-id-1",
76
+ "url": "/v2/organizations/organization-id-1",
77
+ "created_at": "2012-10-25 14:10:41 -0700",
78
+ "updated_at": null
79
+ },
80
+ "entity": {
81
+ "name": "organization-name-1",
82
+ "spaces_url": "/v2/organizations/organization-id-1/spaces",
83
+ "domains_url": "/v2/organizations/organization-id-1/domains",
84
+ "users_url": "/v2/organizations/organization-id-1/users",
85
+ "managers_url": "/v2/organizations/organization-id-1/managers",
86
+ "billing_managers_url": "/v2/organizations/organization-id-1/billing_managers",
87
+ "auditors_url": "/v2/organizations/organization-id-1/auditors"
88
+ }
89
+ }
90
+ }
91
+ }
92
+ ]
@@ -0,0 +1,29 @@
1
+ {
2
+ "instance-id-1": {
3
+ "state": "DOWN",
4
+ "since": 1346959370
5
+ },
6
+ "instance-the-second": {
7
+ "state": "RUNNING",
8
+ "since": 1346959370,
9
+ "stats": {
10
+ "uptime": 604800.0000,
11
+ "port": 49249,
12
+ "fds_quota": 256,
13
+ "mem_quota": 134217728,
14
+ "uris": [
15
+ "tiny-java.p01.rbconsvcs.com"
16
+ ],
17
+ "name": "tiny-java",
18
+ "cores": 4,
19
+ "usage": {
20
+ "disk": 6373376,
21
+ "mem": 67039232,
22
+ "time": "2012-09-06 22:29:28 +0000",
23
+ "cpu": 0.5
24
+ },
25
+ "disk_quota": 268435456,
26
+ "host": "172.20.182.198"
27
+ }
28
+ }
29
+ }
@@ -0,0 +1,139 @@
1
+ {
2
+ "metadata": {
3
+ "guid": "user-id-1",
4
+ "url": "/v2/users/user-id-1",
5
+ "created_at": "2012-08-13 12:48:41 -0700",
6
+ "updated_at": "2012-08-13 12:55:10 -0700"
7
+ },
8
+ "entity": {
9
+ "organizations": [{
10
+ "metadata": {
11
+ "guid": "organization-id-1",
12
+ "url": "/v2/organizations/organization-id-1"
13
+ },
14
+ "entity": {
15
+ "name": "organization-name-1",
16
+ "status": "active",
17
+ "spaces": [
18
+ {
19
+ "metadata": {
20
+ "guid": "space-id-1",
21
+ "url": "/v2/spaces/space-id-1"
22
+ },
23
+ "entity": {
24
+ "name": "space-name-1"
25
+ }
26
+ },
27
+ {
28
+ "metadata": {
29
+ "guid": "space-id-2",
30
+ "url": "/v2/spaces/space-id-2"
31
+ },
32
+ "entity": {
33
+ "name": "space-name-2"
34
+ }
35
+ },
36
+ {
37
+ "metadata": {
38
+ "guid": "space-id-3",
39
+ "url": "/v2/spaces/space-id-3"
40
+ },
41
+ "entity": {
42
+ "name": "space-name-3"
43
+ }
44
+ }
45
+ ],
46
+ "managers": [{
47
+ "metadata": {
48
+ "guid": "user-id-1",
49
+ "url": "/v2/users/user-id-1"
50
+ },
51
+ "entity": {}
52
+ }],
53
+ "billing_enabled": true,
54
+ "quota_definition": {
55
+ "metadata": {
56
+ "guid": "quota-definition-id-1",
57
+ "url": "/v2/quota_definitions/quota-definition-id-1"
58
+ },
59
+ "entity": {
60
+ "name": "quota",
61
+ "non_basic_services_allowed": true,
62
+ "total_services": 32
63
+ }
64
+ }
65
+ }
66
+ },
67
+ {
68
+ "metadata": {
69
+ "guid": "organization-id-2",
70
+ "url": "/v2/organizations/organization-id-2"
71
+ },
72
+ "entity": {
73
+ "name": "organization-name-2",
74
+ "status": "active",
75
+ "spaces": [
76
+ {
77
+ "metadata": {
78
+ "guid": "space2-id-1",
79
+ "url": "/v2/spaces/space2-id-1"
80
+ },
81
+ "entity": {
82
+ "name": "space2-name-1"
83
+ }
84
+ },
85
+ {
86
+ "metadata": {
87
+ "guid": "space2-id-2",
88
+ "url": "/v2/spaces/space2-id-2"
89
+ },
90
+ "entity": {
91
+ "name": "space2-name-2"
92
+ }
93
+ },
94
+ {
95
+ "metadata": {
96
+ "guid": "space2-id-3",
97
+ "url": "/v2/spaces/space2-id-3"
98
+ },
99
+ "entity": {
100
+ "name": "space2-name-3"
101
+ }
102
+ }
103
+ ],
104
+ "managers": [{
105
+ "metadata": {
106
+ "guid": "user-id-1",
107
+ "url": "/v2/users/user-id-1"
108
+ },
109
+ "entity": {}
110
+ }],
111
+ "quota_definition": {
112
+ "metadata": {
113
+ "guid": "quota-definition-id-1",
114
+ "url": "/v2/quota_definitions/quota-definition-id-1",
115
+ "created_at": "2012-12-18 22:57:23 +0000",
116
+ "updated_at": "2012-12-18 22:57:23 +0000"
117
+ },
118
+ "entity": {
119
+ "name": "quota",
120
+ "non_basic_services_allowed": true,
121
+ "total_services": 32
122
+ }
123
+ }
124
+ }
125
+ }],
126
+
127
+ "managed_organizations": [],
128
+ "billing_managed_organizations": [{
129
+ "metadata": {
130
+ "guid": "created-organization-id-1"
131
+ }
132
+ }],
133
+ "audited_organizations": [],
134
+
135
+ "spaces": [],
136
+ "managed_spaces": [],
137
+ "audited_spaces": []
138
+ }
139
+ }