specinfra 2.37.5 → 2.37.6
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 +2 -0
- data/lib/specinfra/command/redhat/base/host.rb +2 -0
- data/lib/specinfra/command/redhat/v7/host.rb +15 -0
- data/lib/specinfra/version.rb +1 -1
- data/spec/command/redhat/package_spec.rb +1 -0
- data/spec/command/redhat7/host_spec.rb +13 -0
- data/spec/command/{redhat → redhat7}/interface_spec.rb +0 -0
- metadata +8 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 36a656182853eec32ae07fd4664afd2c25ed6425
|
4
|
+
data.tar.gz: 4f42b1d1155f8617a6ab60d85ece08ffb3a05d6e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5838d02f668de7a7f1c025b2c77b04be3ae32297348412c6911fbd4439d38e3db815bd6e1c0030df9576894fc50fa02e24dfcd4616779511fcd4da9094fe3c10
|
7
|
+
data.tar.gz: 2f525eaf1bc2c90af280af07ec00fbc233c5466fd4a97e027773814c020889f9f31a3c8b497e748b9db8b1c4fbef1a90d588a06424eb5c322e89cd7619595120
|
data/lib/specinfra/command.rb
CHANGED
@@ -79,6 +79,7 @@ require 'specinfra/command/esxi/base/package'
|
|
79
79
|
require 'specinfra/command/redhat'
|
80
80
|
require 'specinfra/command/redhat/base'
|
81
81
|
require 'specinfra/command/redhat/base/file'
|
82
|
+
require 'specinfra/command/redhat/base/host'
|
82
83
|
require 'specinfra/command/redhat/base/iptables'
|
83
84
|
require 'specinfra/command/redhat/base/package'
|
84
85
|
require 'specinfra/command/redhat/base/service'
|
@@ -90,6 +91,7 @@ require 'specinfra/command/redhat/v5/iptables'
|
|
90
91
|
|
91
92
|
# RedHat V7 (inherit RedHat)
|
92
93
|
require 'specinfra/command/redhat/v7'
|
94
|
+
require 'specinfra/command/redhat/v7/host'
|
93
95
|
require 'specinfra/command/redhat/v7/service'
|
94
96
|
require 'specinfra/command/redhat/v7/port'
|
95
97
|
|
@@ -0,0 +1,15 @@
|
|
1
|
+
class Specinfra::Command::Redhat::V7::Host < Specinfra::Command::Redhat::Base::Host
|
2
|
+
class << self
|
3
|
+
def check_is_reachable(host, port, proto, timeout)
|
4
|
+
if port.nil?
|
5
|
+
"ping -w #{escape(timeout)} -c 2 -n #{escape(host)}"
|
6
|
+
else
|
7
|
+
# RHEL7 comes with ncat which does no longer sport the -z option
|
8
|
+
# hence this kludge
|
9
|
+
"ncat -vvvv#{escape(proto[0].chr)} #{escape(host)} #{escape(port)} " +
|
10
|
+
"-w #{escape(timeout)} -i #{escape(timeout)} 2>&1 | " +
|
11
|
+
"grep -q SUCCESS"
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
data/lib/specinfra/version.rb
CHANGED
@@ -0,0 +1,13 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
property[:os] = nil
|
4
|
+
set :os, :family => 'redhat', :release => '7'
|
5
|
+
|
6
|
+
|
7
|
+
describe get_command(:check_host_is_reachable, 'example.jp', '53', 'udp', 2) do
|
8
|
+
it { should eq "ncat -vvvvu example.jp 53 -w 2 -i 2 2>&1 | grep -q SUCCESS" }
|
9
|
+
end
|
10
|
+
|
11
|
+
describe get_command(:check_host_is_reachable, 'example.jp', '80', 'tcp', 3) do
|
12
|
+
it { should eq "ncat -vvvvt example.jp 80 -w 3 -i 3 2>&1 | grep -q SUCCESS" }
|
13
|
+
end
|
File without changes
|
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.37.
|
4
|
+
version: 2.37.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gosuke Miyashita
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-07-
|
11
|
+
date: 2015-07-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: net-scp
|
@@ -325,6 +325,7 @@ files:
|
|
325
325
|
- lib/specinfra/command/redhat.rb
|
326
326
|
- lib/specinfra/command/redhat/base.rb
|
327
327
|
- lib/specinfra/command/redhat/base/file.rb
|
328
|
+
- lib/specinfra/command/redhat/base/host.rb
|
328
329
|
- lib/specinfra/command/redhat/base/iptables.rb
|
329
330
|
- lib/specinfra/command/redhat/base/package.rb
|
330
331
|
- lib/specinfra/command/redhat/base/port.rb
|
@@ -333,6 +334,7 @@ files:
|
|
333
334
|
- lib/specinfra/command/redhat/v5.rb
|
334
335
|
- lib/specinfra/command/redhat/v5/iptables.rb
|
335
336
|
- lib/specinfra/command/redhat/v7.rb
|
337
|
+
- lib/specinfra/command/redhat/v7/host.rb
|
336
338
|
- lib/specinfra/command/redhat/v7/port.rb
|
337
339
|
- lib/specinfra/command/redhat/v7/service.rb
|
338
340
|
- lib/specinfra/command/smartos.rb
|
@@ -467,9 +469,10 @@ files:
|
|
467
469
|
- spec/command/module/systemd_spec.rb
|
468
470
|
- spec/command/module/zfs_spec.rb
|
469
471
|
- spec/command/openbsd/file_spec.rb
|
470
|
-
- spec/command/redhat/interface_spec.rb
|
471
472
|
- spec/command/redhat/package_spec.rb
|
472
473
|
- spec/command/redhat/service_spec.rb
|
474
|
+
- spec/command/redhat7/host_spec.rb
|
475
|
+
- spec/command/redhat7/interface_spec.rb
|
473
476
|
- spec/command/redhat7/port_spec.rb
|
474
477
|
- spec/command/redhat7/service_spec.rb
|
475
478
|
- spec/command/ubuntu/ppa_spec.rb
|
@@ -552,9 +555,10 @@ test_files:
|
|
552
555
|
- spec/command/module/systemd_spec.rb
|
553
556
|
- spec/command/module/zfs_spec.rb
|
554
557
|
- spec/command/openbsd/file_spec.rb
|
555
|
-
- spec/command/redhat/interface_spec.rb
|
556
558
|
- spec/command/redhat/package_spec.rb
|
557
559
|
- spec/command/redhat/service_spec.rb
|
560
|
+
- spec/command/redhat7/host_spec.rb
|
561
|
+
- spec/command/redhat7/interface_spec.rb
|
558
562
|
- spec/command/redhat7/port_spec.rb
|
559
563
|
- spec/command/redhat7/service_spec.rb
|
560
564
|
- spec/command/ubuntu/ppa_spec.rb
|