marathon-api 1.1.0 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (63) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/Rakefile +11 -6
  4. data/bin/marathon +49 -41
  5. data/fixtures/vcr/Marathon/_info/returns_the_info_hash.yml +10 -2
  6. data/fixtures/vcr/Marathon/_ping/ping/.yml +7 -1
  7. data/fixtures/vcr/Marathon_App/_changes/changes_the_app.yml +21 -5
  8. data/fixtures/vcr/Marathon_App/_changes/fails_with_stange_attributes.yml +8 -2
  9. data/fixtures/vcr/Marathon_App/_delete/deletes_the_app.yml +11 -3
  10. data/fixtures/vcr/Marathon_App/_delete/fails_deleting_not_existing_app.yml +9 -1
  11. data/fixtures/vcr/Marathon_App/_get/fails_getting_not_existing_app.yml +9 -1
  12. data/fixtures/vcr/Marathon_App/_get/gets_the_app.yml +10 -2
  13. data/fixtures/vcr/Marathon_App/_list/lists_apps.yml +11 -4
  14. data/fixtures/vcr/Marathon_App/_restart/fails_restarting_not_existing_app.yml +9 -1
  15. data/fixtures/vcr/Marathon_App/_restart/restarts_an_app.yml +9 -3
  16. data/fixtures/vcr/Marathon_App/_start/fails_getting_not_existing_app.yml +9 -1
  17. data/fixtures/vcr/Marathon_App/_start/starts_the_app.yml +12 -4
  18. data/fixtures/vcr/Marathon_App/_version/gets_a_version.yml +19 -7
  19. data/fixtures/vcr/Marathon_App/_versions/gets_versions.yml +9 -3
  20. data/fixtures/vcr/Marathon_Deployment/_delete/cleans_app_from_marathon.yml +38 -0
  21. data/fixtures/vcr/Marathon_Deployment/_delete/deletes_deployments.yml +20 -8
  22. data/fixtures/vcr/Marathon_Deployment/_list/lists_deployments.yml +34 -14
  23. data/fixtures/vcr/Marathon_EventSubscriptions/_list/lists_callbacks.yml +10 -2
  24. data/fixtures/vcr/Marathon_EventSubscriptions/_register/registers_callback.yml +10 -2
  25. data/fixtures/vcr/Marathon_EventSubscriptions/_unregister/unregisters_callback.yml +10 -2
  26. data/fixtures/vcr/Marathon_Group/_changes/changes_the_group.yml +20 -8
  27. data/fixtures/vcr/Marathon_Group/_changes/previews_changes.yml +38 -0
  28. data/fixtures/vcr/Marathon_Group/_delete/deletes_the_group.yml +9 -3
  29. data/fixtures/vcr/Marathon_Group/_delete/fails_deleting_not_existing_app.yml +8 -2
  30. data/fixtures/vcr/Marathon_Group/_get/fails_getting_not_existing_app.yml +8 -2
  31. data/fixtures/vcr/Marathon_Group/_get/gets_the_group.yml +9 -3
  32. data/fixtures/vcr/Marathon_Group/_list/lists_apps.yml +12 -4
  33. data/fixtures/vcr/Marathon_Group/_start/fails_getting_not_existing_group.yml +8 -2
  34. data/fixtures/vcr/Marathon_Group/_start/starts_the_group.yml +9 -3
  35. data/fixtures/vcr/Marathon_Leader/_delete/delete/.yml +9 -1
  36. data/fixtures/vcr/Marathon_Leader/_get/get/.yml +10 -2
  37. data/fixtures/vcr/Marathon_Queue/_list/lists_queue.yml +9 -4
  38. data/fixtures/vcr/Marathon_Task/_delete/kills_a_tasks_of_an_app.yml +26 -10
  39. data/fixtures/vcr/Marathon_Task/_delete_all/kills_all_tasks_of_an_app.yml +10 -2
  40. data/fixtures/vcr/Marathon_Task/_get/gets_tasks_of_an_app.yml +10 -2
  41. data/fixtures/vcr/Marathon_Task/_list/lists_running_tasks.yml +10 -2
  42. data/fixtures/vcr/Marathon_Task/_list/lists_tasks.yml +10 -2
  43. data/lib/marathon/deployment.rb +5 -2
  44. data/lib/marathon/deployment_action.rb +23 -0
  45. data/lib/marathon/deployment_info.rb +17 -1
  46. data/lib/marathon/deployment_step.rb +21 -0
  47. data/lib/marathon/error.rb +1 -1
  48. data/lib/marathon/group.rb +13 -5
  49. data/lib/marathon/task.rb +7 -9
  50. data/lib/marathon/version.rb +1 -1
  51. data/lib/marathon.rb +2 -0
  52. data/spec/marathon/app_spec.rb +5 -7
  53. data/spec/marathon/deployment_action_spec.rb +25 -0
  54. data/spec/marathon/deployment_info_spec.rb +10 -1
  55. data/spec/marathon/deployment_spec.rb +7 -3
  56. data/spec/marathon/deployment_step_spec.rb +32 -0
  57. data/spec/marathon/event_subscriptions_spec.rb +2 -2
  58. data/spec/marathon/group_spec.rb +31 -19
  59. data/spec/marathon/leader_spec.rb +2 -4
  60. data/spec/marathon/queue_spec.rb +1 -2
  61. data/spec/marathon/task_spec.rb +4 -10
  62. metadata +10 -3
  63. data/fixtures/vcr/Marathon_App/_tasks/has_tasks.yml +0 -30
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 37c0d0ae7d91ddeaa7861bffa40b81e72a434e19
4
- data.tar.gz: c5d165cf0d590a78fea207dfc705fa409174a8a5
3
+ metadata.gz: 6c559533ccc9fa9c31ab8bef43c85be37523dd19
4
+ data.tar.gz: d5a9ee23a61b5c87e59c8a98065b471af066ef24
5
5
  SHA512:
