bosh_cli 1.0.3 → 1.5.0.pre.1113

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (144) hide show
  1. data/bin/bosh +0 -9
  2. data/lib/cli.rb +69 -64
  3. data/lib/cli/backup_destination_path.rb +33 -0
  4. data/lib/cli/base_command.rb +57 -56
  5. data/lib/cli/blob_manager.rb +12 -12
  6. data/lib/cli/changeset_helper.rb +6 -7
  7. data/lib/cli/client/director.rb +724 -0
  8. data/lib/cli/command_handler.rb +6 -7
  9. data/lib/cli/commands/backup.rb +39 -0
  10. data/lib/cli/commands/biff.rb +42 -21
  11. data/lib/cli/commands/blob_management.rb +1 -1
  12. data/lib/cli/commands/cloudcheck.rb +11 -13
  13. data/lib/cli/commands/deployment.rb +53 -37
  14. data/lib/cli/commands/help.rb +3 -2
  15. data/lib/cli/commands/job_management.rb +67 -103
  16. data/lib/cli/commands/job_rename.rb +6 -8
  17. data/lib/cli/commands/log_management.rb +78 -55
  18. data/lib/cli/commands/maintenance.rb +36 -30
  19. data/lib/cli/commands/misc.rb +72 -51
  20. data/lib/cli/commands/package.rb +2 -2
  21. data/lib/cli/commands/property_management.rb +10 -12
  22. data/lib/cli/commands/release.rb +236 -133
  23. data/lib/cli/commands/snapshot.rb +93 -0
  24. data/lib/cli/commands/ssh.rb +216 -213
  25. data/lib/cli/commands/stemcell.rb +46 -34
  26. data/lib/cli/commands/task.rb +2 -2
  27. data/lib/cli/commands/user.rb +27 -3
  28. data/lib/cli/commands/vm.rb +28 -0
  29. data/lib/cli/commands/vms.rb +81 -23
  30. data/lib/cli/config.rb +6 -2
  31. data/lib/cli/core_ext.rb +31 -30
  32. data/lib/cli/deployment_helper.rb +134 -159
  33. data/lib/cli/deployment_manifest.rb +66 -0
  34. data/lib/cli/deployment_manifest_compiler.rb +0 -3
  35. data/lib/cli/event_log_renderer.rb +10 -10
  36. data/lib/cli/file_with_progress_bar.rb +52 -0
  37. data/lib/cli/job_builder.rb +1 -1
  38. data/lib/cli/job_command_args.rb +23 -0
  39. data/lib/cli/job_property_collection.rb +4 -7
  40. data/lib/cli/job_property_validator.rb +22 -12
  41. data/lib/cli/job_state.rb +54 -0
  42. data/lib/cli/line_wrap.rb +54 -0
  43. data/lib/cli/packaging_helper.rb +10 -10
  44. data/lib/cli/release.rb +18 -15
  45. data/lib/cli/release_builder.rb +9 -4
  46. data/lib/cli/release_compiler.rb +9 -9
  47. data/lib/cli/release_tarball.rb +3 -6
  48. data/lib/cli/resurrection.rb +31 -0
  49. data/lib/cli/runner.rb +56 -30
  50. data/lib/cli/stemcell.rb +25 -10
  51. data/lib/cli/task_log_renderer.rb +1 -1
  52. data/lib/cli/task_tracker.rb +10 -9
  53. data/lib/cli/validation.rb +3 -1
  54. data/lib/cli/version.rb +1 -1
  55. data/lib/cli/version_calc.rb +5 -18
  56. data/lib/cli/versions_index.rb +1 -1
  57. data/lib/cli/vm_state.rb +43 -0
  58. data/lib/cli/yaml_helper.rb +26 -35
  59. metadata +75 -208
  60. data/Rakefile +0 -56
  61. data/lib/cli/director.rb +0 -628
  62. data/spec/assets/biff/bad_gateway_config.yml +0 -28
  63. data/spec/assets/biff/good_simple_config.yml +0 -63
  64. data/spec/assets/biff/good_simple_golden_config.yml +0 -63
  65. data/spec/assets/biff/good_simple_template.erb +0 -69
  66. data/spec/assets/biff/ip_out_of_range.yml +0 -63
  67. data/spec/assets/biff/multiple_subnets_config.yml +0 -40
  68. data/spec/assets/biff/network_only_template.erb +0 -34
  69. data/spec/assets/biff/no_cc_config.yml +0 -27
  70. data/spec/assets/biff/no_range_config.yml +0 -27
  71. data/spec/assets/biff/no_subnet_config.yml +0 -16
  72. data/spec/assets/biff/ok_network_config.yml +0 -30
  73. data/spec/assets/biff/properties_template.erb +0 -6
  74. data/spec/assets/config/atmos/config/final.yml +0 -6
  75. data/spec/assets/config/atmos/config/private.yml +0 -4
  76. data/spec/assets/config/bad-providers/config/final.yml +0 -5
  77. data/spec/assets/config/bad-providers/config/private.yml +0 -4
  78. data/spec/assets/config/deprecation/config/final.yml +0 -5
  79. data/spec/assets/config/deprecation/config/private.yml +0 -2
  80. data/spec/assets/config/local/config/final.yml +0 -5
  81. data/spec/assets/config/local/config/private.yml +0 -1
  82. data/spec/assets/config/s3/config/final.yml +0 -5
  83. data/spec/assets/config/s3/config/private.yml +0 -5
  84. data/spec/assets/config/swift-hp/config/final.yml +0 -6
  85. data/spec/assets/config/swift-hp/config/private.yml +0 -7
  86. data/spec/assets/config/swift-rackspace/config/final.yml +0 -6
  87. data/spec/assets/config/swift-rackspace/config/private.yml +0 -6
  88. data/spec/assets/deployment.MF +0 -0
  89. data/spec/assets/plugins/bosh/cli/commands/echo.rb +0 -43
  90. data/spec/assets/plugins/bosh/cli/commands/ruby.rb +0 -24
  91. data/spec/assets/release/jobs/cacher.tgz +0 -0
  92. data/spec/assets/release/jobs/cacher/config/file1.conf +0 -0
  93. data/spec/assets/release/jobs/cacher/config/file2.conf +0 -0
  94. data/spec/assets/release/jobs/cacher/job.MF +0 -6
  95. data/spec/assets/release/jobs/cacher/monit +0 -1
  96. data/spec/assets/release/jobs/cleaner.tgz +0 -0
  97. data/spec/assets/release/jobs/cleaner/job.MF +0 -4
  98. data/spec/assets/release/jobs/cleaner/monit +0 -1
  99. data/spec/assets/release/jobs/sweeper.tgz +0 -0
  100. data/spec/assets/release/jobs/sweeper/config/test.conf +0 -1
  101. data/spec/assets/release/jobs/sweeper/job.MF +0 -5
  102. data/spec/assets/release/jobs/sweeper/monit +0 -1
  103. data/spec/assets/release/packages/mutator.tar.gz +0 -0
  104. data/spec/assets/release/packages/stuff.tgz +0 -0
  105. data/spec/assets/release/release.MF +0 -17
  106. data/spec/assets/release_invalid_checksum.tgz +0 -0
  107. data/spec/assets/release_invalid_jobs.tgz +0 -0
  108. data/spec/assets/release_no_name.tgz +0 -0
  109. data/spec/assets/release_no_version.tgz +0 -0
  110. data/spec/assets/stemcell/image +0 -1
  111. data/spec/assets/stemcell/stemcell.MF +0 -6
  112. data/spec/assets/stemcell_invalid_mf.tgz +0 -0
  113. data/spec/assets/stemcell_no_image.tgz +0 -0
  114. data/spec/assets/valid_release.tgz +0 -0
  115. data/spec/assets/valid_stemcell.tgz +0 -0
  116. data/spec/spec_helper.rb +0 -28
  117. data/spec/unit/base_command_spec.rb +0 -87
  118. data/spec/unit/biff_spec.rb +0 -172
  119. data/spec/unit/blob_manager_spec.rb +0 -288
  120. data/spec/unit/cache_spec.rb +0 -36
  121. data/spec/unit/cli_commands_spec.rb +0 -356
  122. data/spec/unit/config_spec.rb +0 -125
  123. data/spec/unit/core_ext_spec.rb +0 -81
  124. data/spec/unit/dependency_helper_spec.rb +0 -52
  125. data/spec/unit/deployment_manifest_compiler_spec.rb +0 -63
  126. data/spec/unit/deployment_manifest_spec.rb +0 -153
  127. data/spec/unit/director_spec.rb +0 -471
  128. data/spec/unit/director_task_spec.rb +0 -48
  129. data/spec/unit/event_log_renderer_spec.rb +0 -171
  130. data/spec/unit/hash_changeset_spec.rb +0 -73
  131. data/spec/unit/job_builder_spec.rb +0 -455
  132. data/spec/unit/job_property_collection_spec.rb +0 -111
  133. data/spec/unit/job_property_validator_spec.rb +0 -7
  134. data/spec/unit/job_rename_spec.rb +0 -200
  135. data/spec/unit/package_builder_spec.rb +0 -593
  136. data/spec/unit/release_builder_spec.rb +0 -120
  137. data/spec/unit/release_spec.rb +0 -173
  138. data/spec/unit/release_tarball_spec.rb +0 -29
  139. data/spec/unit/runner_spec.rb +0 -7
  140. data/spec/unit/ssh_spec.rb +0 -84
  141. data/spec/unit/stemcell_spec.rb +0 -17
  142. data/spec/unit/task_tracker_spec.rb +0 -131
  143. data/spec/unit/version_calc_spec.rb +0 -27
  144. data/spec/unit/versions_index_spec.rb +0 -144
