vagrant-parallels 1.5.1 → 1.6.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.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +7 -4
  3. data/CHANGELOG.md +33 -0
  4. data/Gemfile +2 -2
  5. data/README.md +1 -1
  6. data/debug.log +1237 -1
  7. data/lib/vagrant-parallels/action.rb +8 -0
  8. data/lib/vagrant-parallels/action/box_register.rb +113 -0
  9. data/lib/vagrant-parallels/action/box_unregister.rb +43 -0
  10. data/lib/vagrant-parallels/action/export.rb +36 -35
  11. data/lib/vagrant-parallels/action/forward_ports.rb +32 -18
  12. data/lib/vagrant-parallels/action/import.rb +59 -106
  13. data/lib/vagrant-parallels/action/network.rb +17 -13
  14. data/lib/vagrant-parallels/action/prepare_clone_snapshot.rb +67 -0
  15. data/lib/vagrant-parallels/action/set_name.rb +1 -1
  16. data/lib/vagrant-parallels/action/snapshot_delete.rb +25 -0
  17. data/lib/vagrant-parallels/action/snapshot_restore.rb +23 -0
  18. data/lib/vagrant-parallels/action/snapshot_save.rb +23 -0
  19. data/lib/vagrant-parallels/cap.rb +63 -0
  20. data/lib/vagrant-parallels/config.rb +7 -3
  21. data/lib/vagrant-parallels/driver/base.rb +61 -28
  22. data/lib/vagrant-parallels/driver/meta.rb +20 -10
  23. data/lib/vagrant-parallels/driver/pd_11.rb +0 -21
  24. data/lib/vagrant-parallels/errors.rb +14 -6
  25. data/lib/vagrant-parallels/guest_cap/darwin/install_parallels_tools.rb +34 -0
  26. data/lib/vagrant-parallels/plugin.rb +23 -8
  27. data/lib/vagrant-parallels/version.rb +1 -1
  28. data/locales/en.yml +31 -17
  29. data/test/acceptance/provider/linked_clone_spec.rb +6 -2
  30. data/test/acceptance/skeletons/linked_clone/Vagrantfile +1 -1
  31. data/test/unit/base.rb +1 -0
  32. data/test/unit/cap_test.rb +96 -0
  33. data/test/unit/support/shared/pd_driver_examples.rb +7 -10
  34. metadata +12 -6
  35. data/lib/vagrant-parallels/cap/forwarded_ports.rb +0 -22
  36. data/lib/vagrant-parallels/cap/host_address.rb +0 -15
  37. data/lib/vagrant-parallels/cap/nic_mac_addresses.rb +0 -17
  38. data/lib/vagrant-parallels/cap/public_address.rb +0 -15
@@ -118,21 +118,18 @@ shared_examples 'parallels desktop driver' do |options|
118
118
  describe 'clone_vm' do
119
119
  it 'clones VM to the new one' do
120
120
  subprocess.should_receive(:execute).
121
- with('prlctl', 'clone', tpl_uuid, '--name', vm_name,
121
+ with('prlctl', 'clone', tpl_uuid, '--name', an_instance_of(String),
122
122
  an_instance_of(Hash)).
123
123
  and_return(subprocess_result(exit_code: 0))
124
- subject.clone_vm(tpl_uuid, vm_name).should == uuid
124
+ subject.clone_vm(tpl_uuid)
125
125
  end
126
126
 
127
- it 'clones VM to template' do
127
+ it 'clones VM to the exported VM' do
128
128
  subprocess.should_receive(:execute).
129
- with('prlctl', 'clone', uuid, '--name', tpl_name,
130
- '--template', '--dst', an_instance_of(String),
131
- an_instance_of(Hash)).
129
+ with('prlctl', 'clone', uuid, '--name', an_instance_of(String),
130
+ '--dst', an_instance_of(String), an_instance_of(Hash)).
132
131
  and_return(subprocess_result(exit_code: 0))
133
- subject.clone_vm(uuid, tpl_name,
134
- {dst: '/path/to/template', template: true}).
135
- should == tpl_uuid
132
+ subject.clone_vm(uuid, {dst: '/path/to/template'})
136
133
  end
137
134
  end
138
135
 
@@ -265,7 +262,7 @@ shared_examples 'parallels desktop driver' do |options|
265
262
  an_instance_of(Hash)).
266
263
  and_return(subprocess_result(exit_code: 0))
267
264
 
268
- subject.set_name('new_vm_name')
265
+ subject.set_name(uuid, 'new_vm_name')
269
266
  end
270
267
  end
271
268
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-parallels
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.1
4
+ version: 1.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mikhail Zholobov
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-10-25 00:00:00.000000000 Z
12
+ date: 2015-12-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -77,6 +77,7 @@ extra_rdoc_files: []
77
77
  files:
78
78
  - ".gitignore"
79
79
  - ".travis.yml"
80
+ - CHANGELOG.md
80
81
  - CONTRIBUTING.md
81
82
  - Gemfile
82
83
  - LICENSE.txt
@@ -87,6 +88,8 @@ files:
87
88
  - lib/vagrant-parallels.rb
88
89
  - lib/vagrant-parallels/action.rb
89
90
  - lib/vagrant-parallels/action/boot.rb