6
- metadata.gz: 941597d6ae53616a9931735f9a016606933df061115ff21eb1202325388d785e8e824dedc64e00d3fd64725f2560aac1bfdec0758d3b22ad57245b485f94dcdd
7
- data.tar.gz: 56afa004de719231016576cba81c13f2553d50e7378e9b79a05f68f5b8664e0ac52b0fa25f2df69f7f29710598f64b5809dfdaff39e1263efd43e4cccb0c828e
6
+ metadata.gz: 03b2bd23333085438a81bd9131fa40c4545d445495fd420316849e2b232be2b42c2eb5952a8c5677dbb805838345fece427eb706ad099cf13bd639eb69b8919b
7
+ data.tar.gz: fdf041c4549b82d01e25e626b5243faa3e7fb58f5bab98b6a209ae568fc23087d099376f9955a5dd9aed25431a7c95b76ebc07ebe6523549e940032d4e69fb03
data/README.md CHANGED
@@ -3,7 +3,7 @@ marathon-api
3
3
 
4
4
  [![Gem Version](https://badge.fury.io/rb/marathon-api.svg)](http://badge.fury.io/rb/marathon-api) [![travis-ci](https://travis-ci.org/otto-de/marathon-api.png?branch=master)](https://travis-ci.org/otto-de/marathon-api) [![Code Climate](https://codeclimate.com/github/otto-de/marathon-api/badges/gpa.svg)](https://codeclimate.com/github/otto-de/marathon-api) [![Test Coverage](https://codeclimate.com/github/otto-de/marathon-api/badges/coverage.svg)](https://codeclimate.com/github/otto-de/marathon-api)
5
5
 
6
- This gem provides an object oriented interface to the [Marathon Remote API][1]. At the time if this writing, marathon-api is meant to interface with Marathon version 0.8.0.
6
+ This gem provides an object oriented interface to the [Marathon Remote API][1]. At the time if this writing, marathon-api is meant to interface with Marathon version 0.8.1.
7
7
 
8
8
  Installation
9
9
  ------------
data/Rakefile CHANGED
@@ -19,16 +19,21 @@ end
19
19
 
20
20
  dir = File.expand_path(File.dirname(__FILE__))
21
21
  namespace :vcr do
22
- desc 'Run spec tests and record VCR cassettes'
23
- task :record do
22
+ desc 'Remove VCR files'
23
+ task :clean do
24
24
  FileUtils.remove_dir("#{dir}/fixtures/vcr", true)
25
+ end
26
+
27
+ desc 'Preapre Marathon by deploying some tasks'
28
+ task :prepare do
25
29
  json = JSON.parse(File.read("#{dir}/fixtures/marathon_docker_sample.json"))
26
30
  Marathon::App.new(json).start!
31
+
27
32
  json = JSON.parse(File.read("#{dir}/fixtures/marathon_docker_sample_2.json"))
28
33
  Marathon::App.new(json).start!
29
-
30
- # finally run spec tests
31
- Rake::Task["spec"].invoke
32
34
  end
33
35
 
34
- end
36
+ desc 'Run spec tests and record VCR cassettes'
37
+ task :record => [:clean, :prepare, :spec]
38
+
39
+ end
data/bin/marathon CHANGED
@@ -42,56 +42,59 @@ def subcmd_list(cmd_opts)
42
42
  end
43
43
 
44
44
  def subcmd_start(cmd_opts)
45
- begin
46
- if cmd_opts[:json]
47
- path = cmd_opts[:json]
48
- if path == '-'
49
- app_opts = Marathon::Util.keywordize_hash!(JSON.parse($stdin.read))
50
- elsif File.exists?(path)
51
- app_opts = Marathon::Util.keywordize_hash!(JSON.parse(File.read(cmd_opts[:json])))
52
- else
53
- raise Marathon::Error::ArgumentError, "File '#{path}' does not exist"
54
- end
45
+ if cmd_opts[:json]
46
+ path = cmd_opts[:json]
47
+ if path == '-'
48
+ app_opts = Marathon::Util.keywordize_hash!(JSON.parse($stdin.read))
49
+ elsif File.exists?(path)
50
+ app_opts = Marathon::Util.keywordize_hash!(JSON.parse(File.read(cmd_opts[:json])))
55
51
  else
56
- app_opts = DEFAULT_APP_OPTS
57
- end
58
- app_opts.merge!(cmd_opts.select { |k,_| ATTRIBUTES.include?(k) and cmd_opts["#{k.id2name}_given".to_sym] })
59
- if cmd_opts[:env]
60
- app_opts[:env] = Hash[cmd_opts[:env].map { |e| e.split('=', 2) }]
61
- end
62
- if cmd_opts[:constraints]
63
- app_opts[:constraints] = cmd_opts[:constraint].map { |c| c.split(':') }
52
+ raise Marathon::Error::ArgumentError, "File '#{path}' does not exist"
64
53
  end
65
- app = Marathon::App.new(app_opts)
66
- puts "Starting app '#{app}'"
67
- app.start!
68
- print_apps([app])
69
- rescue Marathon::Error::MarathonError => e
70
- puts "#{e.class}: #{e.message}"
71
- exit 1
54
+ else
55
+ app_opts = DEFAULT_APP_OPTS
56
+ end
57
+ app_opts.merge!(cmd_opts.select { |k,_| ATTRIBUTES.include?(k) and cmd_opts["#{k.id2name}_given".to_sym] })
58
+ if cmd_opts[:env]
59
+ app_opts[:env] = Hash[cmd_opts[:env].map { |e| e.split('=', 2) }]
72
60
  end
61
+ if cmd_opts[:constraints]
62
+ app_opts[:constraints] = cmd_opts[:constraint].map { |c| c.split(':') }
63
+ end
64
+ app = Marathon::App.new(app_opts)
65
+ puts "Starting app '#{app}'"
66
+ deployment = app.start!(cmd_opts[:force])
67
+ deployment.wait(cmd_opts[:timeout] || 60) if cmd_opts[:sync]
68
+ print_apps([app])
69
+ rescue Marathon::Error::MarathonError => e
70
+ puts "#{e.class}: #{e.message}"
71
+ exit 1
72
+ rescue TimeoutError => e
73
+ puts "Deployment took too long"
74
+ exit 1
73
75
  end
74
76
 
75
77
  def subcmd_scale(cmd_opts)
76
- begin
77
- app = Marathon::App.get(cmd_opts[:id])
78
- puts "Scaling app '#{app.id}' from #{app.instances} to #{cmd_opts[:instances]}"
79
- puts app.scale!(cmd_opts[:instances], cmd_opts[:force])
80
- rescue Marathon::Error::NotFoundError => e
81
- puts "#{e.class}: #{e.message}"
82
- exit 1
83
- end
78
+ app = Marathon::App.get(cmd_opts[:id])
79
+ puts "Scaling app '#{app.id}' from #{app.instances} to #{cmd_opts[:instances]}"
80
+ deployment = app.scale!(cmd_opts[:instances], cmd_opts[:force])
81
+ deployment.wait(cmd_opts[:timeout] || 60) if cmd_opts[:sync]
82
+ puts deployment
83
+ rescue Marathon::Error::NotFoundError => e
84
+ puts "#{e.class}: #{e.message}"
85
+ exit 1
86
+ rescue TimeoutError => e
87
+ puts "Deployment took too long"
88
+ exit 1
84
89
  end
85
90
 
86
91
  def subcmd_kill(cmd_opts)
87
- begin
88
- puts "Removing app '#{cmd_opts[:id]}'"
89
- Marathon::App.delete(cmd_opts[:id])
90
- puts 'done'
91
- rescue Marathon::Error::NotFoundError => e
92
- puts "#{e.class}: #{e.message}"
93
- exit 1
94
- end
92
+ puts "Removing app '#{cmd_opts[:id]}'"
93
+ Marathon::App.delete(cmd_opts[:id])
94
+ puts 'done'
95
+ rescue Marathon::Error::NotFoundError => e
96
+ puts "#{e.class}: #{e.message}"
97
+ exit 1
95
98
  end
96
99
 
97
100
  def subcmd_list_tasks(cmd_opts)
@@ -182,12 +185,17 @@ def parse_subcmd_opts(cmd)
182
185
  opt :uri, 'URIs to download and unpack into the working directory.', :short => '-u', :type => :strings
183
186
  opt :env, 'Environment variables to add to the process, as NAME=VALUE.', :short => '-e', :type => :strings
184
187
  opt :constraint, 'Placement constraint for tasks, e.g. hostname:UNIQUE or rackid:CLUSTER', :type => :strings
188
+ opt :force, 'The current deployment can be overridden by setting the `force`.', :short => '-f'
189
+ opt :sync, 'Wait for the deployment to finish', :short => '-s'
190
+ opt :timeout, 'Timout for sync call in seconds (default 60).', :type => Integer, :short => '-t'
185
191
  end
186
192
  when 'scale'
187
193
  Trollop.options do
188
194
  opt :id, 'A unique identifier for the app.', :short => '-i', :type => String, :required => true
189
195
  opt :instances, 'The number of instances to run.', :short => '-n', :type => Integer, :required => true
190
196
  opt :force, 'The current deployment can be overridden by setting the `force`.', :short => '-f'
197
+ opt :sync, 'Wait for the deployment to finish', :short => '-s'
198
+ opt :timeout, 'Timout for sync call in seconds (default 60).', :type => Integer, :short => '-t'
191
199
  end
192
200
  when 'kill'
193
201
  Trollop.options do
@@ -11,11 +11,19 @@ http_interactions:
11
11
  - application/json
12
12
  Accept:
13
13
  - application/json
14
+ User-Agent:
15
+ - ub0r/Marathon-API 1.1.0
14
16
  response:
15
17
  status:
16
18
  code: 200
17
19
  message: OK
18
20
  headers:
21
+ Cache-Control:
22
+ - no-cache, no-store, must-revalidate
23
+ Pragma:
24
+ - no-cache
25
+ Expires:
26
+ - '0'
19
27
  Content-Type:
20
28
  - application/json
21
29
  Transfer-Encoding:
@@ -24,7 +32,7 @@ http_interactions:
24
32
  - Jetty(8.y.z-SNAPSHOT)
25
33
  body:
26
34
  encoding: UTF-8
27
- string: '{"name":"marathon","http_config":{"assets_path":null,"http_port":8080,"https_port":8443},"frameworkId":"20150228-110436-16842879-5050-2169-0001","leader":null,"event_subscriber":null,"marathon_config":{"local_port_max":20000,"local_port_min":10000,"hostname":"mesos","master":"zk://localhost:2181/mesos","reconciliation_interval":300000,"mesos_role":null,"task_launch_timeout":300000,"reconciliation_initial_delay":15000,"ha":true,"failover_timeout":604800,"checkpoint":true,"executor":"//cmd","marathon_store_timeout":2000,"mesos_user":"root"},"version":"0.8.0","zookeeper_config":{"zk_path":"/marathon","zk":null,"zk_timeout":10,"zk_hosts":"localhost:2181","zk_future_timeout":{"duration":10}},"elected":false}'
35
+ string: '{"name":"marathon","http_config":{"assets_path":null,"http_port":8080,"https_port":8443},"frameworkId":"20150210-083349-1160423616-5050-9698-0000","leader":null,"event_subscriber":{"type":"http_callback","http_endpoints":["http://127.0.0.1:8083/marathon/event"]},"marathon_config":{"local_port_max":20000,"local_port_min":10000,"hostname":"mesos-dev-f999998.lhotse.ov.otto.de","master":"zk://192.168.42.69:2181/develop/mesos","reconciliation_interval":75000,"mesos_role":null,"task_launch_timeout":300000,"reconciliation_initial_delay":15000,"ha":true,"failover_timeout":75,"checkpoint":true,"webui_url":null,"executor":"//cmd","marathon_store_timeout":2000,"mesos_user":"root"},"version":"0.8.1","zookeeper_config":{"zk_path":"/develop/marathon","zk":"zk://192.168.42.69:2181/develop/marathon","zk_timeout":10,"zk_hosts":"192.168.42.69:2181","zk_future_timeout":{"duration":10}},"elected":false}'
28
36
  http_version:
29
- recorded_at: Mon, 02 Mar 2015 10:49:28 GMT
37
+ recorded_at: Tue, 17 Mar 2015 13:06:09 GMT
30
38
  recorded_with: VCR 2.9.3
@@ -11,11 +11,17 @@ http_interactions:
11
11
  - application/json
12
12
  Accept:
13
13
  - application/json
14
+ User-Agent:
15
+ - ub0r/Marathon-API 1.1.0
14
16
  response:
15
17
  status:
16
18
  code: 200
17
19
  message: OK
18
20
  headers:
21
+ Pragma:
22
+ - no-cache
23
+ Expires:
24
+ - '0'
19
25
  Cache-Control:
20
26
  - must-revalidate,no-cache,no-store
21
27
  Access-Control-Allow-Credentials:
@@ -31,5 +37,5 @@ http_interactions:
31
37
  string: |
32
38
  pong
33
39
  http_version:
34
- recorded_at: Mon, 02 Mar 2015 10:49:28 GMT
40
+ recorded_at: Tue, 17 Mar 2015 13:06:09 GMT
35
41
  recorded_with: VCR 2.9.3
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: put
5
- uri: http://localhost:8080/v2/apps//ubuntu2
5
+ uri: http://localhost:8080/v2/apps//ubuntu2?force=true
6
6
  body:
7
7
  encoding: UTF-8
8
8
  string: '{"instances":2}'
@@ -11,11 +11,19 @@ http_interactions:
11
11
  - application/json
12
12
  Accept:
13
13
  - application/json
14
+ User-Agent:
15
+ - ub0r/Marathon-API 1.1.0
14
16
  response:
15
17
  status:
16
18
  code: 200
17
19
  message: OK
18
20
  headers:
21
+ Cache-Control:
22
+ - no-cache, no-store, must-revalidate
23
+ Pragma:
24
+ - no-cache
25
+ Expires:
26
+ - '0'
19
27
  Content-Type:
20
28
  - application/json
21
29
  Transfer-Encoding:
@@ -24,9 +32,9 @@ http_interactions:
24
32
  - Jetty(8.y.z-SNAPSHOT)
25
33
  body:
26
34
  encoding: UTF-8
27
- string: '{"version":"2015-03-03T18:08:29.872Z","deploymentId":"577a4136-d861-4f41-b400-1f73314c9ffd"}'
35
+ string: '{"version":"2015-03-17T13:07:11.009Z","deploymentId":"442a4787-a964-4a16-889e-4fed7944ad7f"}'
28
36
  http_version:
29
- recorded_at: Tue, 03 Mar 2015 18:08:29 GMT
37
+ recorded_at: Tue, 17 Mar 2015 13:07:11 GMT
30
38
  - request:
31
39
  method: put
32
40
  uri: http://localhost:8080/v2/apps//ubuntu2?force=true
@@ -38,11 +46,19 @@ http_interactions:
38
46
  - application/json
39
47
  Accept:
40
48
  - application/json
49
+ User-Agent:
50
+ - ub0r/Marathon-API 1.1.0
41
51
  response:
42
52
  status:
43
53
  code: 200
44
54
  message: OK
45
55
  headers:
56
+ Cache-Control:
57
+ - no-cache, no-store, must-revalidate
58
+ Pragma:
59
+ - no-cache
60
+ Expires:
61
+ - '0'
46
62
  Content-Type:
47
63
  - application/json
48
64
  Transfer-Encoding:
@@ -51,7 +67,7 @@ http_interactions:
51
67
  - Jetty(8.y.z-SNAPSHOT)
52
68
  body:
53
69
  encoding: UTF-8
54
- string: '{"version":"2015-03-03T18:08:30.012Z","deploymentId":"b1457aac-c4af-426f-bc2b-c2d67afed429"}'
70
+ string: '{"version":"2015-03-17T13:07:11.094Z","deploymentId":"25c06868-441f-4af4-95aa-96e1862e8553"}'
55
71
  http_version:
56
- recorded_at: Tue, 03 Mar 2015 18:08:30 GMT
72
+ recorded_at: Tue, 17 Mar 2015 13:07:11 GMT
57
73
  recorded_with: VCR 2.9.3
@@ -12,12 +12,18 @@ http_interactions:
12
12
  Accept:
13
13
  - application/json
14
14
  User-Agent:
15
- - ub0r/Marathon-API 0.8.0
15
+ - ub0r/Marathon-API 1.1.0
16
16
  response:
17
17
  status:
18
18
  code: 400
19
19
  message: Bad Request
20
20
  headers:
21
+ Cache-Control:
22
+ - no-cache, no-store, must-revalidate
23
+ Pragma:
24
+ - no-cache
25
+ Expires:
26
+ - '0'
21
27
  Content-Type:
22
28
  - application/json
23
29
  Transfer-Encoding:
@@ -28,5 +34,5 @@ http_interactions:
28
34
  encoding: UTF-8
29
35
  string: '{"message":"Invalid JSON: JsResultException(errors:List((/instances,List(ValidationError(error.expected.jsnumber,WrappedArray())))))"}'
30
36
  http_version:
31
- recorded_at: Wed, 04 Mar 2015 16:38:10 GMT
37
+ recorded_at: Tue, 17 Mar 2015 13:05:49 GMT
32
38
  recorded_with: VCR 2.9.3
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: delete
5
- uri: http://localhost:8080/v2/apps//ubuntu
5
+ uri: http://localhost:8080/v2/apps//test-app
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -11,11 +11,19 @@ http_interactions:
11
11
  - application/json
12
12
  Accept:
13
13
  - application/json
14
+ User-Agent:
15
+ - ub0r/Marathon-API 1.1.0
14
16
  response:
15
17
  status:
16
18
  code: 200
17
19
  message: OK
18
20
  headers:
21
+ Cache-Control:
22
+ - no-cache, no-store, must-revalidate
23
+ Pragma:
24
+ - no-cache
25
+ Expires:
26
+ - '0'
19
27
  Content-Type:
20
28
  - application/json
21
29
  Transfer-Encoding:
@@ -24,7 +32,7 @@ http_interactions:
24
32
  - Jetty(8.y.z-SNAPSHOT)
25
33
  body:
26
34
  encoding: UTF-8
27
- string: '{"version":"2015-03-03T18:08:29.568Z","deploymentId":"475735d1-4c08-439d-8687-d13626e512a1"}'
35
+ string: '{"version":"2015-03-17T13:05:39.285Z","deploymentId":"e5985d99-2106-40e2-962d-18cb18126269"}'
28
36
  http_version:
29
- recorded_at: Tue, 03 Mar 2015 18:08:29 GMT
37
+ recorded_at: Tue, 17 Mar 2015 13:05:39 GMT
30
38
  recorded_with: VCR 2.9.3
@@ -11,11 +11,19 @@ http_interactions:
11
11
  - application/json
12
12
  Accept:
13
13
  - application/json
14
+ User-Agent:
15
+ - ub0r/Marathon-API 1.1.0
14
16
  response:
15
17
  status:
16
18
  code: 404
17
19
  message: Not Found
18
20
  headers:
21
+ Cache-Control:
22
+ - no-cache, no-store, must-revalidate
23
+ Pragma:
24
+ - no-cache
25
+ Expires:
26
+ - '0'
19
27
  Content-Type:
20
28
  - application/json
21
29
  Transfer-Encoding:
@@ -26,5 +34,5 @@ http_interactions:
26
34
  encoding: UTF-8
27
35
  string: '{"message":"App ''/fooo app'' does not exist"}'
28
36
  http_version:
29
- recorded_at: Mon, 02 Mar 2015 10:49:28 GMT
37
+ recorded_at: Tue, 17 Mar 2015 13:05:39 GMT
30
38
  recorded_with: VCR 2.9.3
@@ -11,11 +11,19 @@ http_interactions:
11
11
  - application/json
12
12
  Accept:
13
13
  - application/json
14
+ User-Agent:
15
+ - ub0r/Marathon-API 1.1.0
14
16
  response:
15
17
  status:
16
18
  code: 404
17
19
  message: Not Found
18
20
  headers:
21
+ Cache-Control:
22
+ - no-cache, no-store, must-revalidate
23
+ Pragma:
24
+ - no-cache
25
+ Expires:
26
+ - '0'
19
27
  Content-Type:
20
28
  - application/json
21
29
  Transfer-Encoding:
@@ -26,5 +34,5 @@ http_interactions:
26
34
  encoding: UTF-8
27
35
  string: '{"message":"App ''/fooo app'' does not exist"}'
28
36
  http_version:
29
- recorded_at: Mon, 02 Mar 2015 10:49:27 GMT
37
+ recorded_at: Tue, 17 Mar 2015 13:05:39 GMT
30
38
  recorded_with: VCR 2.9.3
@@ -11,11 +11,19 @@ http_interactions:
11
11
  - application/json
12
12
  Accept:
13
13
  - application/json
14
+ User-Agent:
15
+ - ub0r/Marathon-API 1.1.0
14
16
  response:
15
17
  status:
16
18
  code: 200
17
19
  message: OK
18
20
  headers:
21
+ Cache-Control:
22
+ - no-cache, no-store, must-revalidate
23
+ Pragma:
24
+ - no-cache
25
+ Expires:
26
+ - '0'
19
27
  Content-Type:
20
28
  - application/json
21
29
  Transfer-Encoding:
@@ -24,7 +32,7 @@ http_interactions:
24
32
  - Jetty(8.y.z-SNAPSHOT)
25
33
  body:
26
34
  encoding: UTF-8
27
- string: '{"app":{"id":"/ubuntu","cmd":"while sleep 10; do date -u +%T; done","args":null,"user":null,"env":{},"instances":1,"cpus":0.1,"mem":64.0,"disk":0.0,"executor":"","constraints":[],"uris":[],"storeUrls":[],"ports":[10000],"requirePorts":false,"backoffSeconds":1,"backoffFactor":1.15,"maxLaunchDelaySeconds":3600,"container":{"type":"DOCKER","volumes":[],"docker":{"image":"libmesos/ubuntu","privileged":false,"parameters":[]}},"healthChecks":[],"dependencies":[],"upgradeStrategy":{"minimumHealthCapacity":1.0,"maximumOverCapacity":1.0},"labels":{},"version":"2015-03-03T18:08:28.345Z","tasksStaged":0,"tasksRunning":0,"deployments":[{"id":"2ec67f95-152d-4528-942e-435b2a1fec6a"}],"tasks":[],"lastTaskFailure":null}}'
35
+ string: '{"app":{"id":"/ubuntu","cmd":"while sleep 10; do date -u +%T; done","args":null,"user":null,"env":{},"instances":1,"cpus":0.1,"mem":64.0,"disk":0.0,"executor":"","constraints":[],"uris":[],"storeUrls":[],"ports":[],"requirePorts":false,"backoffSeconds":1,"backoffFactor":1.15,"maxLaunchDelaySeconds":3600,"container":{"type":"DOCKER","volumes":[],"docker":{"image":"libmesos/ubuntu","privileged":false,"parameters":[]}},"healthChecks":[],"dependencies":[],"upgradeStrategy":{"minimumHealthCapacity":1.0,"maximumOverCapacity":1.0},"labels":{},"version":"2015-03-17T11:56:26.532Z","tasksStaged":0,"tasksRunning":1,"tasksHealthy":0,"tasksUnhealthy":0,"deployments":[],"tasks":[{"id":"ubuntu.a6c4d769-cc9c-11e4-9cfc-080027d9edbf","host":"mesos-dev-f999999.lhotse.ov.otto.de","ports":[],"startedAt":"2015-03-17T11:56:36.225Z","stagedAt":"2015-03-17T11:56:31.284Z","version":"2015-03-17T11:56:26.532Z","appId":"/ubuntu"}],"lastTaskFailure":null}}'
28
36
  http_version:
29
- recorded_at: Tue, 03 Mar 2015 18:08:29 GMT
37
+ recorded_at: Tue, 17 Mar 2015 13:05:39 GMT
30
38
  recorded_with: VCR 2.9.3
@@ -11,11 +11,19 @@ http_interactions:
11
11
  - application/json
12
12
  Accept:
13
13
  - application/json
14
+ User-Agent:
15
+ - ub0r/Marathon-API 1.1.0
14
16
  response:
15
17
  status:
16
18
  code: 200
17
19
  message: OK
18
20
  headers:
21
+ Cache-Control:
22
+ - no-cache, no-store, must-revalidate
23
+ Pragma:
24
+ - no-cache
25
+ Expires:
26
+ - '0'
19
27
  Content-Type:
20
28
  - application/json
21
29
  Transfer-Encoding:
@@ -24,9 +32,8 @@ http_interactions:
24
32
  - Jetty(8.y.z-SNAPSHOT)
25
33
  body:
26
34
  encoding: UTF-8
27
- string: '{"apps":[{"id":"/test","cmd":"sleep 10","args":null,"user":null,"env":{},"instances":1,"cpus":0.1,"mem":32.0,"disk":0.0,"executor":"","constraints":[],"uris":[],"storeUrls":[],"ports":[10002],"requirePorts":false,"backoffSeconds":1,"backoffFactor":1.15,"maxLaunchDelaySeconds":3600,"container":null,"healthChecks":[],"dependencies":[],"upgradeStrategy":{"minimumHealthCapacity":1.0,"maximumOverCapacity":1.0},"labels":{},"version":"2015-03-02T11:30:30.096Z","tasksStaged":0,"tasksRunning":1,"deployments":[]},{"id":"/ubuntu","cmd":"while
28
- sleep 10; do date -u +%T; done","args":null,"user":null,"env":{},"instances":1,"cpus":0.1,"mem":64.0,"disk":0.0,"executor":"","constraints":[],"uris":[],"storeUrls":[],"ports":[10000],"requirePorts":false,"backoffSeconds":1,"backoffFactor":1.15,"maxLaunchDelaySeconds":3600,"container":{"type":"DOCKER","volumes":[],"docker":{"image":"libmesos/ubuntu","privileged":false,"parameters":[]}},"healthChecks":[],"dependencies":[],"upgradeStrategy":{"minimumHealthCapacity":1.0,"maximumOverCapacity":1.0},"labels":{},"version":"2015-03-03T18:08:28.345Z","tasksStaged":0,"tasksRunning":0,"deployments":[{"id":"2ec67f95-152d-4528-942e-435b2a1fec6a"}]},{"id":"/ubuntu2","cmd":"while
29
- sleep 10; do date -u +%T; done","args":null,"user":null,"env":{},"instances":1,"cpus":0.1,"mem":64.0,"disk":0.0,"executor":"","constraints":[],"uris":[],"storeUrls":[],"ports":[10001],"requirePorts":false,"backoffSeconds":1,"backoffFactor":1.15,"maxLaunchDelaySeconds":3600,"container":{"type":"DOCKER","volumes":[],"docker":{"image":"libmesos/ubuntu","privileged":false,"parameters":[]}},"healthChecks":[],"dependencies":[],"upgradeStrategy":{"minimumHealthCapacity":1.0,"maximumOverCapacity":1.0},"labels":{},"version":"2015-03-03T18:08:28.455Z","tasksStaged":0,"tasksRunning":1,"deployments":[]}]}'
35
+ string: '{"apps":[{"id":"/ubuntu","cmd":"while sleep 10; do date -u +%T; done","args":null,"user":null,"env":{},"instances":1,"cpus":0.1,"mem":64.0,"disk":0.0,"executor":"","constraints":[],"uris":[],"storeUrls":[],"ports":[],"requirePorts":false,"backoffSeconds":1,"backoffFactor":1.15,"maxLaunchDelaySeconds":3600,"container":{"type":"DOCKER","volumes":[],"docker":{"image":"libmesos/ubuntu","privileged":false,"parameters":[]}},"healthChecks":[],"dependencies":[],"upgradeStrategy":{"minimumHealthCapacity":1.0,"maximumOverCapacity":1.0},"labels":{},"version":"2015-03-17T11:56:26.532Z","tasksStaged":0,"tasksRunning":1,"tasksHealthy":0,"tasksUnhealthy":0,"deployments":[]},{"id":"/ubuntu2","cmd":"while
36
+ sleep 10; do date -u +%T; done","args":null,"user":null,"env":{},"instances":1,"cpus":0.1,"mem":64.0,"disk":0.0,"executor":"","constraints":[["hostname","GROUP_BY"]],"uris":[],"storeUrls":[],"ports":[],"requirePorts":false,"backoffSeconds":1,"backoffFactor":1.15,"maxLaunchDelaySeconds":3600,"container":{"type":"DOCKER","volumes":[],"docker":{"image":"libmesos/ubuntu","privileged":false,"parameters":[]}},"healthChecks":[],"dependencies":[],"upgradeStrategy":{"minimumHealthCapacity":1.0,"maximumOverCapacity":1.0},"labels":{},"version":"2015-03-17T13:04:37.200Z","tasksStaged":0,"tasksRunning":1,"tasksHealthy":0,"tasksUnhealthy":0,"deployments":[]}]}'
30
37
  http_version:
31
- recorded_at: Tue, 03 Mar 2015 18:08:29 GMT
38
+ recorded_at: Tue, 17 Mar 2015 13:05:38 GMT
32
39
  recorded_with: VCR 2.9.3
@@ -11,11 +11,19 @@ http_interactions:
11
11
  - application/json
12
12
  Accept:
13
13
  - application/json
14
+ User-Agent:
15
+ - ub0r/Marathon-API 1.1.0
14
16
  response:
15
17
  status:
16
18
  code: 404
17
19
  message: Not Found
18
20
  headers:
21
+ Cache-Control:
22
+ - no-cache, no-store, must-revalidate
23
+ Pragma:
24
+ - no-cache
25
+ Expires:
26
+ - '0'
19
27
  Content-Type:
20
28
  - application/json
21
29
  Transfer-Encoding:
@@ -26,5 +34,5 @@ http_interactions:
26
34
  encoding: UTF-8
27
35
  string: '{"message":"App ''/fooo app'' does not exist"}'
28
36
  http_version:
29
- recorded_at: Mon, 02 Mar 2015 10:49:28 GMT
37
+ recorded_at: Tue, 17 Mar 2015 13:05:39 GMT
30
38
  recorded_with: VCR 2.9.3
@@ -12,12 +12,18 @@ http_interactions:
12
12
  Accept:
13
13
  - application/json
14
14
  User-Agent:
15
- - ub0r/Marathon-API 0.9.0
15
+ - ub0r/Marathon-API 1.1.0
16
16
  response:
17
17
  status:
18
18
  code: 200
19
19
  message: OK
20
20
  headers:
21
+ Cache-Control:
22
+ - no-cache, no-store, must-revalidate
23
+ Pragma:
24
+ - no-cache
25
+ Expires:
26
+ - '0'
21
27
  Content-Type:
22
28
  - application/json
23
29
  Transfer-Encoding:
@@ -26,7 +32,7 @@ http_interactions:
26
32
  - Jetty(8.y.z-SNAPSHOT)
27
33
  body:
28
34
  encoding: UTF-8
29
- string: '{"version":"2015-03-07T14:15:30.159Z","deploymentId":"d38f8d55-b8b0-4893-ab16-ae474e282263"}'
35
+ string: '{"version":"2015-03-17T13:05:39.490Z","deploymentId":"f31c4fdf-ba97-4e45-a69b-48cc79f19706"}'
30
36
  http_version:
31
- recorded_at: Sat, 07 Mar 2015 14:15:30 GMT
37
+ recorded_at: Tue, 17 Mar 2015 13:05:39 GMT
32
38
  recorded_with: VCR 2.9.3
@@ -11,11 +11,19 @@ http_interactions:
11
11
  - application/json
12
12
  Accept:
13
13
  - application/json
14
+ User-Agent:
15
+ - ub0r/Marathon-API 1.1.0
14
16
  response:
15
17
  status:
16
18
  code: 404
17
19
  message: Not Found
18
20
  headers:
21
+ Cache-Control:
22
+ - no-cache, no-store, must-revalidate
23
+ Pragma:
24
+ - no-cache
25
+ Expires:
26
+ - '0'
19
27
  Content-Type:
20
28
  - application/json
21
29
  Transfer-Encoding:
@@ -26,5 +34,5 @@ http_interactions:
26
34
  encoding: UTF-8
27
35
  string: '{"message":"App ''/fooo app'' does not exist"}'
28
36
  http_version:
29
- recorded_at: Mon, 02 Mar 2015 11:30:30 GMT
37
+ recorded_at: Tue, 17 Mar 2015 13:05:39 GMT
30
38
  recorded_with: VCR 2.9.3
@@ -5,19 +5,27 @@ http_interactions:
5
5
  uri: http://localhost:8080/v2/apps
6
6
  body:
7
7
  encoding: UTF-8
8
- string: '{"id":"/test","cmd":"sleep 10","instances":1,"cpus":0.1,"mem":32}'
8
+ string: '{"id":"/test-app","cmd":"sleep 10","instances":1,"cpus":0.1,"mem":32}'
9
9
  headers:
10
10
  Content-Type:
11
11
  - application/json
12
12
  Accept:
13
13
  - application/json
14
+ User-Agent:
15
+ - ub0r/Marathon-API 1.1.0
14
16
  response:
15
17
  status:
16
18
  code: 201
17
19
  message: Created
18
20
  headers:
21
+ Cache-Control:
22
+ - no-cache, no-store, must-revalidate
23
+ Pragma:
24
+ - no-cache
25
+ Expires:
26
+ - '0'
19
27
  Location:
20
- - http://localhost:8080/v2/apps/test
28
+ - http://localhost:8080/v2/apps/test-app
21
29
  Content-Type:
22
30
  - application/json
23
31
  Transfer-Encoding:
@@ -26,7 +34,7 @@ http_interactions:
26
34
  - Jetty(8.y.z-SNAPSHOT)
27
35
  body:
28
36
  encoding: UTF-8
29
- string: '{"id":"/test","cmd":"sleep 10","args":null,"user":null,"env":{},"instances":1,"cpus":0.1,"mem":32.0,"disk":0.0,"executor":"","constraints":[],"uris":[],"storeUrls":[],"ports":[0],"requirePorts":false,"backoffSeconds":1,"backoffFactor":1.15,"maxLaunchDelaySeconds":3600,"container":null,"healthChecks":[],"dependencies":[],"upgradeStrategy":{"minimumHealthCapacity":1.0,"maximumOverCapacity":1.0},"labels":{},"version":"2015-03-03T18:08:29.318Z"}'
37
+ string: '{"id":"/test-app","cmd":"sleep 10","args":null,"user":null,"env":{},"instances":1,"cpus":0.1,"mem":32.0,"disk":0.0,"executor":"","constraints":[],"uris":[],"storeUrls":[],"ports":[0],"requirePorts":false,"backoffFactor":1.15,"container":null,"healthChecks":[],"dependencies":[],"upgradeStrategy":{"minimumHealthCapacity":1.0,"maximumOverCapacity":1.0},"labels":{},"version":"2015-03-17T13:05:38.806Z","deployments":[{"id":"92294bd9-b2a5-48be-8d02-c594d4bf3a21"}],"tasks":[],"tasksStaged":0,"tasksRunning":0,"tasksHealthy":0,"tasksUnhealthy":0,"backoffSeconds":1,"maxLaunchDelaySeconds":3600}'
30
38
  http_version:
31
- recorded_at: Tue, 03 Mar 2015 18:08:29 GMT
39
+ recorded_at: Tue, 17 Mar 2015 13:05:38 GMT
32
40
  recorded_with: VCR 2.9.3