lxc 0.2.1 → 0.2.2
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.
- data/lib/lxc.rb +1 -1
- data/lib/lxc/config.rb +8 -2
- data/lib/lxc/version.rb +1 -1
- metadata +4 -4
data/lib/lxc.rb
CHANGED
@@ -145,7 +145,7 @@ class LXC
|
|
145
145
|
# @param [Array] args Additional command-line arguments.
|
146
146
|
# @return [Array<String>] Output text of the "lxc-checkconfig" command.
|
147
147
|
def checkconfig(*args)
|
148
|
-
self.exec("lxc-checkconfig", *args
|
148
|
+
ZTK::ANSI.uncolor(self.exec("lxc-checkconfig", *args)).split("\n")
|
149
149
|
end
|
150
150
|
|
151
151
|
# Linux container command execution wrapper
|
data/lib/lxc/config.rb
CHANGED
@@ -100,6 +100,8 @@ class LXC
|
|
100
100
|
|
101
101
|
private
|
102
102
|
|
103
|
+
NETWORK_KEY_ORDER = %w(lxc.network.type lxc.network.flags lxc.network.link lxc.network.name lxc.network.hwaddr lxc.network.ipv4 lxc.network.ipv6)
|
104
|
+
|
103
105
|
def build_values(key, value)
|
104
106
|
content = Array.new
|
105
107
|
|
@@ -120,8 +122,12 @@ class LXC
|
|
120
122
|
content << build_values(key, value)
|
121
123
|
end
|
122
124
|
@networks.each do |network|
|
123
|
-
network.
|
124
|
-
|
125
|
+
network_keys = (network.keys - NETWORK_KEY_ORDER)
|
126
|
+
NETWORK_KEY_ORDER.each do |key|
|
127
|
+
network.has_key?(key) and (content << build_values(key, network[key]))
|
128
|
+
end
|
129
|
+
network_keys.each do |key|
|
130
|
+
content << build_values(key, network[key])
|
125
131
|
end
|
126
132
|
end
|
127
133
|
content.join("\n")
|
data/lib/lxc/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lxc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-05-
|
12
|
+
date: 2013-05-10 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: ztk
|
@@ -216,7 +216,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
216
216
|
version: '0'
|
217
217
|
segments:
|
218
218
|
- 0
|
219
|
-
hash:
|
219
|
+
hash: 936865488857019794
|
220
220
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
221
221
|
none: false
|
222
222
|
requirements:
|
@@ -225,7 +225,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
225
225
|
version: '0'
|
226
226
|
segments:
|
227
227
|
- 0
|
228
|
-
hash:
|
228
|
+
hash: 936865488857019794
|
229
229
|
requirements: []
|
230
230
|
rubyforge_project:
|
231
231
|
rubygems_version: 1.8.25
|