91
+ - lib/vagrant-parallels/action/box_register.rb
92
+ - lib/vagrant-parallels/action/box_unregister.rb
90
93
  - lib/vagrant-parallels/action/clear_forwarded_ports.rb
91
94
  - lib/vagrant-parallels/action/clear_network_interfaces.rb
92
95
  - lib/vagrant-parallels/action/clear_shared_folders.rb
@@ -102,6 +105,7 @@ files:
102
105
  - lib/vagrant-parallels/action/network.rb
103
106
  - lib/vagrant-parallels/action/package.rb
104
107
  - lib/vagrant-parallels/action/package_config_files.rb
108
+ - lib/vagrant-parallels/action/prepare_clone_snapshot.rb
105
109
  - lib/vagrant-parallels/action/prepare_forwarded_port_collision_params.rb
106
110
  - lib/vagrant-parallels/action/prepare_nfs_settings.rb
107
111
  - lib/vagrant-parallels/action/prepare_nfs_valid_ids.rb
@@ -109,11 +113,11 @@ files:
109
113
  - lib/vagrant-parallels/action/sane_defaults.rb
110
114
  - lib/vagrant-parallels/action/set_name.rb
111
115
  - lib/vagrant-parallels/action/setup_package_files.rb
116
+ - lib/vagrant-parallels/action/snapshot_delete.rb
117
+ - lib/vagrant-parallels/action/snapshot_restore.rb
118
+ - lib/vagrant-parallels/action/snapshot_save.rb
112
119
  - lib/vagrant-parallels/action/suspend.rb
113
- - lib/vagrant-parallels/cap/forwarded_ports.rb
114
- - lib/vagrant-parallels/cap/host_address.rb
115
- - lib/vagrant-parallels/cap/nic_mac_addresses.rb
116
- - lib/vagrant-parallels/cap/public_address.rb
120
+ - lib/vagrant-parallels/cap.rb
117
121
  - lib/vagrant-parallels/config.rb
118
122
  - lib/vagrant-parallels/driver/base.rb
119
123
  - lib/vagrant-parallels/driver/meta.rb
@@ -122,6 +126,7 @@ files:
122
126
  - lib/vagrant-parallels/driver/pd_8.rb
123
127
  - lib/vagrant-parallels/driver/pd_9.rb
124
128
  - lib/vagrant-parallels/errors.rb
129
+ - lib/vagrant-parallels/guest_cap/darwin/install_parallels_tools.rb
125
130
  - lib/vagrant-parallels/guest_cap/darwin/mount_parallels_shared_folder.rb
126
131
  - lib/vagrant-parallels/guest_cap/linux/install_parallels_tools.rb
127
132
  - lib/vagrant-parallels/guest_cap/linux/mount_parallels_shared_folder.rb
@@ -140,6 +145,7 @@ files:
140
145
  - test/acceptance/shared/context_parallels.rb
141
146
  - test/acceptance/skeletons/linked_clone/Vagrantfile
142
147
  - test/unit/base.rb
148
+ - test/unit/cap_test.rb
143
149
  - test/unit/config_test.rb
144
150
  - test/unit/driver/pd_10_test.rb
145
151
  - test/unit/driver/pd_8_test.rb
@@ -1,22 +0,0 @@
1
- module VagrantPlugins
2
- module Parallels
3
- module Cap
4
- module ForwardedPorts
5
- # Reads the forwarded ports that currently exist on the machine
6
- # itself.
7
- #
8
- # This also may not match up with configured forwarded ports, because
9
- # Vagrant auto port collision fixing may have taken place.
10
- #
11
- # @return [Hash<Integer, Integer>] Host => Guest port mappings.
12
- def self.forwarded_ports(machine)
13
- {}.tap do |result|
14
- machine.provider.driver.read_forwarded_ports.each do |_, _, h, g|
15
- result[h] = g
16
- end
17
- end
18
- end
19
- end
20
- end
21
- end
22
- end
@@ -1,15 +0,0 @@
1
- module VagrantPlugins
2
- module Parallels
3
- module Cap
4
- module HostAddress
5
- def self.host_address(machine)
6
-
7
- shared_iface = machine.provider.driver.read_shared_interface
8
- return shared_iface[:ip] if shared_iface
9
-
10
- nil
11
- end
12
- end
13
- end
14
- end
15
- end
@@ -1,17 +0,0 @@
1
- module VagrantPlugins
2
- module Parallels
3
- module Cap
4
- module NicMacAddresses
5
- # Reads the network interface card MAC addresses and returns them.
6
- #
7
- # @return [Hash<Integer, String>] Adapter => MAC address
8
- def self.nic_mac_addresses(machine)
9
- nic_macs = machine.provider.driver.read_mac_addresses
10
-
11
- # Make numeration starting from 1, as it is expected in Vagrant.
12
- Hash[nic_macs.map.with_index{ |mac, index| [index+1, mac] }]
13
- end
14
- end
15
- end
16
- end
17
- end
@@ -1,15 +0,0 @@
1
- module VagrantPlugins
2
- module Parallels
3
- module Cap
4
- module PublicAddress
5
- def self.public_address(machine)
6
- return nil if machine.state.id != :running
7
-
8
- ssh_info = machine.ssh_info
9
- return nil if !ssh_info
10
- ssh_info[:host]
11
- end
12
- end
13
- end
14
- end
15
- end