@@ -1,28 +0,0 @@
1
- ---
2
- networks:
3
-
4
- - name: default
5
- subnets:
6
- - reserved:
7
- - 172.31.116.2 - 172.31.116.9
8
- - 172.31.119.245 - 172.31.119.254
9
- static:
10
- - 172.31.116.10 - 172.31.116.140
11
- range: 172.31.116.0/22
12
- # Should only be .1
13
- gateway: 172.31.116.55
14
- dns:
15
- - 172.30.22.153
16
- - 172.30.22.154
17
- cloud_properties:
18
- name: VLAN2116
19
- - name: lb
20
- subnets:
21
- - static:
22
- - 172.28.3.145-172.28.3.146
23
- range: 172.28.3.144/28
24
- dns:
25
- - 172.30.22.153
26
- - 172.30.22.154
27
- cloud_properties:
28
- name: VLAN3057
@@ -1,63 +0,0 @@
1
- ---
2
- name: ben-cloud
3
- director_uuid: a8f335a4-30f0-4a92-ab88-5c3feb55577a
4
-
5
- networks:
6
-
7
- - name: default
8
- subnets:
9
- - reserved:
10
- - 172.31.4.2 - 172.31.4.9
11
- - 172.31.7.245 - 172.31.7.254
12
- static:
13
- - 172.31.4.10 - 172.31.4.140
14
- range: 172.31.4.0/22
15
- gateway: 172.31.4.1
16
- dns:
17
- - 172.30.22.153
18
- - 172.30.22.154
19
- cloud_properties:
20
- name: VLAN2004
21
- - name: lb
22
- subnets:
23
- - static:
24
- - 172.28.6.241 - 172.28.6.242
25
- range: 172.28.6.240/28
26
- dns:
27
- - 172.30.22.153
28
- - 172.30.22.154
29
- cloud_properties:
30
- name: VLAN3121
31
-
32
- jobs:
33
-
34
- - name: debian_nfs_server
35
- template: debian_nfs_server
36
- instances: 1
37
- resource_pool: infrastructure
38
- persistent_disk: 8192
39
- networks:
40
- - name: default
41
- static_ips:
42
- - 172.31.4.10
43
-
44
- - name: syslog_aggregator
45
- template: syslog_aggregator
46
- instances: 1
47
- resource_pool: infrastructure
48
- persistent_disk: 600
49
- networks:
50
- - name: default
51
- static_ips:
52
- - 172.31.4.13
53
-
54
- properties:
55
- domain: appcloud23.dev.mozycloud.com
56
-
57
- nfs_server:
58
- address: 172.31.4.10
59
- network: 172.31.4.0/22
60
-
61
- syslog_aggregator:
62
- address: 172.31.4.13
63
- port: 54321
@@ -1,63 +0,0 @@
1
- ---
2
- name: ben-cloud
3
- director_uuid: a8f335a4-30f0-4a92-ab88-5c3feb55577a
4
-
5
- networks:
6
-
7
- - name: default
8
- subnets:
9
- - reserved:
10
- - 172.31.4.2 - 172.31.4.9
11
- - 172.31.7.245 - 172.31.7.254
12
- static:
13
- - 172.31.4.10 - 172.31.4.140
14
- range: 172.31.4.0/22
15
- gateway: 172.31.4.1
16
- dns:
17
- - 172.30.22.153
18
- - 172.30.22.154
19
- cloud_properties:
20
- name: VLAN2004
21
- - name: lb
22
- subnets:
23
- - static:
24
- - 172.28.6.241 - 172.28.6.242
25
- range: 172.28.6.240/28
26
- dns:
27
- - 172.30.22.153
28
- - 172.30.22.154
29
- cloud_properties:
30
- name: VLAN3121
31
-
32
- jobs:
33
-
34
- - name: debian_nfs_server
35
- template: debian_nfs_server
36
- instances: 1
37
- resource_pool: infrastructure
38
- persistent_disk: 8192
39
- networks:
40
- - name: default
41
- static_ips:
42
- - 172.31.4.10
43
-
44
- - name: syslog_aggregator
45
- template: syslog_aggregator
46
- instances: 1
47
- resource_pool: infrastructure
48
- persistent_disk: 600
49
- networks:
50
- - name: default
51
- static_ips:
52
- - 172.31.4.13
53
-
54
- properties:
55
- domain: appcloud23.dev.mozycloud.com
56
-
57
- nfs_server:
58
- address: 172.31.4.10
59
- network: 172.31.4.0/22
60
-
61
- syslog_aggregator:
62
- address: 172.31.4.13
63
- port: 54321
@@ -1,69 +0,0 @@
1
- ---
2
- name: <%= find("name") %>
3
- director_uuid: <%= find("director_uuid")%>
4
-
5
- networks:
6
-
7
- - name: default
8
- subnets:
9
- <%- for @subnet in find("networks.default.subnets") -%>
10
- - reserved:
11
- - <%= ip_range(2..9, "default") %>
12
- - <%= ip_range(-11..-2, "default") %>
13
- static:
14
- - <%= ip_range(10..140, "default") %>
15
- range: <%= find_in("range", @subnet) %>
16
- gateway: <%= find_in("gateway", @subnet) %>
17
- dns:
18
- <%- for @dns in find_in("dns", @subnet) -%>
19
- - <%= @dns %>
20
- <%- end -%>
21
- cloud_properties:
22
- name: <%= find_in("cloud_properties.name", @subnet) %>
23
- <%- end -%>
24
- - name: lb
25
- subnets:
26
- <%- for @subnet in find("networks.lb.subnets") -%>
27
- - static:
28
- - <%= ip_range(1..2, "lb") %>
29
- range: <%= find_in("range", @subnet) %>
30
- dns:
31
- <%- for @dns in find_in("dns", @subnet) -%>
32
- - <%= @dns %>
33
- <%- end -%>
34
- cloud_properties:
35
- name: <%= find_in("cloud_properties.name", @subnet) %>
36
- <%- end -%>
37
-
38
- jobs:
39
-
40
- - name: debian_nfs_server
41
- template: debian_nfs_server
42
- instances: 1
43
- resource_pool: infrastructure
44
- persistent_disk: 8192
45
- networks:
46
- - name: default
47
- static_ips:
48
- - <%= ip(10, "default") %>
49
-
50
- - name: syslog_aggregator
51
- template: syslog_aggregator
52
- instances: 1
53
- resource_pool: infrastructure
54
- persistent_disk: 600
55
- networks:
56
- - name: default
57
- static_ips:
58
- - <%= ip(13, "default") %>
59
-
60
- properties:
61
- domain: <%= find("properties.domain") %>
62
-
63
- nfs_server:
64
- address: <%= ip(10, "default") %>
65
- network: <%= get_network_and_mask("default") %>
66
-
67
- syslog_aggregator:
68
- address: <%= ip(13, "default") %>
69
- port: 54321
@@ -1,63 +0,0 @@
1
- ---
2
- name: ben-cloud
3
- director_uuid: a8f335a4-30f0-4a92-ab88-5c3feb55577a
4
-
5
- networks:
6
-
7
- - name: default
8
- subnets:
9
- - reserved:
10
- - 172.31.4.2 - 172.31.4.9
11
- - 172.31.7.245 - 172.31.7.254
12
- static:
13
- - 172.31.4.10 - 172.31.4.11
14
- range: 172.31.4.0/32
15
- gateway: 172.31.4.1
16
- dns:
17
- - 172.30.22.153
18
- - 172.30.22.154
19
- cloud_properties:
20
- name: VLAN2004
21
- - name: lb
22
- subnets:
23
- - static:
24
- - 172.28.6.241 - 172.28.6.242
25
- range: 172.28.6.240/28
26
- dns:
27
- - 172.30.22.153
28
- - 172.30.22.154
29
- cloud_properties:
30
- name: VLAN3121
31
-
32
- jobs:
33
-
34
- - name: debian_nfs_server
35
- template: debian_nfs_server
36
- instances: 1
37
- resource_pool: infrastructure
38
- persistent_disk: 8192
39
- networks:
40
- - name: default
41
- static_ips:
42
- - 172.31.4.10
43
-
44
- - name: syslog_aggregator
45
- template: syslog_aggregator
46
- instances: 1
47
- resource_pool: infrastructure
48
- persistent_disk: 600
49
- networks:
50
- - name: default
51
- static_ips:
52
- - 172.31.4.13
53
-
54
- properties:
55
- domain: appcloud23.dev.mozycloud.com
56
-
57
- nfs_server:
58
- address: 172.31.4.10
59
- network: 172.31.4.0/22
60
-
61
- syslog_aggregator:
62
- address: 172.31.4.13
63
- port: 54321
@@ -1,40 +0,0 @@
1
- ---
2
- networks:
3
-
4
- - name: default
5
- subnets:
6
- - reserved:
7
- - 172.31.116.2 - 172.31.116.9
8
- - 172.31.119.245 - 172.31.119.254
9
- static:
10
- - 172.31.116.10 - 172.31.116.140
11
- range: 172.31.116.0/22
12
- gateway: 172.31.116.1
13
- dns:
14
- - 172.30.22.153
15
- - 172.30.22.154
16
- cloud_properties:
17
- name: VLAN2116
18
- # This extra subnet doesn't work in Biff.
19
- - reserved:
20
- - 172.31.116.2 - 172.31.116.9
21
- - 172.31.119.245 - 172.31.119.254
22
- static:
23
- - 172.31.116.10 - 172.31.116.140
24
- range: 172.31.116.0/22
25
- gateway: 172.31.116.1
26
- dns:
27
- - 172.30.22.153
28
- - 172.30.22.154
29
- cloud_properties:
30
- name: VLAN2116
31
- - name: lb
32
- subnets:
33
- - static:
34
- - 172.28.3.145-172.28.3.146
35
- range: 172.28.3.144/28
36
- dns:
37
- - 172.30.22.153
38
- - 172.30.22.154
39
- cloud_properties:
40
- name: VLAN3057
@@ -1,34 +0,0 @@
1
- ---
2
-
3
- networks:
4
-
5
- - name: default
6
- subnets:
7
- <%- for @subnet in find("networks.default.subnets") -%>
8
- - reserved:
9
- - <%= ip_range(2..9, "default") %>
10
- - <%= ip_range(-11..-2, "default") %>
11
- static:
12
- - <%= ip_range(10..140, "default") %>
13
- range: <%= find_in("range", @subnet) %>
14
- gateway: <%= find_in("gateway", @subnet) %>
15
- dns:
16
- <%- for @dns in find_in("dns", @subnet) -%>
17
- - <%= @dns %>
18
- <%- end -%>
19
- cloud_properties:
20
- name: <%= find_in("cloud_properties.name", @subnet) %>
21
- <%- end -%>
22
- - name: lb
23
- subnets:
24
- <%- for @subnet in find("networks.lb.subnets") -%>
25
- - static:
26
- - <%= ip_range(1..2, "lb") %>
27
- range: <%= find_in("range", @subnet) %>
28
- dns:
29
- <%- for @dns in find_in("dns", @subnet) -%>
30
- - <%= @dns %>
31
- <%- end -%>
32
- cloud_properties:
33
- name: <%= find_in("cloud_properties.name", @subnet) %>
34
- <%- end -%>
@@ -1,27 +0,0 @@
1
- ---
2
- networks:
3
-
4
- - name: default
5
- subnets:
6
- - reserved:
7
- - 172.31.116.2 - 172.31.116.9
8
- - 172.31.119.245 - 172.31.119.254
9
- static:
10
- - 172.31.116.10 - 172.31.116.140
11
- range: 172.31.116.0/22
12
- gateway: 172.31.116.1
13
- dns:
14
- - 172.30.22.153
15
- - 172.30.22.154
16
- cloud_properties:
17
- name: VLAN2116
18
- - name: lb
19
- subnets:
20
- - static:
21
- - 172.28.3.145-172.28.3.146
22
- range: 172.28.3.144/28
23
- dns:
24
- - 172.30.22.153
25
- - 172.30.22.154
26
- cloud_properties:
27
- name: VLAN3057
@@ -1,27 +0,0 @@
1
- ---
2
- networks:
3
-
4
- - name: default
5
- subnets:
6
- - reserved:
7
- - 172.31.116.2 - 172.31.116.9
8
- - 172.31.119.245 - 172.31.119.254
9
- static:
10
- - 172.31.116.10 - 172.31.116.140
11
- # Range should exist here.
12
- gateway: 172.31.116.1
13
- dns:
14
- - 172.30.22.153
15
- - 172.30.22.154
16
- cloud_properties:
17
- name: VLAN2116
18
- - name: lb
19
- subnets:
20
- - static:
21
- - 172.28.3.145-172.28.3.146
22
- range: 172.28.3.144/28
23
- dns:
24
- - 172.30.22.153
25
- - 172.30.22.154
26
- cloud_properties:
27
- name: VLAN3057
@@ -1,16 +0,0 @@
1
- ---
2
- networks:
3
-
4
- - name: default
5
- subnets:
6
- - name: lb
7
- subnets:
8
- - static:
9
- - 172.28.3.145-172.28.3.146
10
- range: 172.28.3.144/28
11
- gateway: 172.31.116.1
12
- dns:
13
- - 172.30.22.153
14
- - 172.30.22.154
15
- cloud_properties:
16
- name: VLAN3057
@@ -1,30 +0,0 @@
1
- ---
2
-
3
- networks:
4
-
5
- - name: default
6
- subnets:
7
- - reserved:
8
- - 172.31.116.2 - 172.31.116.9
9
- - 172.31.119.245 - 172.31.119.254
10
- range: 172.31.116.0/22
11
- # Static is out of order so that there is a diff between this and the
12
- # template.
13
- static:
14
- - 172.31.116.10 - 172.31.116.140
15
- gateway: 172.31.116.1
16
- dns:
17
- - 172.30.22.153
18
- - 172.30.22.154
19
- cloud_properties:
20
- name: VLAN2116
21
- - name: lb
22
- subnets:
23
- - static:
24
- - 172.28.3.145 - 172.28.3.146
25
- range: 172.28.3.144/28
26
- dns:
27
- - 172.30.22.153
28
- - 172.30.22.154
29
- cloud_properties:
30
- name: VLAN3057