train 0.20.1 → 0.21.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 04b361d035e2f468512b7a2daf50ee16be2b69e7
4
- data.tar.gz: 53d547202564642c4adbfa6bd4995c1ada9831e8
3
+ metadata.gz: 1edcda93b18d806fd86e094f251628c130d29edb
4
+ data.tar.gz: add339df25ea70aa5d4be363a6ba023f9864f4aa
5
5
  SHA512:
6
- metadata.gz: 12d486c2d8cb2d7e7b80d2220dd9f53f92571e7a5c97333b80670aa8e4e920c5e01b6531416fdecfd62d972ff2a6534eb5a1bca0eae2df6cb2732d7cc919b66d
7
- data.tar.gz: f45f67cbe240440d9fb832f23dc626154a839a9949de25aeba19f7a70dbd7a2d178f13ea7fe1ebe209ca67ada5021b5732b6b04786f0783136bf5f5389445c7f
6
+ metadata.gz: eb525d6d418efc91d7868ba40c3faeb50e8bb5b600264f914c1c29d76ac2224e2fcf9658d2b3cd5d60e860a2f75af855bb79db4399e65f7d9f17915f7a5d7652
7
+ data.tar.gz: 8c0d703a2fe472cc8523503219a49276d4fb63e1258b5ddc070f51efc119776b35713adfef96f54568f8c8e6121cbe7a1afb0fbc4f07609e0ae47dd0261300e5
data/CHANGELOG.md CHANGED
@@ -1,7 +1,18 @@
1
1
  # Change Log
2
2
 
