vagrant-junos_cli 1.0.1 → 1.1.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: d7290a4051b7190108477a6cc4c9ac17579bfccb
4
- data.tar.gz: 4f65b37b7f98530114626587b485b5f0a2b65ad3
2
+ SHA256:
3
+ metadata.gz: aca9764e93360463155bba981befd2b2c18198230a91966e8ae42126703e4dff
4
+ data.tar.gz: c955429abb917749bdf870bad3d2cdcab1a694b4da63c61289310746c7d0ccca
5
5
  SHA512:
6
- metadata.gz: b7faa8159b988739028958475901d3211bcf44bf0c1bc9ffccc047ded4497de83a86849da6df86283021d1b765fb54ff1cf47f2b2085e3f27e344b491084e1b5
7
- data.tar.gz: 436510b8b418e016238fbeedf7fc76a67438cb3fcf91b5e4f556da6cf7d998e090ed2816b0c79e7a7b0efeae5bfde36865b7a3e44087239df07505e7d6aef450
6
+ metadata.gz: 3008aa7da9fccac6f3f83f98b0720309e698288b24d9dcece1261beb0905a6ca77f115a5f95f3222e0f8c4638a3da44070543b75ec87b6a5cff516916b0563fe
7
+ data.tar.gz: a68b44d83b667168a0cae7d50a9c0d88d3c75aa416eec8a032d2b2ba2d682e4bd95f8c9480b40f71f38af079e888422651071cec5ced2ddc508c49936a61769e
data/.gitignore CHANGED
@@ -1,7 +1,8 @@
1
- /Gemfile.lock
1
+ *.swp
2
2
  /.bundle/
3
3
  /.vagrant/
4
4
  /.yardoc
5
+ /Gemfile.lock
5
6
  /_yardoc/
6
7
  /coverage/
7
8
  /doc/
data/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.1.0
4
+
5
+ - Add `skip_cleanup` option
6
+ - Add `skip_prepare` option
7
+
8
+ ## 1.0.2
9
+
10
+ - Update vulnerable Rake dependency
11
+ - Pin Vagrant version (Ruby <2.4)
12
+
3
13
  ## 1.0.1
4
14
 
5
15
  - Usage of quotes in the provisioning script has been fixed
data/Gemfile CHANGED
@@ -1,7 +1,9 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  group :development do
4
- gem 'vagrant', git: 'https://github.com/mitchellh/vagrant.git'
4
+ gem 'vagrant', git: 'https://github.com/mitchellh/vagrant.git', ref: 'v2.2.4'
5
+ gem 'rake', '~> 13.0'
6
+ gem 'pry', '~> 0.13'
5
7
  end
6
8
 
7
9
  group :plugins do
data/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ The MIT License
2
+
3
+ Original work Copyright (c) 2010-2018 Mitchell Hashimoto
4
+ Modified work Copyright 2018 Mate Farkas
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be included in
14
+ all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22
+ THE SOFTWARE.
data/README.md CHANGED
@@ -60,6 +60,10 @@ Run `vagrant up` and the new box is getting created with the address configured.
60
60
 
61
61
  ## Configuration
62
62
 
63
- Junos CLI provisioner accepts most parameters available for the [Shell provisioner](https://www.vagrantup.com/docs/provisioning/shell.html).
63
+ Junos CLI provisioner accepts most options available for the [Shell provisioner](https://www.vagrantup.com/docs/provisioning/shell.html).
64
64
  Do not pass `args` or `env`.
65
65
 
66
+ ### Extra options
67
+
68
+ - `skip_cleanup` (boolean) - Do not clean up script uploaded to `upload_path` after execution.
69
+ - `skip_prepare` (boolean) - Do not try to fix `print` and `export` commands in the box. Provisioning output might get omitted.
data/example/Vagrantfile CHANGED
@@ -14,10 +14,8 @@ Vagrant.configure('2') do |config|
14
14
  vqfx.vm.network 'private_network', auto_config: false, nic_type: '82540EM', intnet: 'reserved-bridge'
15
15
 
16
16
  # (em3 em4)
17
- (1..2).each do |_seg_id|
18
- vqfx.vm.network 'private_network', auto_config: false, nic_type: '82540EM', intnet: 'segment'
19
- end
17
+ 2.times { vqfx.vm.network 'private_network', auto_config: false, nic_type: '82540EM', intnet: 'segment' }
20
18
 
21
- config.vm.provision 'junos_cli', path: 'provision.cmd'
19
+ config.vm.provision 'junos_cli', path: 'provision.cmd', skip_prepare: false
22
20
  end
23
21
  end
@@ -4,6 +4,8 @@ require File.expand_path('../config.rb', VagrantPlugins::Shell::Plugin.provision
4
4
  module Vagrant
5
5
  module JunosCli
6
6
  class Config < VagrantPlugins::Shell::Config
7
+ attr_accessor :skip_cleanup
8
+ attr_accessor :skip_prepare
7
9
  end
8
10
  end
9
11
  end
@@ -53,7 +53,12 @@ fi'"
53
53
 
54
54
  clean_up = "/bin/rm #{config.upload_path}"
55
55
 
56
- [prepare, cli_oneliner, clean_up].each do |command|
56
+ stages = []
57
+ stages << prepare unless config.skip_prepare
58
+ stages << cli_oneliner
59
+ stages << clean_up unless config.skip_cleanup
60
+
61
+ stages.each do |command|
57
62
  comm.execute(
58
63
  command,
59
64
  sudo: false,
@@ -1,5 +1,5 @@
1
1
  module Vagrant
2
2
  module JunosCli
3
- VERSION = '1.0.1'.freeze
3
+ VERSION = '1.1.0'.freeze
4
4
  end
5
5
  end
@@ -17,5 +17,5 @@ Gem::Specification.new do |spec|
17
17
  spec.require_paths = ['lib']
18
18
 
19
19
  spec.add_development_dependency 'bundler', '~> 1.16.a'
20
- spec.add_development_dependency 'rake', '~> 10.0'
20
+ spec.add_development_dependency 'rake', '~> 13.0'
21
21
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-junos_cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mate Farkas
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-03-17 00:00:00.000000000 Z
11
+ date: 2020-04-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '10.0'
33
+ version: '13.0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '10.0'
40
+ version: '13.0'
41
41
  description:
42
42
  email:
43
43
  - mate.farkas@sch.hu
@@ -49,6 +49,7 @@ files:
49
49
  - ".rubocop.yml"
50
50
  - CHANGELOG.md
51
51
  - Gemfile
52
+ - LICENSE
52
53
  - README.md
53
54
  - Rakefile
54
55
  - example/Vagrantfile
@@ -78,7 +79,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
78
79
  version: '0'
79
80
  requirements: []
80
81
  rubyforge_project:
81
- rubygems_version: 2.5.2.1
82
+ rubygems_version: 2.7.8
82
83
  signing_key:
83
84
  specification_version: 4
84
85
  summary: Provision Junos OS boxes using CLI commands.