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,10 @@
1
+ FactoryGirl.define do
2
+ factory :space, :class => CFoundry::V2::Space do
3
+ sequence(:guid) { |n| "space-guid-#{n}" }
4
+ transient do
5
+ client { FactoryGirl.build(:client) }
6
+ end
7
+
8
+ initialize_with { new(guid, client) }
9
+ end
10
+ end
@@ -0,0 +1,10 @@
1
+ FactoryGirl.define do
2
+ factory :user_provided_service_instance, :class => CFoundry::V2::UserProvidedServiceInstance do
3
+ sequence(:guid) { |n| "user-provided-service-instance-guid-#{n}" }
4
+ transient do
5
+ client { FactoryGirl.build(:client) }
6
+ end
7
+
8
+ initialize_with { new(guid, client) }
9
+ end
10
+ end
@@ -0,0 +1,10 @@
1
+ FactoryGirl.define do
2
+ factory :user, :class => CFoundry::V2::User do
3
+ sequence(:guid) { |n| "user-guid-#{n}" }
4
+ transient do
5
+ client { FactoryGirl.build(:client) }
6
+ end
7
+
8
+ initialize_with { new(guid, client) }
9
+ end
10
+ end
@@ -0,0 +1,4 @@
1
+ ignored_file.txt
2
+ ignored_dir
3
+ /toplevel_ignored.txt
4
+ ambiguous_ignored/
@@ -0,0 +1 @@
1
+ hidden_file
@@ -0,0 +1 @@
1
+ ignored_file
@@ -0,0 +1 @@
1
+ non_ignored_file
@@ -0,0 +1 @@
1
+ foo
@@ -0,0 +1 @@
1
+ bar
File without changes
File without changes
@@ -0,0 +1,152 @@
1
+ {
2
+ "total_results": 11,
3
+ "total_pages": 1,
4
+ "prev_url": null,
5
+ "next_url": null,
6
+ "resources": [
7
+ {
8
+ "metadata": {
9
+ "guid": "app_usage_event-1-1",
10
+ "created_at": "2012-11-01T12:00:00+00:00"
11
+ },
12
+ "entity": {
13
+ "state": "STARTED",
14
+ "memory_in_mb_per_instance": 1024,
15
+ "instance_count": 2,
16
+ "app_guid": "application-id-1",
17
+ "app_name": "application-name-1",
18
+ "space_guid": "space-id-1",
19
+ "space_name": "space-name-1",
20
+ "org_guid": "organization-id-1"
21
+ }
22
+ },
23
+ {
24
+ "metadata": {
25
+ "guid": "app_usage_event-2-1",
26
+ "created_at": "2012-11-01T12:01:22+00:00"
27
+ },
28
+ "entity": {
29
+ "state": "STARTED",
30
+ "memory_in_mb_per_instance": 2048,
31
+ "instance_count": 1,
32
+ "app_guid": "application-id-2",
33
+ "app_name": "application-name-2",
34
+ "space_guid": "space-id-2",
35
+ "space_name": "space-name-2",
36
+ "org_guid": "organization-id-2"
37
+ }
38
+ },
39
+ {
40
+ "metadata": {
41
+ "guid": "app_usage_event-1-2",
42
+ "created_at": "2012-11-01T12:04:00+00:00"
43
+ },
44
+ "entity": {
45
+ "state": "STOPPED",
46
+ "memory_in_mb_per_instance": 1024,
47
+ "instance_count": 2,
48
+ "app_guid": "application-id-1",
49
+ "app_name": "application-name-1",
50
+ "space_guid": "space-id-1",
51
+ "space_name": "space-name-1",
52
+ "org_guid": "organization-id-1"
53
+ }
54
+ },
55
+ {
56
+ "metadata": {
57
+ "guid": "app_usage_event-1-3",
58
+ "created_at": "2012-11-01T12:05:00+00:00"
59
+ },
60
+ "entity": {
61
+ "state": "STARTED",
62
+ "memory_in_mb_per_instance": 1024,
63
+ "instance_count": 2,
64
+ "app_guid": "application-id-1",
65
+ "app_name": "application-name-1",
66
+ "space_guid": "space-id-1",
67
+ "space_name": "space-name-1",
68
+ "org_guid": "organization-id-1"
69
+ }
70
+ },
71
+ {
72
+ "metadata": {
73
+ "guid": "app_usage_event-3-1",
74
+ "created_at": "2012-11-01T12:07:00+00:00"
75
+ },
76
+ "entity": {
77
+ "state": "STARTED",
78
+ "memory_in_mb_per_instance": 1024,
79
+ "instance_count": 2,
80
+ "app_guid": "application-id-3",
81
+ "app_name": "application-name-3",
82
+ "space_guid": "space-id-3",
83
+ "space_name": "space-name-3",
84
+ "org_guid": "organization-id-3"
85
+ }
86
+ },
87
+ {
88
+ "metadata": {
89
+ "guid": "app_usage_event-3-2",
90
+ "created_at": "2012-11-01T12:06:50+00:00"
91
+ },
92
+ "entity": {
93
+ "state": "STOPPED",
94
+ "memory_in_mb_per_instance": 1024,
95
+ "instance_count": 2,
96
+ "app_guid": "application-id-3",
97
+ "app_name": "application-name-3",
98
+ "space_guid": "space-id-3",
99
+ "space_name": "space-name-3",
100
+ "org_guid": "organization-id-3"
101
+ }
102
+ },
103
+ {
104
+ "metadata": {
105
+ "guid": "app_usage_event-2-2",
106
+ "created_at": "2012-11-01T12:11:00+00:00"
107
+ },
108
+ "entity": {
109
+ "state": "STOPPED",
110
+ "memory_in_mb_per_instance": 2048,
111
+ "instance_count": 2,
112
+ "app_guid": "application-id-2",
113
+ "app_name": "application-name-2",
114
+ "space_guid": "space-id-2",
115
+ "space_name": "space-name-2",
116
+ "org_guid": "organization-id-2"
117
+ }
118
+ },
119
+ {
120
+ "metadata": {
121
+ "guid": "app_usage_event-2-3",
122
+ "created_at": "2012-11-01T12:11:40+00:00"
123
+ },
124
+ "entity": {
125
+ "state": "STARTED",
126
+ "memory_in_mb_per_instance": 1024,
127
+ "instance_count": 2,
128
+ "app_guid": "application-id-2",
129
+ "app_name": "application-name-2",
130
+ "space_guid": "space-id-2",
131
+ "space_name": "space-name-2",
132
+ "org_guid": "organization-id-2"
133
+ }
134
+ },
135
+ {
136
+ "metadata": {
137
+ "guid": "app_usage_event-2-4",
138
+ "created_at": "2012-11-01T12:11:45+00:00"
139
+ },
140
+ "entity": {
141
+ "state": "STARTED",
142
+ "memory_in_mb_per_instance": 2048,
143
+ "instance_count": 1,
144
+ "app_guid": "application-id-2",
145
+ "app_name": "application-name-2",
146
+ "space_guid": "space-id-2",
147
+ "space_name": "space-name-2",
148
+ "org_guid": "organization-id-2"
149
+ }
150
+ }
151
+ ]
152
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "metadata": {
3
+ "guid": "d336bafe-13dd-4efd-a425-1729f6191d91",
4
+ "url": "/v2/apps/d336bafe-13dd-4efd-a425-1729f6191d91",
5
+ "created_at": "2012-08-13 12:48:41 -0700",
6
+ "updated_at": "2012-08-13 12:55:10 -0700"
7
+ },
8
+ "entity": {
9
+ "name": "newapp",
10
+ "space_guid": "6eb251ee-1ddc-4947-b2b3-942c5fdf0742",
11
+ "environment_json": null,
12
+ "memory": 2048,
13
+ "instances": 1,
14
+ "file_descriptors": 100,
15
+ "disk_quota": 500,
16
+ "state": "STARTED",
17
+ "service_bindings_url": "/v2/service_bindings?q=app_guid:d336bafe-13dd-4efd-a425-1729f6191d91",
18
+ "space_url": "/v2/spaces/6eb251ee-1ddc-4947-b2b3-942c5fdf0742"
19
+ }
20
+ }
@@ -0,0 +1,56 @@
1
+ {
2
+ "guid":"application-id-1",
3
+ "name":"application-name-1",
4
+ "state":"STARTED",
5
+ "memory":128,
6
+ "instances":1,
7
+ "routes":[
8
+ { "guid": "route-id",
9
+ "host": "host",
10
+ "domain": {
11
+ "guid": "domain-id",
12
+ "name": "app-domain.com",
13
+ "owning_organization_guid": "organization-id",
14
+ "owning_organization_url": "/v2/organizations/organization-id"
15
+ }
16
+ },
17
+ { "guid": "route-id-2",
18
+ "host": null,
19
+ "domain": {
20
+ "guid": "domain-id",
21
+ "name": "app-domain.com",
22
+ "owning_organization_guid": "organization-id",
23
+ "owning_organization_url": "/v2/organizations/organization-id"
24
+ }
25
+ },
26
+ { "guid": "route-id-3",
27
+ "host": "host-3",
28
+ "domain": { "guid": "domain-id-3", "name": "vcap.me", "owning_organization_guid": null}
29
+ }
30
+ ],
31
+ "running_instances":0,
32
+ "services":[{
33
+ "guid":"service-instance-id-1",
34
+ "name":"service-name-1",
35
+ "dashboard_url":"https://dev3cloudfoundry.appdirect.com/api/custom/cloudfoundry/v1/services/service-instance-id-1/sso",
36
+ "service_plan": {
37
+ "guid":"service-plan-id-1",
38
+ "name":"300",
39
+ "service":{
40
+ "guid":"paid-postgresql-id-1",
41
+ "provider":"core",
42
+ "label":"postgresql",
43
+ "version":"9.0"
44
+ }
45
+ }
46
+ }],
47
+ "space_guid":"space-id-1",
48
+ "environment_json":{},
49
+ "file_descriptors":256,
50
+ "disk_quota":256,
51
+ "available_domains":[
52
+ {"guid":"domain-id", "name":"app-domain.com", "owning_organization_guid":"organization-id", "owning_organization_url": "/v2/organizations/organization-id"},
53
+ {"guid":"domain-id-2", "name":"app-domain-2.com", "owning_organization_guid":"organization-id", "owning_organization_url": "/v2/organizations/organization-id"},
54
+ {"guid":"domain-id-3", "name":"vcap.me", "owning_organization_guid":null}
55
+ ]
56
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "metadata": {
3
+ "guid": "created-application-id-1",
4
+ "url": "/v2/apps/created-application-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
+
10
+ }
11
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "metadata": {
3
+ "guid": "created-domain-id-1",
4
+ "url": "/v2/domains/created-domain-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
+ "name": "created-domain.com",
10
+ "owning_organization_guid": "created-organization-id-1",
11
+ "wildcard": true,
12
+ "spaces_url": "/v2/domains/created-domain-id-1/spaces",
13
+ "owning_organization_url": "/v2/organizations/created-organization-id-1"
14
+ }
15
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "metadata": {
3
+ "guid": "created-organization-id-1",
4
+ "url": "/v2/organizations/created-organization-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
+
10
+ }
11
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "metadata": {
3
+ "guid": "created-route-id-1",
4
+ "url": "/v2/routes/created-route-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
+ "host": "host",
10
+ "domain_guid": "domain-id",
11
+ "space_guid": "space-id"
12
+ }
13
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "metadata": {
3
+ "guid": "created-service-id-1",
4
+ "url": "/v2/routes/created-service-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
+
10
+ }
11
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "metadata": {
3
+ "guid": "created-space-id-1",
4
+ "url": "/v2/spaces/created-space-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
+
10
+ }
11
+ }
@@ -0,0 +1,11 @@
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
+
10
+ }
11
+ }
@@ -0,0 +1,55 @@
1
+ {
2
+ "metadata": {
3
+ "guid": "domain-id-1",
4
+ "url": "/v2/domains/domain-id-1",
5
+ "created_at": "2012-09-19 21:03:47 +0000",
6
+ "updated_at": null
7
+ },
8
+ "entity": {
9
+ "name": "domain.com",
10
+ "owning_organization_guid": "organization-id-1",
11
+ "owning_organization_url": "/v2/organizations/organization-id-1",
12
+ "wildcard": true,
13
+ "spaces_url": "/v2/domains/domain-id-1/spaces",
14
+ "spaces": [
15
+ {
16
+ "metadata": {
17
+ "guid": "space-id-1",
18
+ "url": "/v2/spaces/space-id-1",
19
+ "created_at": "2013-03-11 12:17:38 -0700",
20
+ "updated_at": null
21
+ },
22
+ "entity": {
23
+ "name": "space-name-1",
24
+ "organization_guid": "organization-id-1",
25
+ "developers_url": "/v2/spaces/space-id-1/developers",
26
+ "managers_url": "/v2/spaces/space-id-1/managers",
27
+ "auditors_url": "/v2/spaces/space-id-1/auditors",
28
+ "apps_url": "/v2/spaces/space-id-1/apps",
29
+ "domains_url": "/v2/spaces/space-id-1/domains",
30
+ "service_instances_url": "/v2/spaces/space-id-1/service_instances",
31
+ "organization_url": "/v2/organizations/organization-id-1"
32
+ }
33
+ },
34
+ {
35
+ "metadata": {
36
+ "guid": "space-id-2",
37
+ "url": "/v2/spaces/space-id-2",
38
+ "created_at": "2013-03-11 15:17:38 -0700",
39
+ "updated_at": null
40
+ },
41
+ "entity": {
42
+ "name": "space-name-2",
43
+ "organization_guid": "organization-id-1",
44
+ "developers_url": "/v2/spaces/space-id-2/developers",
45
+ "managers_url": "/v2/spaces/space-id-2/managers",
46
+ "auditors_url": "/v2/spaces/space-id-2/auditors",
47
+ "apps_url": "/v2/spaces/space-id-2/apps",
48
+ "domains_url": "/v2/spaces/space-id-2/domains",
49
+ "service_instances_url": "/v2/spaces/space-id-2/service_instances",
50
+ "organization_url": "/v2/organizations/organization-id-2"
51
+ }
52
+ }
53
+ ]
54
+ }
55
+ }
@@ -0,0 +1,27 @@
1
+ {
2
+ "total_results": 1,
3
+ "total_pages": 1,
4
+ "prev_url": null,
5
+ "next_url": null,
6
+ "resources": [
7
+ {
8
+ "metadata": {
9
+ "guid": "space-id-1",
10
+ "url": "/v2/spaces/space-id-1",
11
+ "created_at": "2013-03-11 12:17:38 -0700",
12
+ "updated_at": null
13
+ },
14
+ "entity": {
15
+ "name": "space-name-1",
16
+ "organization_guid": "organization-id-1",
17
+ "developers_url": "/v2/spaces/space-id-1/developers",
18
+ "managers_url": "/v2/spaces/space-id-1/managers",
19
+ "auditors_url": "/v2/spaces/space-id-1/auditors",
20
+ "apps_url": "/v2/spaces/space-id-1/apps",
21
+ "domains_url": "/v2/spaces/space-id-1/domains",
22
+ "service_instances_url": "/v2/spaces/space-id-1/service_instances",
23
+ "organization_url": "/v2/organizations/organization-id-1"
24
+ }
25
+ }
26
+ ]
27
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "total_results": 0,
3
+ "total_pages": 0,
4
+ "prev_url": null,
5
+ "next_url": null,
6
+ "resources": []
7
+ }