3
- ## [0.20.1](https://github.com/chef/train/tree/0.20.1) (2016-10-15)
4
- [Full Changelog](https://github.com/chef/train/compare/v0.20.0...0.20.1)
3
+ ## [0.21.0](https://github.com/chef/train/tree/0.21.0) (2016-11-04)
4
+ [Full Changelog](https://github.com/chef/train/compare/v0.20.1...0.21.0)
5
+
6
+ **Implemented enhancements:**
7
+
8
+ - Train doesn't create a login shell [\#148](https://github.com/chef/train/issues/148)
9
+
10
+ **Merged pull requests:**
11
+
12
+ - Add detection for Arista EOS [\#158](https://github.com/chef/train/pull/158) ([jerearista](https://github.com/jerearista))
13
+
14
+ ## [v0.20.1](https://github.com/chef/train/tree/v0.20.1) (2016-10-15)
15
+ [Full Changelog](https://github.com/chef/train/compare/v0.20.0...v0.20.1)
5
16
 
6
17
  **Fixed bugs:**
7
18
 
@@ -13,6 +13,7 @@ require 'train/extras/os_detect_linux'
13
13
  require 'train/extras/os_detect_unix'
14
14
  require 'train/extras/os_detect_windows'
15
15
  require 'train/extras/os_detect_esx'
16
+ require 'train/extras/os_detect_arista_eos'
16
17
 
17
18
  module Train::Extras
18
19
  class OSCommon
@@ -21,6 +22,7 @@ module Train::Extras
21
22
  include Train::Extras::DetectUnix
22
23
  include Train::Extras::DetectWindows
23
24
  include Train::Extras::DetectEsx
25
+ include Train::Extras::DetectAristaEos
24
26
 
25
27
  attr_accessor :backend
26
28
  def initialize(backend, platform = nil)
@@ -122,6 +124,7 @@ module Train::Extras
122
124
  # unix based systems combine the above
123
125
  return true if pf == 'unix' and detect_darwin
124
126
  return true if pf == 'unix' and detect_esx
127
+ return true if pf == 'unix' and detect_arista_eos
125
128
  return true if pf == 'unix' and detect_via_uname
126
129
 
127
130
  # if we arrive here, we most likey have a regular linux
@@ -0,0 +1,30 @@
1
+ # encoding: utf-8
2
+ # author: Jere Julian
3
+ #
4
+ # Arista EOS has 2 modes. Most compliance tests will use the network CLI
5
+ # but when working with vagrant, its common to encounter the raw bash shell.
6
+ require 'json'
7
+
8
+ module Train::Extras
9
+ module DetectAristaEos
10
+ def detect_arista_eos
11
+ if unix_file?('/usr/bin/FastCli')
12
+ output = @backend.run_command('FastCli -p 15 -c "show version | json"').stdout
13
+ @platform[:name] = 'arista_eos_bash'
14
+ family = 'fedora'
15
+ else
16
+ output = @backend.run_command('show version | json').stdout
17
+ end
18
+
19
+ unless output.empty?
20
+ eos_ver = JSON.parse(output)
21
+ @platform[:name] = @platform[:name] || 'arista_eos'
22
+ family ||= 'arista_eos'
23
+ @platform[:family] = family
24
+ @platform[:release] = eos_ver['version']
25
+ @platform[:arch] = eos_ver['architecture']
26
+ true
27
+ end
28
+ end
29
+ end
30
+ end
data/lib/train/version.rb CHANGED
@@ -3,5 +3,5 @@
3
3
  # Author:: Dominik Richter (<dominik.richter@gmail.com>)
4
4
 
5
5
  module Train
6
- VERSION = '0.20.1'.freeze
6
+ VERSION = '0.21.0'.freeze
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: train
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.20.1
4
+ version: 0.21.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dominik Richter
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-10-15 00:00:00.000000000 Z
11
+ date: 2016-11-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json
@@ -158,6 +158,7 @@ files:
158
158
  - lib/train/extras/file_windows.rb
159
159
  - lib/train/extras/linux_lsb.rb
160
160
  - lib/train/extras/os_common.rb
161
+ - lib/train/extras/os_detect_arista_eos.rb
161
162
  - lib/train/extras/os_detect_darwin.rb
162
163
  - lib/train/extras/os_detect_esx.rb
163
164
  - lib/train/extras/os_detect_linux.rb
@@ -195,13 +196,11 @@ files:
195
196
  - test/integration/sudo/passwd.rb
196
197
  - test/integration/sudo/reqtty.rb
197
198
  - test/integration/sudo/run_as.rb
198
- - test/integration/test-one.yaml
199
199
  - test/integration/test-travis-centos.yml
200
200
  - test/integration/test-travis-debian.yml
201
201
  - test/integration/test-travis-fedora.yml
202
202
  - test/integration/test-travis-oel.yml
203
203
  - test/integration/test-travis-ubuntu.yml
204
- - test/integration/test-two.yaml
205
204
  - test/integration/test_local.rb
206
205
  - test/integration/test_ssh.rb
207
206
  - test/integration/tests/path_block_device_test.rb
@@ -253,7 +252,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
253
252
  version: '0'
254
253
  requirements: []
255
254
  rubyforge_project:
256
- rubygems_version: 2.5.1
255
+ rubygems_version: 2.4.6
257
256
  signing_key:
258
257
  specification_version: 4
259
258
  summary: Transport interface to talk to different backends.
@@ -274,13 +273,11 @@ test_files:
274
273
  - test/integration/sudo/passwd.rb
275
274
  - test/integration/sudo/reqtty.rb
276
275
  - test/integration/sudo/run_as.rb
277
- - test/integration/test-one.yaml
278
276
  - test/integration/test-travis-centos.yml
279
277
  - test/integration/test-travis-debian.yml
280
278
  - test/integration/test-travis-fedora.yml
281
279
  - test/integration/test-travis-oel.yml
282
280
  - test/integration/test-travis-ubuntu.yml
283
- - test/integration/test-two.yaml
284
281
  - test/integration/test_local.rb
285
282
  - test/integration/test_ssh.rb
286
283
  - test/integration/tests/path_block_device_test.rb
@@ -1,4 +0,0 @@
1
- images:
2
- - alpine:edge
3
- provision:
4
- - script: bootstrap.sh
@@ -1,4 +0,0 @@
1
- images:
2
- - ubuntu:16.04
3
- provision:
4
- - script: bootstrap.sh