vagrant-junos 0.1.1 → 0.2.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
2
  SHA1:
3
- metadata.gz: 3690c9bfb9fea7a58f1e55f8b5deba1bab84abde
4
- data.tar.gz: acbb2731f09c4403bfc20d281c9b9376e57acda7
3
+ metadata.gz: 2e7491b0c4b2992dae7ade5f077601a535d1f6cc
4
+ data.tar.gz: 725e456d10915f66b61e001498f17e2eba9d35c2
5
5
  SHA512:
6
- metadata.gz: 7b19eae76c4d1645d414140142e89a0be0fda06d1989bc39777b8ee5d40574eddf58dd805c7495c3e4ff74197eb1fa03662afc505d4033ed3f2674f7faaa2fda
7
- data.tar.gz: 153c318ab24d73e2096bfdff7cb6c8dd8a22238aed233e082e34cc22cb92be1cf3f18afa67a2f47086d2c202cf8f7d7e65b1295ca3b02dee630780284d0e8d25
6
+ metadata.gz: f90b4f48a7edf6da19389c5597b4dbe9287ff4da25ed4fa45524871630ed52e13ff6d7cae14f909b40388e47f914d25368989fe1b97150076c183f88102b3858
7
+ data.tar.gz: cffa40c55024ccb1caeac2260f4866e2458ca1a3346b5e7e43cbc967edd6b8292581ea17216047c6bedb0568b15666943415945c19cc0a0a9937bd2d5af744b3
data/.gitignore CHANGED
@@ -14,6 +14,7 @@
14
14
  mkmf.log
15
15
  *.gem
16
16
  .swp
17
+ /.vagrant/
17
18
 
18
19
  # stupid Macs
19
20
  .DS_Store
data/.travis.yml CHANGED
@@ -1,9 +1,8 @@
1
1
  language: ruby
2
2
 
3
3
  rvm:
4
- - 1.9.3
5
4
  - 2.0.0
6
- - 2.1.3
5
+ - 2.1.5
7
6
 
8
7
  env:
9
8
  global:
@@ -16,7 +15,8 @@ before_install:
16
15
  - gem uninstall bundler --all --executables
17
16
  - gem install bundler --version '< 1.7.0'
18
17
 
19
- script: bundle exec rake build
18
+ script:
19
+ - bundle exec rake build
20
20
 
21
21
  notifications:
22
22
  email:
