vagrant-cosmic 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (68) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +17 -0
  3. data/CHANGELOG.md +8 -0
  4. data/Docker/.dockerignore +2 -0
  5. data/Docker/Dockerfile +48 -0
  6. data/Docker/Dockerfile.chefdk_0_17 +49 -0
  7. data/Docker/Dockerfile.latest_dependencies +49 -0
  8. data/Docker/README.md +95 -0
  9. data/Docker/vac.ps1 +29 -0
  10. data/Docker/vac.sh +30 -0
  11. data/Gemfile +21 -0
  12. data/Gemfile.lock +187 -0
  13. data/LICENSE +8 -0
  14. data/README.md +409 -0
  15. data/Rakefile +106 -0
  16. data/build_rpm.sh +7 -0
  17. data/functional-tests/basic/Vagrantfile.basic_networking +34 -0
  18. data/functional-tests/basic/basic_spec.rb +15 -0
  19. data/functional-tests/networking/Vagrantfile.advanced_networking +106 -0
  20. data/functional-tests/networking/networking_spec.rb +14 -0
  21. data/functional-tests/rsync/Vagrantfile.advanced_networking +40 -0
  22. data/functional-tests/rsync/rsync_spec.rb +9 -0
  23. data/functional-tests/vmlifecycle/Vagrantfile.advanced_networking +64 -0
  24. data/functional-tests/vmlifecycle/vmlifecycle_spec.rb +25 -0
  25. data/lib/vagrant-cosmic/action/connect_cosmic.rb +47 -0
  26. data/lib/vagrant-cosmic/action/is_created.rb +18 -0
  27. data/lib/vagrant-cosmic/action/is_stopped.rb +18 -0
  28. data/lib/vagrant-cosmic/action/message_already_created.rb +16 -0
  29. data/lib/vagrant-cosmic/action/message_not_created.rb +16 -0
  30. data/lib/vagrant-cosmic/action/message_will_not_destroy.rb +16 -0
  31. data/lib/vagrant-cosmic/action/read_rdp_info.rb +42 -0
  32. data/lib/vagrant-cosmic/action/read_ssh_info.rb +70 -0
  33. data/lib/vagrant-cosmic/action/read_state.rb +38 -0
  34. data/lib/vagrant-cosmic/action/read_transport_info.rb +59 -0
  35. data/lib/vagrant-cosmic/action/read_winrm_info.rb +69 -0
  36. data/lib/vagrant-cosmic/action/run_instance.rb +819 -0
  37. data/lib/vagrant-cosmic/action/start_instance.rb +81 -0
  38. data/lib/vagrant-cosmic/action/stop_instance.rb +28 -0
  39. data/lib/vagrant-cosmic/action/terminate_instance.rb +208 -0
  40. data/lib/vagrant-cosmic/action/timed_provision.rb +21 -0
  41. data/lib/vagrant-cosmic/action/wait_for_state.rb +41 -0
  42. data/lib/vagrant-cosmic/action/warn_networks.rb +19 -0
  43. data/lib/vagrant-cosmic/action.rb +210 -0
  44. data/lib/vagrant-cosmic/capabilities/rdp.rb +12 -0
  45. data/lib/vagrant-cosmic/capabilities/winrm.rb +12 -0
  46. data/lib/vagrant-cosmic/config.rb +422 -0
  47. data/lib/vagrant-cosmic/errors.rb +27 -0
  48. data/lib/vagrant-cosmic/exceptions/exceptions.rb +15 -0
  49. data/lib/vagrant-cosmic/model/cosmic_resource.rb +51 -0
  50. data/lib/vagrant-cosmic/plugin.rb +82 -0
  51. data/lib/vagrant-cosmic/provider.rb +58 -0
  52. data/lib/vagrant-cosmic/service/cosmic_resource_service.rb +76 -0
  53. data/lib/vagrant-cosmic/util/timer.rb +17 -0
  54. data/lib/vagrant-cosmic/version.rb +5 -0
  55. data/lib/vagrant-cosmic.rb +17 -0
  56. data/locales/en.yml +131 -0
  57. data/spec/spec_helper.rb +53 -0
  58. data/spec/vagrant-cosmic/action/read_ssh_info_spec.rb +80 -0
  59. data/spec/vagrant-cosmic/action/retrieve_public_ip_port_spec.rb +94 -0
  60. data/spec/vagrant-cosmic/action/run_instance_spec.rb +573 -0
  61. data/spec/vagrant-cosmic/action/terminate_instance_spec.rb +207 -0
  62. data/spec/vagrant-cosmic/config_spec.rb +340 -0
  63. data/spec/vagrant-cosmic/model/cosmic_resource_spec.rb +95 -0
  64. data/spec/vagrant-cosmic/service/cosmic_resource_service_spec.rb +43 -0
  65. data/spec/vagrant-cosmic/support/be_a_resource.rb +6 -0
  66. data/vagrant-cosmic.gemspec +59 -0
  67. data/vagrant-cosmic.spec +42 -0
  68. metadata +218 -0
