specinfra 2.0.0.beta45 → 2.0.0.beta46
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/lib/specinfra/command.rb +1 -0
- data/lib/specinfra/command/base/localhost.rb +7 -0
- data/lib/specinfra/command/linux/base/interface.rb +11 -0
- data/lib/specinfra/version.rb +1 -1
- data/spec/command/base/localhost_spec.rb +7 -0
- data/spec/command/linux/interface_spec.rb +7 -0
- metadata +7 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6ef443698205c62b7286f11f976c9e5fc2095ade
|
4
|
+
data.tar.gz: b9aededa5d8a142d8934a83de794580ccc6f77c6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c70f63fb853464ff83b7773449a76decaa009cad8ccb454f46b57948f5f57c46a203dba841211b715d22b32572148f8e4acc3717915273fe125968cd5012adf0
|
7
|
+
data.tar.gz: 789b9b9a72f2d83eee74476ec9aa6fc1770ada83789a45079d4ae9348f73fe8277b51c85490b1926c9756211a6a412cfa9b2247c0b018fe765184feb96455cbc
|
data/lib/specinfra/command.rb
CHANGED
@@ -18,6 +18,7 @@ require 'specinfra/command/base/iptables'
|
|
18
18
|
require 'specinfra/command/base/ip6tables'
|
19
19
|
require 'specinfra/command/base/kernel_module'
|
20
20
|
require 'specinfra/command/base/lxc_container'
|
21
|
+
require 'specinfra/command/base/localhost'
|
21
22
|
require 'specinfra/command/base/mail_alias'
|
22
23
|
require 'specinfra/command/base/package'
|
23
24
|
require 'specinfra/command/base/port'
|
@@ -14,6 +14,17 @@ class Specinfra::Command::Linux::Base::Interface < Specinfra::Command::Base::Int
|
|
14
14
|
ip_address.gsub!(".", "\\.")
|
15
15
|
"ip addr show #{interface} | grep 'inet #{ip_address}'"
|
16
16
|
end
|
17
|
+
|
18
|
+
def check_has_ipv6_address(interface, ip_address)
|
19
|
+
ip_address = ip_address.dup
|
20
|
+
if ip_address =~ /\/\d+$/
|
21
|
+
ip_address << " "
|
22
|
+
else
|
23
|
+
ip_address << "/"
|
24
|
+
end
|
25
|
+
ip_address.downcase!
|
26
|
+
"ip addr show #{interface} | grep 'inet6 #{ip_address}'"
|
27
|
+
end
|
17
28
|
end
|
18
29
|
end
|
19
30
|
|
data/lib/specinfra/version.rb
CHANGED
@@ -0,0 +1,7 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
set :os, :family => 'linux'
|
4
|
+
|
5
|
+
describe get_command(:check_interface_has_ipv6_address, 'eth0', '2001:0db8:bd05:01d2:288a:1fc0:0001:10ee') do
|
6
|
+
it { should eq "ip addr show eth0 | grep 'inet6 2001:0db8:bd05:01d2:288a:1fc0:0001:10ee/'" }
|
7
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: specinfra
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.0.
|
4
|
+
version: 2.0.0.beta46
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gosuke Miyashita
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-09-
|
11
|
+
date: 2014-09-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: net-ssh
|
@@ -160,6 +160,7 @@ files:
|
|
160
160
|
- lib/specinfra/command/base/ipnat.rb
|
161
161
|
- lib/specinfra/command/base/iptables.rb
|
162
162
|
- lib/specinfra/command/base/kernel_module.rb
|
163
|
+
- lib/specinfra/command/base/localhost.rb
|
163
164
|
- lib/specinfra/command/base/lxc_container.rb
|
164
165
|
- lib/specinfra/command/base/mail_alias.rb
|
165
166
|
- lib/specinfra/command/base/package.rb
|
@@ -326,9 +327,11 @@ files:
|
|
326
327
|
- spec/backend/exec/env_spec.rb
|
327
328
|
- spec/backend/ssh/build_command_spec.rb
|
328
329
|
- spec/command/base/file_spec.rb
|
330
|
+
- spec/command/base/localhost_spec.rb
|
329
331
|
- spec/command/base/user_spec.rb
|
330
332
|
- spec/command/debian/service_spec.rb
|
331
333
|
- spec/command/factory_spec.rb
|
334
|
+
- spec/command/linux/interface_spec.rb
|
332
335
|
- spec/command/linux/ip6tables_spec.rb
|
333
336
|
- spec/command/module/systemd_spec.rb
|
334
337
|
- spec/command/redhat/interface_spec.rb
|
@@ -371,9 +374,11 @@ test_files:
|
|
371
374
|
- spec/backend/exec/env_spec.rb
|
372
375
|
- spec/backend/ssh/build_command_spec.rb
|
373
376
|
- spec/command/base/file_spec.rb
|
377
|
+
- spec/command/base/localhost_spec.rb
|
374
378
|
- spec/command/base/user_spec.rb
|
375
379
|
- spec/command/debian/service_spec.rb
|
376
380
|
- spec/command/factory_spec.rb
|
381
|
+
- spec/command/linux/interface_spec.rb
|
377
382
|
- spec/command/linux/ip6tables_spec.rb
|
378
383
|
- spec/command/module/systemd_spec.rb
|
379
384
|
- spec/command/redhat/interface_spec.rb
|