data/README.md CHANGED
@@ -13,19 +13,21 @@ This is a [Vagrant](http://www.vagrantup.com) 1.7+ plugin that adds a Junos gues
13
13
  * Detect [vSRX](http://www.juniper.net/us/en/products-services/security/srx-series/vsrx/) guest instances automatically, or via [Vagrantfile](https://docs.vagrantup.com/v2/vagrantfile/machine_settings.html). The default boxes on [Juniper's Atlas site](http://atlas.hashicorp.com/Juniper) have `config.vm.guest` explicitly set to Junos.
14
14
  * Set the hostname via [Vagrantfile](https://docs.vagrantup.com/v2/vagrantfile/machine_settings.html) - `config.vm.hostname`
15
15
  * Support [Vagrantfile SSH settings](https://docs.vagrantup.com/v2/vagrantfile/ssh_settings.html) - `config.ssh.private_key_path`, etc.
16
- * Network configuration of ge-0/0/1.0 through ge-0/0/9.0
16
+ * Network configuration of ge-0/0/1.0 through ge-0/0/9.0 (dhcp or static)
17
17
  * __TBD__: anything you request via [issues](https://github.com/JNPRAutomate/vagrant-junos/issues)
18
18
 
19
19
 
20
20
  ## Usage
21
21
 
22
- Install using standard Vagrant 1.6+ plugin installation methods. The fastest way to get started is to use the standard Vagrant Cloud images:
22
+ Install using standard Vagrant 1.7+ plugin installation methods. The fastest way to get started is to use the standard Vagrant Cloud images:
23
23
 
24
24
  ```
25
25
  $ vagrant plugin install vagrant-junos
26
26
  ...
27
- $ vagrant up juniper/ffp-12.1X46-D20.5
27
+ ... (create a Vagrant environment in a directory):
28
+ $ vagrant init juniper/ffp-12.1X46-D20.5
28
29
  ...
30
+ $ vagrant up
29
31
  ```
30
32
 
31
33
  ## Quick Start
@@ -66,4 +68,4 @@ $ bundle exec vagrant up juniper/ffp-12.1X46-D20.5
66
68
 
67
69
  ## Notes
68
70
 
69
- > **NOTE:** post-bootstrap configuration in Vagrant will be carried out through the [vagrant-netconf](https://github.com/JNPRAutomate/vagrant-netconf) communicator plugin and [vagrant-jprovision](https://github.com/JNPRAutomate/vagrant-jprovision) provisioner plugin. These may or may not be required in the premade boxes in the future.
71
+ Other than installing this plugin, the next recommended step is to check out the boxes at [Juniper's Atlas site](http://atlas.hashicorp.com/Juniper).
data/Vagrantfile ADDED
@@ -0,0 +1,48 @@
1
+ # -*- mode: ruby -*-
2
+ # vi: set ft=ruby :
3
+
4
+ # ge-0/0/0.0 defaults to NAT for SSH + management connectivity
5
+ # over Vagrant's forwarded ports. This should configure ge-0/0/1.0
6
+ # through ge-0/0/7.0 on VirtualBox.
7
+
8
+ ######### WARNING: testing only! #########
9
+ ######### WARNING: testing only! #########
10
+ ######### WARNING: testing only! #########
11
+ #
12
+ # this Vagrantfile can and will wreak havoc on your VBox setup, so please
13
+ # use the Vagrant boxes at https://atlas.hashicorp.com/juniper unless you're
14
+ # attempting to extend this plugin (and can lose your VBox network config)
15
+ # TODO: launch VMs from something other than travis to CI all features
16
+ #
17
+ # Note: VMware can't name interfaces, but also supports 10 interfaces
18
+ # (through ge-0/0/9.0), so you should adjust accordingly to test
19
+ #
20
+ # Note: interface descriptions in Junos don't work yet, but you woud set them
21
+ # here with 'description:'.
22
+
23
+
24
+ Vagrant.configure(2) do |config|
25
+ config.vm.box = "juniper/ffp-12.1X47-D15.4-packetmode"
26
+ config.vm.hostname = 'vagrant-junos-test'
27
+ config.vm.network "private_network",
28
+ ip: "192.168.33.10",
29
+ virtualbox__intnet: "teststatic"
30
+ config.vm.network "private_network",
31
+ type: "dhcp",
32
+ virtualbox__intnet: "testdhcp"
33
+ config.vm.network "private_network",
34
+ ip: "192.168.34.10",
35
+ virtualbox__intnet: "teststatic2"
36
+ config.vm.network "private_network",
37
+ type: "dhcp",
38
+ virtualbox__intnet: "testdhcp2"
39
+ config.vm.network "private_network",
40
+ ip: "192.168.35.10",
41
+ virtualbox__intnet: "teststatic3"
42
+ config.vm.network "private_network",
43
+ type: "dhcp",
44
+ virtualbox__intnet: "testdhcp3"
45
+ config.vm.network "private_network",
46
+ ip: "192.168.36.10",
47
+ virtualbox__intnet: "teststatic4"
48
+ end
@@ -21,7 +21,6 @@ module VagrantPlugins
21
21
 
22
22
  # set up us the Junos interfaces
23
23
  comm.execute('cli -f /mfs/tmp/set_hostname')
24
- comm.execute('rm /mfs/tmp/set_hostname')
25
24
  end
26
25
  end
27
26
  end
@@ -38,7 +38,6 @@ module VagrantPlugins
38
38
  def self.deploy(machine)
39
39
  machine.communicate.tap do |comm|
40
40
  comm.execute('cli -f /mfs/tmp/network')
41
- comm.execute('rm /mfs/tmp/network')
42
41
  end
43
42
  end
44
43
 
@@ -35,7 +35,6 @@ module VagrantPlugins
35
35
  machine.communicate.upload(local_temp.path, "#{remote_temp}")
36
36
  local_temp.delete
37
37
  end
38
-
39
38
  end
40
39
  end
41
40
  end
@@ -1,6 +1,6 @@
1
1
  module VagrantPlugins
2
2
  # Junos guest gem + plugin version
3
3
  module GuestJunos
4
- VERSION = '0.1.1'
4
+ VERSION = '0.2.0'
5
5
  end
6
6
  end
@@ -1,6 +1,10 @@
1
1
  configure
2
2
  wildcard range delete interfaces ge-0/0/[1-9]
3
3
  <% options.each do |options| -%>
4
- set interfaces ge-0/0/<%= options[:interface].to_i %> unit 0 family inet address <%= options[:ip] %>/<%= options[:prefix_length] %>
4
+ <% if options[:type].to_sym == :static -%>
5
+ set interfaces ge-0/0/<%= options[:interface].to_i %> unit 0 family inet address <%= options[:ip] %>/<%= options[:prefix_length] %>
6
+ <% elsif options[:type].to_sym == :dhcp -%>
7
+ set interfaces ge-0/0/<%= options[:interface].to_i %> unit 0 family inet dhcp
8
+ <% end -%>
5
9
  <% end -%>
6
10
  commit and-quit
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-junos
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Deatherage
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-24 00:00:00.000000000 Z
11
+ date: 2015-03-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -95,6 +95,7 @@ files:
95
95
  - LICENSE.txt
96
96
  - README.md
97
97
  - Rakefile
98
+ - Vagrantfile
98
99
  - lib/vagrant-junos.rb
99
100
  - lib/vagrant-junos/cap/change_host_name.rb
100
101
  - lib/vagrant-junos/cap/configure_networks.rb