dev-lxc 2.2.0 → 2.2.1
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/dev-lxc/cli.rb +2 -1
- data/lib/dev-lxc/cluster.rb +8 -2
- data/lib/dev-lxc/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e58108e0d97dc0aa6ce9c46beb31240ec9f30d5c
|
4
|
+
data.tar.gz: 699291d15a022d54b90cbc31069ac15099555cad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a7e24b0f8733f118903ff96d8885b5c1bb29432d3fa0bb3c94676c475db4047023ecd60ad41da77e688f7c923bb52e5d5c35d7987b3e0b8f537e8318f3ce8e30
|
7
|
+
data.tar.gz: c3758b895fc91a3b764e845dd41ddadb5b95669de2b68cfad93f78180c0918c3169cf009a35941242aba148a414ad513ed7bd160bbcce4e9b0bc9a4c653b9352
|
data/CHANGELOG.md
CHANGED
data/lib/dev-lxc/cli.rb
CHANGED
@@ -24,8 +24,9 @@ module DevLXC::CLI
|
|
24
24
|
|
25
25
|
desc "show-config", "Show calculated configuration"
|
26
26
|
option :config, :desc => "Specify a cluster's YAML config file. `./dev-lxc.yml` will be used by default"
|
27
|
+
option :include_products, :type => :boolean, :desc => "Calculate required products"
|
27
28
|
def show_config
|
28
|
-
get_cluster(options[:config]).show_config
|
29
|
+
get_cluster(options[:config]).show_config(options[:include_products])
|
29
30
|
end
|
30
31
|
|
31
32
|
desc "create-base-container [BASE_CONTAINER_NAME]", "Create a base container"
|
data/lib/dev-lxc/cluster.rb
CHANGED
@@ -237,8 +237,9 @@ module DevLXC
|
|
237
237
|
end
|
238
238
|
end
|
239
239
|
|
240
|
-
def show_config
|
240
|
+
def show_config(include_products=false)
|
241
241
|
require 'pp'
|
242
|
+
calculate_required_products(get_sorted_servers, true) if include_products
|
242
243
|
puts "Cluster config:"
|
243
244
|
pp @config
|
244
245
|
puts
|
@@ -484,7 +485,7 @@ module DevLXC
|
|
484
485
|
artifact.url
|
485
486
|
end
|
486
487
|
|
487
|
-
def
|
488
|
+
def calculate_required_products(servers, force=false)
|
488
489
|
all_required_products = Hash.new
|
489
490
|
servers.each do |server|
|
490
491
|
products = @server_configs[server.name][:products]
|
@@ -506,6 +507,11 @@ module DevLXC
|
|
506
507
|
end
|
507
508
|
end
|
508
509
|
end
|
510
|
+
all_required_products
|
511
|
+
end
|
512
|
+
|
513
|
+
def prep_product_cache(servers, force=false)
|
514
|
+
all_required_products = calculate_required_products(servers, force)
|
509
515
|
all_required_products.each do |package_source, product_name|
|
510
516
|
if package_source.start_with?('http')
|
511
517
|
product_cache_path = "/var/dev-lxc/cache/chef-products/#{product_name}/#{File.basename(package_source)}"
|
data/lib/dev-lxc/version.rb
CHANGED