vagrant-subutai 1.0.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 +7 -0
- data/.gitignore +21 -0
- data/Gemfile +7 -0
- data/README.md +52 -0
- data/Rakefile +9 -0
- data/Vagrantfile +7 -0
- data/lib/vagrant-subutai.rb +12 -0
- data/lib/vagrant-subutai/command.rb +142 -0
- data/lib/vagrant-subutai/config.rb +52 -0
- data/lib/vagrant-subutai/models/resource_host.rb +7 -0
- data/lib/vagrant-subutai/packer/subutai_config.rb +380 -0
- data/lib/vagrant-subutai/packer/subutai_hooks.rb +62 -0
- data/lib/vagrant-subutai/packer/subutai_net.rb +125 -0
- data/lib/vagrant-subutai/plugin.rb +20 -0
- data/lib/vagrant-subutai/rest.rb +77 -0
- data/lib/vagrant-subutai/rh_controller.rb +32 -0
- data/lib/vagrant-subutai/subutai_commands.rb +215 -0
- data/lib/vagrant-subutai/version.rb +3 -0
- data/lib/vagrant_init.rb +1 -0
- data/test/.rubocop.yml +14 -0
- data/test/bad_snap_script.sh +1 -0
- data/test/snap_script.sh +3 -0
- data/test/subutai0.yaml +1 -0
- data/test/subutai1.yaml +11 -0
- data/test/subutai2.yaml +10 -0
- data/test/subutai_config_test.rb +445 -0
- data/test/subutai_hooks_test.rb +16 -0
- data/test/subutai_net_test.rb +34 -0
- data/vagrant-subutai.gemspec +22 -0
- data/vagrant-subutai.iml +9 -0
- metadata +110 -0
@@ -0,0 +1,34 @@
|
|
1
|
+
require 'test/unit'
|
2
|
+
require_relative '../lib/subutai_cli/packer/subutai_net'
|
3
|
+
|
4
|
+
# Tests the subutai_net module
|
5
|
+
class SubutaiNetTest < Test::Unit::TestCase
|
6
|
+
# Called before every test method runs. Can be used
|
7
|
+
# to set up fixture information.
|
8
|
+
def setup
|
9
|
+
# Do nothing
|
10
|
+
end
|
11
|
+
|
12
|
+
# Called after every test method runs. Can be used to tear
|
13
|
+
# down fixture information.
|
14
|
+
|
15
|
+
def teardown
|
16
|
+
# Do nothing
|
17
|
+
end
|
18
|
+
|
19
|
+
def test_find_port
|
20
|
+
raise "port was #{port}: should have been 2000 or greater" if \
|
21
|
+
find_port(2000) < 2000
|
22
|
+
end
|
23
|
+
|
24
|
+
def test_find_mac
|
25
|
+
find_mac(:virtualbox)
|
26
|
+
end
|
27
|
+
|
28
|
+
def test_failure
|
29
|
+
assert_false(port_bound?('127.0.0.1', 1))
|
30
|
+
assert_raise do
|
31
|
+
port_bound?('abc', 0)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
lib = File.expand_path('../lib', __FILE__)
|
2
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
|
+
require_relative 'lib/vagrant-subutai/version'
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = 'vagrant-subutai'
|
7
|
+
spec.version = VagrantSubutai::VERSION
|
8
|
+
spec.authors = ["Subutai"]
|
9
|
+
spec.email = "info@subutai.io"
|
10
|
+
spec.summary = ["Subutai CLI. Execute subutai commands outside the Vagrant box"]
|
11
|
+
spec.description = "Part of Subutai Tooling"
|
12
|
+
spec.homepage = "https://github.com/subutai-io/vagrant"
|
13
|
+
spec.homepage = "https://subutai.io"
|
14
|
+
spec.metadata = { "source_code_uri" => "https://github.com/subutai-io/vagrant" }
|
15
|
+
|
16
|
+
spec.files = `git ls-files`.split($/)
|
17
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
18
|
+
spec.require_paths = ['lib']
|
19
|
+
|
20
|
+
spec.add_development_dependency 'bundler', '~> 1.3'
|
21
|
+
spec.add_development_dependency 'rake', '~> 0'
|
22
|
+
end
|
data/vagrant-subutai.iml
ADDED
@@ -0,0 +1,9 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<module type="RUBY_MODULE" version="4">
|
3
|
+
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
4
|
+
<exclude-output />
|
5
|
+
<content url="file://$MODULE_DIR$" />
|
6
|
+
<orderEntry type="inheritedJdk" />
|
7
|
+
<orderEntry type="sourceFolder" forTests="false" />
|
8
|
+
</component>
|
9
|
+
</module>
|
metadata
ADDED
@@ -0,0 +1,110 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: vagrant-subutai
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Subutai
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2018-02-05 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ~>
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.3'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ~>
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.3'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ~>
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ~>
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
description: Part of Subutai Tooling
|
42
|
+
email: info@subutai.io
|
43
|
+
executables: []
|
44
|
+
extensions: []
|
45
|
+
extra_rdoc_files: []
|
46
|
+
files:
|
47
|
+
- .gitignore
|
48
|
+
- Gemfile
|
49
|
+
- README.md
|
50
|
+
- Rakefile
|
51
|
+
- Vagrantfile
|
52
|
+
- build.sh
|
53
|
+
- lib/vagrant-subutai.rb
|
54
|
+
- lib/vagrant-subutai/command.rb
|
55
|
+
- lib/vagrant-subutai/config.rb
|
56
|
+
- lib/vagrant-subutai/models/resource_host.rb
|
57
|
+
- lib/vagrant-subutai/packer/subutai_config.rb
|
58
|
+
- lib/vagrant-subutai/packer/subutai_hooks.rb
|
59
|
+
- lib/vagrant-subutai/packer/subutai_net.rb
|
60
|
+
- lib/vagrant-subutai/plugin.rb
|
61
|
+
- lib/vagrant-subutai/rest.rb
|
62
|
+
- lib/vagrant-subutai/rh_controller.rb
|
63
|
+
- lib/vagrant-subutai/subutai_commands.rb
|
64
|
+
- lib/vagrant-subutai/version.rb
|
65
|
+
- lib/vagrant_init.rb
|
66
|
+
- test/.rubocop.yml
|
67
|
+
- test/bad_snap_script.sh
|
68
|
+
- test/snap_script.sh
|
69
|
+
- test/subutai0.yaml
|
70
|
+
- test/subutai1.yaml
|
71
|
+
- test/subutai2.yaml
|
72
|
+
- test/subutai_config_test.rb
|
73
|
+
- test/subutai_hooks_test.rb
|
74
|
+
- test/subutai_net_test.rb
|
75
|
+
- vagrant-subutai.gemspec
|
76
|
+
- vagrant-subutai.iml
|
77
|
+
homepage: https://subutai.io
|
78
|
+
licenses: []
|
79
|
+
metadata:
|
80
|
+
source_code_uri: https://github.com/subutai-io/vagrant
|
81
|
+
post_install_message:
|
82
|
+
rdoc_options: []
|
83
|
+
require_paths:
|
84
|
+
- lib
|
85
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - '>='
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
91
|
+
requirements:
|
92
|
+
- - '>='
|
93
|
+
- !ruby/object:Gem::Version
|
94
|
+
version: '0'
|
95
|
+
requirements: []
|
96
|
+
rubyforge_project:
|
97
|
+
rubygems_version: 2.0.14.1
|
98
|
+
signing_key:
|
99
|
+
specification_version: 4
|
100
|
+
summary: '["Subutai CLI. Execute subutai commands outside the Vagrant box"]'
|
101
|
+
test_files:
|
102
|
+
- test/.rubocop.yml
|
103
|
+
- test/bad_snap_script.sh
|
104
|
+
- test/snap_script.sh
|
105
|
+
- test/subutai0.yaml
|
106
|
+
- test/subutai1.yaml
|
107
|
+
- test/subutai2.yaml
|
108
|
+
- test/subutai_config_test.rb
|
109
|
+
- test/subutai_hooks_test.rb
|
110
|
+
- test/subutai_net_test.rb
|