vagrant-vmpooler 0.1.1 → 0.1.2
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/.gitignore +21 -0
- data/Gemfile +15 -0
- data/LICENSE +15 -0
- data/README.md +143 -0
- data/Rakefile +22 -0
- data/example_box/Vagrantfile +22 -0
- data/example_box/dummy.box +0 -0
- data/example_box/metadata.json +3 -0
- data/example_box/readme.md +8 -0
- data/lib/vagrant-vmpooler.rb +53 -0
- data/lib/vagrant-vmpooler/action.rb +212 -0
- data/lib/vagrant-vmpooler/action/create_server.rb +103 -0
- data/lib/vagrant-vmpooler/action/delete_server.rb +50 -0
- data/lib/vagrant-vmpooler/action/hard_reboot_server.rb +24 -0
- data/lib/vagrant-vmpooler/action/is_created.rb +16 -0
- data/lib/vagrant-vmpooler/action/is_paused.rb +16 -0
- data/lib/vagrant-vmpooler/action/is_suspended.rb +16 -0
- data/lib/vagrant-vmpooler/action/message_already_created.rb +16 -0
- data/lib/vagrant-vmpooler/action/message_not_created.rb +16 -0
- data/lib/vagrant-vmpooler/action/message_server_running.rb +16 -0
- data/lib/vagrant-vmpooler/action/message_will_not_destroy.rb +16 -0
- data/lib/vagrant-vmpooler/action/pause_server.rb +24 -0
- data/lib/vagrant-vmpooler/action/read_ssh_info.rb +56 -0
- data/lib/vagrant-vmpooler/action/read_state.rb +41 -0
- data/lib/vagrant-vmpooler/action/reboot_server.rb +24 -0
- data/lib/vagrant-vmpooler/action/resume_server.rb +25 -0
- data/lib/vagrant-vmpooler/action/setup_rsync.rb +40 -0
- data/lib/vagrant-vmpooler/action/suspend_server.rb +24 -0
- data/lib/vagrant-vmpooler/action/sync_folders.rb +104 -0
- data/lib/vagrant-vmpooler/action/take_snapshot.rb +35 -0
- data/lib/vagrant-vmpooler/action/wait_for_state.rb +38 -0
- data/lib/vagrant-vmpooler/config.rb +100 -0
- data/lib/vagrant-vmpooler/errors.rb +31 -0
- data/lib/vagrant-vmpooler/plugin.rb +30 -0
- data/lib/vagrant-vmpooler/provider.rb +55 -0
- data/lib/vagrant-vmpooler/version.rb +5 -0
- data/locales/en.yml +151 -0
- data/spec/spec_helper.rb +0 -0
- data/spec/vagrant-vmpooler/config_spec.rb +44 -0
- data/vagrant-vmpooler.gemspec +23 -0
- metadata +45 -3
data/locales/en.yml
ADDED
@@ -0,0 +1,151 @@
|
|
1
|
+
en:
|
2
|
+
vagrant_vmpooler:
|
3
|
+
install_rsync: |-
|
4
|
+
Installing rsync...
|
5
|
+
not_supported: |-
|
6
|
+
This action not supported with vagrant-vmpooler
|
7
|
+
deleted: |-
|
8
|
+
The server was deleted.
|
9
|
+
not_deleted: |-
|
10
|
+
The server was not deleted.
|
11
|
+
already_created: |-
|
12
|
+
The server is already created.
|
13
|
+
already_paused: |-
|
14
|
+
The server is already paused.
|
15
|
+
already_suspended: |-
|
16
|
+
The server is already suspended.
|
17
|
+
creating_disks: |-
|
18
|
+
Creating disks with the folowing settings...
|
19
|
+
deleting_server: |-
|
20
|
+
Deleting server...
|
21
|
+
deleting_volumes: |-
|
22
|
+
Deleting volumes...
|
23
|
+
finding_flavor: |-
|
24
|
+
Finding flavor for server...
|
25
|
+
finding_image: |-
|
26
|
+
Finding image for server...
|
27
|
+
finding_network: |-
|
28
|
+
Finding network for server...
|
29
|
+
hard_rebooting_server: |-
|
30
|
+
Hard rebooting server instance.
|
31
|
+
launching_server: |-
|
32
|
+
Launching a server with the following settings...
|
33
|
+
not_created: |-
|
34
|
+
The server hasn't been created yet. Run `vagrant up` first.
|
35
|
+
pausing_server: |-
|
36
|
+
The server instance has been paused.
|
37
|
+
ready: |-
|
38
|
+
The server is ready!
|
39
|
+
rebooting_server: |-
|
40
|
+
This server instance is rebooting!
|
41
|
+
snapshoting_server: |-
|
42
|
+
This server instance is snapshoting!
|
43
|
+
snapshot_done: |-
|
44
|
+
Snapshot is ok
|
45
|
+
snapshot_in_progress: |-
|
46
|
+
Snapshot is in progress
|
47
|
+
resuming_server: |-
|
48
|
+
The server instance has been resumed.
|
49
|
+
rsync_folder: |-
|
50
|
+
Rsyncing folder: %{hostpath} => %{guestpath}
|
51
|
+
server_running: |-
|
52
|
+
The instance '%{name}' is already running!
|
53
|
+
suspending_server: |-
|
54
|
+
The server instance has been suspended!
|
55
|
+
waiting_for_build: |-
|
56
|
+
Waiting for the server to be built...
|
57
|
+
waiting_for_ssh: |-
|
58
|
+
Waiting for SSH to become available...
|
59
|
+
will_not_destroy: |-
|
60
|
+
The instance '%{name}' will not be destroyed, since the confirmation
|
61
|
+
was declined.
|
62
|
+
config:
|
63
|
+
api_key_required: |-
|
64
|
+
An API key is required.
|
65
|
+
username_required: |-
|
66
|
+
A username is required.
|
67
|
+
metadata_must_be_hash: |-
|
68
|
+
Metadata must be a hash.
|
69
|
+
disks:
|
70
|
+
specification_required: |-
|
71
|
+
A disk specification is required for a disk configuration (array of hashes including name, description and size keys).
|
72
|
+
name_required: |-
|
73
|
+
A disk name is required for all disk specifications.
|
74
|
+
description_required: |-
|
75
|
+
A disk description is required for all disk specifications.
|
76
|
+
size_required: |-
|
77
|
+
A disk size is required for all disk specifications.
|
78
|
+
|
79
|
+
errors:
|
80
|
+
no_install_rsync: |-
|
81
|
+
Did not install rsync
|
82
|
+
install_rsync_error: |-
|
83
|
+
Could not properly install Rsync on host provided
|
84
|
+
failed_snapshot: |-
|
85
|
+
Could not snapshot server.
|
86
|
+
failed_ttl: |-
|
87
|
+
Could not extend TTL on vm.
|
88
|
+
failed_disk_extend: |-
|
89
|
+
Could not extend size of disk on vm.
|
90
|
+
vmpooler_url_error: |-
|
91
|
+
No user was provided to connect to vmpooler.
|
92
|
+
no_os_error: |-
|
93
|
+
No operatingsystem flavor was set.
|
94
|
+
bad_request: |-
|
95
|
+
Failed to make a request.
|
96
|
+
create_bad_state: |-
|
97
|
+
While creating the server, it transitioned to an unexpected
|
98
|
+
state: '%{state}', instead of properly booting. Run `vagrant status`
|
99
|
+
to find out what can be done about this state, or `vagrant destroy`
|
100
|
+
if you want to start over.
|
101
|
+
no_matching_flavor: |-
|
102
|
+
No matching flavor was found! Please check your flavor setting
|
103
|
+
to make sure you have a valid flavor chosen.
|
104
|
+
no_matching_image: |-
|
105
|
+
No matching image was found! Please check your image setting to
|
106
|
+
make sure you have a valid image chosen.
|
107
|
+
rsync_error: |-
|
108
|
+
There was an error when attemping to rsync a share folder.
|
109
|
+
Please inspect the error message below for more info.
|
110
|
+
|
111
|
+
Host path: %{hostpath}
|
112
|
+
Guest path: %{guestpath}
|
113
|
+
Error: %{stderr}
|
114
|
+
ssh_no_valid_host: |-
|
115
|
+
Unable to determine what host to connect to. Run `vagrant up` in
|
116
|
+
debug mode to see a list of networks available to your tenant.
|
117
|
+
Then set either `os.network` or `os.address_id` to one of the
|
118
|
+
network names.
|
119
|
+
server_not_destroyed: |-
|
120
|
+
Vmpooler server was not fully destroyed.
|
121
|
+
|
122
|
+
states:
|
123
|
+
short_created:
|
124
|
+
created
|
125
|
+
long_created:
|
126
|
+
The server has been created. Run `vagrant ssh` to access it.
|
127
|
+
short_active: |-
|
128
|
+
active
|
129
|
+
long_active: |-
|
130
|
+
The server is up and running. Run `vagrant ssh` to access it.
|
131
|
+
short_build: |-
|
132
|
+
building
|
133
|
+
short_suspended: |-
|
134
|
+
suspended
|
135
|
+
short_paused: |-
|
136
|
+
paused
|
137
|
+
short_shutoff: |-
|
138
|
+
shutdown
|
139
|
+
long_build: |-
|
140
|
+
The server is currently being built. You must wait for this to
|
141
|
+
complete before you can access it. You can delete the server, however,
|
142
|
+
by running `vagrant destroy`.
|
143
|
+
short_error: |-
|
144
|
+
error
|
145
|
+
long_error: |-
|
146
|
+
The server is in an erroneous state. Destroy the machine with
|
147
|
+
`vagrant destroy`.
|
148
|
+
short_not_created: |-
|
149
|
+
not created
|
150
|
+
long_not_created: |-
|
151
|
+
The server is not created. Run `vagrant up` to create it.
|
data/spec/spec_helper.rb
ADDED
File without changes
|
@@ -0,0 +1,44 @@
|
|
1
|
+
require 'vagrant-vmpooler/config'
|
2
|
+
require 'rspec/its'
|
3
|
+
|
4
|
+
RSpec.configure do |config|
|
5
|
+
# ...
|
6
|
+
config.mock_with :rspec do |c|
|
7
|
+
c.syntax = [:should, :expect]
|
8
|
+
end
|
9
|
+
config.expect_with :rspec do |c|
|
10
|
+
c.syntax = [:should, :expect]
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
describe VagrantPlugins::Vmpooler::Config do
|
15
|
+
let(:instance) { described_class.new }
|
16
|
+
|
17
|
+
describe "defaults" do
|
18
|
+
subject do
|
19
|
+
instance.tap do |o|
|
20
|
+
o.finalize!
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
its("os") {should be_nil}
|
25
|
+
its("verbose") {should be false}
|
26
|
+
its("password") {should be_nil}
|
27
|
+
its("ttl") {should be_nil}
|
28
|
+
its("disk") {should be_nil}
|
29
|
+
end
|
30
|
+
|
31
|
+
describe "overriding defaults" do
|
32
|
+
[:os, :verbose, :password, :ttl, :disk].each do |attribute|
|
33
|
+
it "should not default #{attribute} if overridden" do
|
34
|
+
# but these should always come together, so you need to set them all or nothing
|
35
|
+
instance.send("url=".to_sym, "foo")
|
36
|
+
instance.send("token=".to_sym, "foo")
|
37
|
+
instance.send("os=".to_sym, "foo")
|
38
|
+
instance.send("#{attribute}=".to_sym, "foo")
|
39
|
+
instance.finalize!
|
40
|
+
instance.send(attribute).should == "foo"
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
$:.unshift File.expand_path("../lib", __FILE__)
|
2
|
+
require "vagrant-vmpooler/version"
|
3
|
+
|
4
|
+
Gem::Specification.new do |s|
|
5
|
+
s.name = "vagrant-vmpooler"
|
6
|
+
s.version = VagrantPlugins::Vmpooler::VERSION
|
7
|
+
s.platform = Gem::Platform::RUBY
|
8
|
+
s.license = "Apache"
|
9
|
+
s.authors = "Brian Cain"
|
10
|
+
s.email = "brian.cain@puppet.com"
|
11
|
+
s.homepage = "https://github.com/briancain/vagrant-vmpooler"
|
12
|
+
s.summary = "Enables Vagrant to manage machines in vmpooler."
|
13
|
+
s.description = "Enables Vagrant to manage machines in vmpooler."
|
14
|
+
|
15
|
+
s.add_runtime_dependency "vmfloaty", ">= 0.5.0"
|
16
|
+
|
17
|
+
s.add_development_dependency "rspec-its"
|
18
|
+
|
19
|
+
s.files = `git ls-files`.split($/)
|
20
|
+
s.executables = s.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
21
|
+
s.test_files = s.files.grep(%r{^(test|spec|features)/})
|
22
|
+
s.require_paths = ["lib"]
|
23
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-vmpooler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Cain
|
@@ -43,7 +43,47 @@ email: brian.cain@puppet.com
|
|
43
43
|
executables: []
|
44
44
|
extensions: []
|
45
45
|
extra_rdoc_files: []
|
46
|
-
files:
|
46
|
+
files:
|
47
|
+
- ".gitignore"
|
48
|
+
- Gemfile
|
49
|
+
- LICENSE
|
50
|
+
- README.md
|
51
|
+
- Rakefile
|
52
|
+
- example_box/Vagrantfile
|
53
|
+
- example_box/dummy.box
|
54
|
+
- example_box/metadata.json
|
55
|
+
- example_box/readme.md
|
56
|
+
- lib/vagrant-vmpooler.rb
|
57
|
+
- lib/vagrant-vmpooler/action.rb
|
58
|
+
- lib/vagrant-vmpooler/action/create_server.rb
|
59
|
+
- lib/vagrant-vmpooler/action/delete_server.rb
|
60
|
+
- lib/vagrant-vmpooler/action/hard_reboot_server.rb
|
61
|
+
- lib/vagrant-vmpooler/action/is_created.rb
|
62
|
+
- lib/vagrant-vmpooler/action/is_paused.rb
|
63
|
+
- lib/vagrant-vmpooler/action/is_suspended.rb
|
64
|
+
- lib/vagrant-vmpooler/action/message_already_created.rb
|
65
|
+
- lib/vagrant-vmpooler/action/message_not_created.rb
|
66
|
+
- lib/vagrant-vmpooler/action/message_server_running.rb
|
67
|
+
- lib/vagrant-vmpooler/action/message_will_not_destroy.rb
|
68
|
+
- lib/vagrant-vmpooler/action/pause_server.rb
|
69
|
+
- lib/vagrant-vmpooler/action/read_ssh_info.rb
|
70
|
+
- lib/vagrant-vmpooler/action/read_state.rb
|
71
|
+
- lib/vagrant-vmpooler/action/reboot_server.rb
|
72
|
+
- lib/vagrant-vmpooler/action/resume_server.rb
|
73
|
+
- lib/vagrant-vmpooler/action/setup_rsync.rb
|
74
|
+
- lib/vagrant-vmpooler/action/suspend_server.rb
|
75
|
+
- lib/vagrant-vmpooler/action/sync_folders.rb
|
76
|
+
- lib/vagrant-vmpooler/action/take_snapshot.rb
|
77
|
+
- lib/vagrant-vmpooler/action/wait_for_state.rb
|
78
|
+
- lib/vagrant-vmpooler/config.rb
|
79
|
+
- lib/vagrant-vmpooler/errors.rb
|
80
|
+
- lib/vagrant-vmpooler/plugin.rb
|
81
|
+
- lib/vagrant-vmpooler/provider.rb
|
82
|
+
- lib/vagrant-vmpooler/version.rb
|
83
|
+
- locales/en.yml
|
84
|
+
- spec/spec_helper.rb
|
85
|
+
- spec/vagrant-vmpooler/config_spec.rb
|
86
|
+
- vagrant-vmpooler.gemspec
|
47
87
|
homepage: https://github.com/briancain/vagrant-vmpooler
|
48
88
|
licenses:
|
49
89
|
- Apache
|
@@ -68,4 +108,6 @@ rubygems_version: 2.4.5.1
|
|
68
108
|
signing_key:
|
69
109
|
specification_version: 4
|
70
110
|
summary: Enables Vagrant to manage machines in vmpooler.
|
71
|
-
test_files:
|
111
|
+
test_files:
|
112
|
+
- spec/spec_helper.rb
|
113
|
+
- spec/vagrant-vmpooler/config_spec.rb
|