@@ -0,0 +1,6 @@
1
+ RSpec::Matchers.define :be_a_resource do |id, name, kind|
2
+ match do |actual|
3
+ actual.is_a?(VagrantPlugins::Cosmic::Model::CosmicResource) &&
4
+ actual.id == id && actual.name == name && actual.kind == kind
5
+ end
6
+ end
@@ -0,0 +1,59 @@
1
+ $:.unshift File.expand_path('../lib', __FILE__)
2
+ require 'vagrant-cosmic/version'
3
+
4
+ Gem::Specification.new do |s|
5
+ s.name = 'vagrant-cosmic'
6
+ s.version = VagrantPlugins::Cosmic::VERSION
7
+ s.platform = Gem::Platform::RUBY
8
+ s.license = 'MIT'
9
+ s.authors = ['Mitchell Hashimoto', 'Carl Loa Odin', 'Tor-Åke Fransson', 'Olle Lundberg', 'Roeland Kuipers', 'Yuichi Uemura', 'Atsushi Sasaki', 'Nicolas Brechet', 'Peter Jönsson', 'Christophe Roux', 'Andrei Chiriaev', 'Miguel Ferreira', 'Timothy van Zadelhoff', 'Geurt Schimmel', 'Bob van den Heuvel', 'Stephen Hoekstra']
10
+ s.email = 'int-cloud@schubergphilis.com'
11
+ s.homepage = 'https://github.com/MissionCriticalCloud/vagrant-cosmic/'
12
+ s.summary = 'Enables Vagrant to manage machines in Cosmic.'
13
+ s.description = 'Provides a Cosmic provider for Vagrant to manage virtual machines in Cosmic.'
14
+
15
+ s.required_rubygems_version = '>= 1.3.6'
16
+ s.rubyforge_project = 'vagrant-cosmic'
17
+
18
+ s.add_runtime_dependency 'fog-cosmic', '~> 0.1.0'
19
+
20
+ s.add_development_dependency 'rake', '>= 10.4', '~> 10.5'
21
+ s.add_development_dependency 'rspec-core', '~> 2.14', '>= 2.14.7'
22
+ s.add_development_dependency 'rspec-expectations', '~> 2.14', '>= 2.14.4'
23
+ s.add_development_dependency 'rspec-mocks', '~> 2.14', '>= 2.14.4'
24
+
25
+ # The following block of code determines the files that should be included
26
+ # in the gem. It does this by reading all the files in the directory where
27
+ # this gemspec is, and parsing out the ignored files from the gitignore.
28
+ # Note that the entire gitignore(5) syntax is not supported, specifically
29
+ # the "!" syntax, but it should mostly work correctly.
30
+ root_path = File.dirname(__FILE__)
31
+ all_files = Dir.chdir(root_path) { Dir.glob('**/{*,.*}') }
32
+ all_files.reject! { |file| ['.', '..'].include?(File.basename(file)) }
33
+ gitignore_path = File.join(root_path, '.gitignore')
34
+ gitignore = File.readlines(gitignore_path)
35
+ gitignore.map! { |line| line.chomp.strip }
36
+ gitignore.reject! { |line| line.empty? || line =~ /^(#|!)/ }
37
+
38
+ unignored_files = all_files.reject do |file|
39
+ # Ignore any directories, the gemspec only cares about files
40
+ next true if File.directory?(file)
41
+
42
+ # Ignore any paths that match anything in the gitignore. We do
43
+ # two tests here:
44
+ #
45
+ # - First, test to see if the entire path matches the gitignore.
46
+ # - Second, match if the basename does, this makes it so that things
47
+ # like '.DS_Store' will match sub-directories too (same behavior
48
+ # as git).
49
+ #
50
+ gitignore.any? do |ignore|
51
+ File.fnmatch(ignore, file) ||
52
+ File.fnmatch(ignore, File.basename(file), File::FNM_PATHNAME)
53
+ end
54
+ end
55
+
56
+ s.files = unignored_files
57
+ s.executables = unignored_files.map { |f| f[/^bin\/(.*)/, 1] }.compact
58
+ s.require_path = 'lib'
59
+ end
@@ -0,0 +1,42 @@
1
+ %define gemdir /usr/lib/vagrant-cosmic/gems
2
+ Name: vagrant-cosmic
3
+ Version: %{gemver}
4
+ Release: 3%{?dist}
5
+ Summary: vagrant cosmic plugin
6
+
7
+ License: MIT
8
+ BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
9
+
10
+ Source0: vagrant-cosmic-%{version}.tar.gz
11
+ BuildRequires: rubygems
12
+ Requires: vagrant >= 1.2.0 libxml2-devel libxslt-devel libffi-devel ruby-devel
13
+
14
+ %description
15
+ vagrant cosmic
16
+
17
+
18
+ %prep
19
+ %setup -q
20
+
21
+ %build
22
+ env LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 bundle package
23
+ env LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 gem build vagrant-cosmic.gemspec
24
+
25
+
26
+ %install
27
+ mkdir -p %{buildroot}/%{gemdir}
28
+ cp vagrant-cosmic-%{version}.gem %{buildroot}/%{gemdir}
29
+ cp vendor/cache/*.gem %{buildroot}/%{gemdir}
30
+
31
+
32
+ %clean
33
+ rm -rf %{buildroot}
34
+
35
+
36
+ %post
37
+ cd %{gemdir}
38
+ gem install --local fog --no-rdoc --no-ri
39
+
40
+ %files
41
+ %defattr(-,root,root,-)
42
+ %{gemdir}
metadata ADDED
@@ -0,0 +1,218 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: vagrant-cosmic
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Mitchell Hashimoto
8
+ - Carl Loa Odin
9
+ - Tor-Åke Fransson
10
+ - Olle Lundberg
11
+ - Roeland Kuipers
12
+ - Yuichi Uemura
13
+ - Atsushi Sasaki
14
+ - Nicolas Brechet
15
+ - Peter Jönsson
16
+ - Christophe Roux
17
+ - Andrei Chiriaev
18
+ - Miguel Ferreira
19
+ - Timothy van Zadelhoff
20
+ - Geurt Schimmel
21
+ - Bob van den Heuvel
22
+ - Stephen Hoekstra
23
+ autorequire:
24
+ bindir: bin
25
+ cert_chain: []
26
+ date: 2020-02-26 00:00:00.000000000 Z
27
+ dependencies:
28
+ - !ruby/object:Gem::Dependency
29
+ name: fog-cosmic
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - "~>"
33
+ - !ruby/object:Gem::Version
34
+ version: 0.1.0
35
+ type: :runtime
36
+ prerelease: false
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - "~>"
40
+ - !ruby/object:Gem::Version
41
+ version: 0.1.0
42
+ - !ruby/object:Gem::Dependency
43
+ name: rake
44
+ requirement: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - ">="
47
+ - !ruby/object:Gem::Version
48
+ version: '10.4'
49
+ - - "~>"
50
+ - !ruby/object:Gem::Version
51
+ version: '10.5'
52
+ type: :development
53
+ prerelease: false
54
+ version_requirements: !ruby/object:Gem::Requirement
55
+ requirements:
56
+ - - ">="
57
+ - !ruby/object:Gem::Version
58
+ version: '10.4'
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '10.5'
62
+ - !ruby/object:Gem::Dependency
63
+ name: rspec-core
64
+ requirement: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '2.14'
69
+ - - ">="
70
+ - !ruby/object:Gem::Version
71
+ version: 2.14.7
72
+ type: :development
73
+ prerelease: false
74
+ version_requirements: !ruby/object:Gem::Requirement
75
+ requirements:
76
+ - - "~>"
77
+ - !ruby/object:Gem::Version
78
+ version: '2.14'
79
+ - - ">="
80
+ - !ruby/object:Gem::Version
81
+ version: 2.14.7
82
+ - !ruby/object:Gem::Dependency
83
+ name: rspec-expectations
84
+ requirement: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - "~>"
87
+ - !ruby/object:Gem::Version
88
+ version: '2.14'
89
+ - - ">="
90
+ - !ruby/object:Gem::Version
91
+ version: 2.14.4
92
+ type: :development
93
+ prerelease: false
94
+ version_requirements: !ruby/object:Gem::Requirement
95
+ requirements:
96
+ - - "~>"
97
+ - !ruby/object:Gem::Version
98
+ version: '2.14'
99
+ - - ">="
100
+ - !ruby/object:Gem::Version
101
+ version: 2.14.4
102
+ - !ruby/object:Gem::Dependency
103
+ name: rspec-mocks
104
+ requirement: !ruby/object:Gem::Requirement
105
+ requirements:
106
+ - - "~>"
107
+ - !ruby/object:Gem::Version
108
+ version: '2.14'
109
+ - - ">="
110
+ - !ruby/object:Gem::Version
111
+ version: 2.14.4
112
+ type: :development
113
+ prerelease: false
114
+ version_requirements: !ruby/object:Gem::Requirement
115
+ requirements:
116
+ - - "~>"
117
+ - !ruby/object:Gem::Version
118
+ version: '2.14'
119
+ - - ">="
120
+ - !ruby/object:Gem::Version
121
+ version: 2.14.4
122
+ description: Provides a Cosmic provider for Vagrant to manage virtual machines in
123
+ Cosmic.
124
+ email: int-cloud@schubergphilis.com
125
+ executables: []
126
+ extensions: []
127
+ extra_rdoc_files: []
128
+ files:
129
+ - ".gitignore"
130
+ - CHANGELOG.md
131
+ - Docker/.dockerignore
132
+ - Docker/Dockerfile
133
+ - Docker/Dockerfile.chefdk_0_17
134
+ - Docker/Dockerfile.latest_dependencies
135
+ - Docker/README.md
136
+ - Docker/vac.ps1
137
+ - Docker/vac.sh
138
+ - Gemfile
139
+ - Gemfile.lock
140
+ - LICENSE
141
+ - README.md
142
+ - Rakefile
143
+ - build_rpm.sh
144
+ - functional-tests/basic/Vagrantfile.basic_networking
145
+ - functional-tests/basic/basic_spec.rb
146
+ - functional-tests/networking/Vagrantfile.advanced_networking
147
+ - functional-tests/networking/networking_spec.rb
148
+ - functional-tests/rsync/Vagrantfile.advanced_networking
149
+ - functional-tests/rsync/rsync_spec.rb
150
+ - functional-tests/vmlifecycle/Vagrantfile.advanced_networking
151
+ - functional-tests/vmlifecycle/vmlifecycle_spec.rb
152
+ - lib/vagrant-cosmic.rb
153
+ - lib/vagrant-cosmic/action.rb
154
+ - lib/vagrant-cosmic/action/connect_cosmic.rb
155
+ - lib/vagrant-cosmic/action/is_created.rb
156
+ - lib/vagrant-cosmic/action/is_stopped.rb
157
+ - lib/vagrant-cosmic/action/message_already_created.rb
158
+ - lib/vagrant-cosmic/action/message_not_created.rb
159
+ - lib/vagrant-cosmic/action/message_will_not_destroy.rb
160
+ - lib/vagrant-cosmic/action/read_rdp_info.rb
161
+ - lib/vagrant-cosmic/action/read_ssh_info.rb
162
+ - lib/vagrant-cosmic/action/read_state.rb
163
+ - lib/vagrant-cosmic/action/read_transport_info.rb
164
+ - lib/vagrant-cosmic/action/read_winrm_info.rb
165
+ - lib/vagrant-cosmic/action/run_instance.rb
166
+ - lib/vagrant-cosmic/action/start_instance.rb
167
+ - lib/vagrant-cosmic/action/stop_instance.rb
168
+ - lib/vagrant-cosmic/action/terminate_instance.rb
169
+ - lib/vagrant-cosmic/action/timed_provision.rb
170
+ - lib/vagrant-cosmic/action/wait_for_state.rb
171
+ - lib/vagrant-cosmic/action/warn_networks.rb
172
+ - lib/vagrant-cosmic/capabilities/rdp.rb
173
+ - lib/vagrant-cosmic/capabilities/winrm.rb
174
+ - lib/vagrant-cosmic/config.rb
175
+ - lib/vagrant-cosmic/errors.rb
176
+ - lib/vagrant-cosmic/exceptions/exceptions.rb
177
+ - lib/vagrant-cosmic/model/cosmic_resource.rb
178
+ - lib/vagrant-cosmic/plugin.rb
179
+ - lib/vagrant-cosmic/provider.rb
180
+ - lib/vagrant-cosmic/service/cosmic_resource_service.rb
181
+ - lib/vagrant-cosmic/util/timer.rb
182
+ - lib/vagrant-cosmic/version.rb
183
+ - locales/en.yml
184
+ - spec/spec_helper.rb
185
+ - spec/vagrant-cosmic/action/read_ssh_info_spec.rb
186
+ - spec/vagrant-cosmic/action/retrieve_public_ip_port_spec.rb
187
+ - spec/vagrant-cosmic/action/run_instance_spec.rb
188
+ - spec/vagrant-cosmic/action/terminate_instance_spec.rb
189
+ - spec/vagrant-cosmic/config_spec.rb
190
+ - spec/vagrant-cosmic/model/cosmic_resource_spec.rb
191
+ - spec/vagrant-cosmic/service/cosmic_resource_service_spec.rb
192
+ - spec/vagrant-cosmic/support/be_a_resource.rb
193
+ - vagrant-cosmic.gemspec
194
+ - vagrant-cosmic.spec
195
+ homepage: https://github.com/MissionCriticalCloud/vagrant-cosmic/
196
+ licenses:
197
+ - MIT
198
+ metadata: {}
199
+ post_install_message:
200
+ rdoc_options: []
201
+ require_paths:
202
+ - lib
203
+ required_ruby_version: !ruby/object:Gem::Requirement
204
+ requirements:
205
+ - - ">="
206
+ - !ruby/object:Gem::Version
207
+ version: '0'
208
+ required_rubygems_version: !ruby/object:Gem::Requirement
209
+ requirements:
210
+ - - ">="
211
+ - !ruby/object:Gem::Version
212
+ version: 1.3.6
213
+ requirements: []
214
+ rubygems_version: 3.0.3
215
+ signing_key:
216
+ specification_version: 4
217
+ summary: Enables Vagrant to manage machines in Cosmic.
218
+ test_files: []