gogetit 0.13.5 → 0.13.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/gogetit/config.rb +8 -3
- data/lib/gogetit/util.rb +3 -2
- data/lib/gogetit/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: ca17da35db4cf1dec8bf258b186421ee69273308
|
4
|
+
data.tar.gz: bde780f333638b089791e844dfda9dab8ea68005
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6794bd865ab0b8e3b38670a6732f43033ebc0a45fcdfff1e1b13b05023f3297285086190580be8fda17edb7061941510380bf62d798aba3f998ed7887df672ce
|
7
|
+
data.tar.gz: dcee1f42a11ad6d8267f357217819d5e1176742bee2224f666fb2c6b9de454c219f30018a36726e5b13424e33b34e6008e1cb5450b1ff4b8e45a4f111e5e8b2a
|
data/lib/gogetit/config.rb
CHANGED
@@ -66,12 +66,12 @@ module Gogetit
|
|
66
66
|
config.merge!(Hashie.symbolize_keys YAML.load_file(conf_file))
|
67
67
|
|
68
68
|
# to check if lxd is well deployed and configured.
|
69
|
-
if Dir.exist?("
|
69
|
+
if Dir.exist?("#{ENV["HOME"]}/.config/lxc")
|
70
70
|
|
71
|
-
if Dir.exist?("
|
71
|
+
if Dir.exist?("#{ENV["HOME"]}/.config/lxc/servercerts")
|
72
72
|
|
73
73
|
certificates = (
|
74
|
-
Dir.entries("
|
74
|
+
Dir.entries("#{ENV["HOME"]}/.config/lxc/servercerts") - ['.', '..']
|
75
75
|
)
|
76
76
|
|
77
77
|
if not certificates.empty?
|
@@ -94,6 +94,11 @@ module Gogetit
|
|
94
94
|
end
|
95
95
|
|
96
96
|
else
|
97
|
+
puts "You might need to run following command to accept the certificate"
|
98
|
+
config[:lxd][:nodes].each do |node|
|
99
|
+
puts "lxc remote add --accept-certificate #{node[:name]}"\
|
100
|
+
" #{node[:url]}"
|
101
|
+
end
|
97
102
|
abort('Please check if LXD is installed properly.')
|
98
103
|
end
|
99
104
|
|
data/lib/gogetit/util.rb
CHANGED
@@ -14,11 +14,12 @@ module Gogetit
|
|
14
14
|
end
|
15
15
|
|
16
16
|
def get_provider_of(name, providers)
|
17
|
+
logger.info("Calling <#{__method__.to_s}> #{name}")
|
17
18
|
if providers[:lxd].container_exists?(name)
|
18
|
-
logger.info("
|
19
|
+
logger.info("It is a LXD container.")
|
19
20
|
return 'lxd'
|
20
21
|
elsif providers[:libvirt].domain_exists?(name)
|
21
|
-
logger.info("
|
22
|
+
logger.info("It is a KVM domain.")
|
22
23
|
return 'libvirt'
|
23
24
|
else
|
24
25
|
puts "#{name} is not found"
|
data/lib/gogetit/version.rb
CHANGED