vaquero_io_provider_template 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +19 -0
- data/.rubocop.yml +11 -0
- data/.travis.yml +6 -0
- data/Gemfile +5 -0
- data/Gemfile.lock +60 -0
- data/README.md +10 -0
- data/Rakefile +11 -0
- data/lib/vaquero_io_provider_template/providerfile.yml +73 -0
- data/lib/vaquero_io_provider_template/version.rb +8 -0
- data/lib/vaquero_io_provider_template.rb +32 -0
- data/spec/spec_helper.rb +4 -0
- data/spec/version_spec.rb +34 -0
- data/vaquero_io_provider_template.gemspec +25 -0
- metadata +118 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 916b9ab93cf1d12594fcd5237bd388102c6900b8
|
4
|
+
data.tar.gz: ff88319361f1d4d54eac8bd6b2b0eadeecb78cb4
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: d5a401cd2c635f58c8f42a3a64e57a5ebb4f2c8c84493a1787f7c3df1cea7bf13db64fe9323b34a7eb812ef33f9831941b7868f97070dcc35f8dd18235ee6a87
|
7
|
+
data.tar.gz: 331fbe2264bde7ea09636d7c82fc175b48d4aa2e9d2af4b900d73861c0aa3f6c44b2dbe8656a2f9ef18303f2177d45afe3c89eb631642ee6be5acf3f4d85e7b2
|
data/.gitignore
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
*.gem
|
2
|
+
/coverage/
|
3
|
+
/InstalledFiles
|
4
|
+
/pkg/
|
5
|
+
/spec/reports/
|
6
|
+
/tmp/
|
7
|
+
|
8
|
+
## Documentation cache and generated files:
|
9
|
+
/.yardoc/
|
10
|
+
/_yardoc/
|
11
|
+
/doc/
|
12
|
+
/rdoc/
|
13
|
+
|
14
|
+
## Environment normalisation:
|
15
|
+
/.bundle/
|
16
|
+
/vendor/bundle
|
17
|
+
/lib/bundler/man/
|
18
|
+
.ruby-version
|
19
|
+
.idea/
|
data/.rubocop.yml
ADDED
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,60 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
vaquero_io_provider_template (2.0.0)
|
5
|
+
|
6
|
+
GEM
|
7
|
+
remote: https://rubygems.org/
|
8
|
+
specs:
|
9
|
+
ast (2.1.0)
|
10
|
+
astrolabe (1.3.1)
|
11
|
+
parser (~> 2.2)
|
12
|
+
codeclimate-test-reporter (0.4.7)
|
13
|
+
simplecov (>= 0.7.1, < 1.0.0)
|
14
|
+
diff-lcs (1.2.5)
|
15
|
+
docile (1.1.5)
|
16
|
+
json (1.8.3)
|
17
|
+
parser (2.2.2.6)
|
18
|
+
ast (>= 1.1, < 3.0)
|
19
|
+
powerpack (0.1.1)
|
20
|
+
rainbow (2.0.0)
|
21
|
+
rake (10.4.2)
|
22
|
+
rspec (3.3.0)
|
23
|
+
rspec-core (~> 3.3.0)
|
24
|
+
rspec-expectations (~> 3.3.0)
|
25
|
+
rspec-mocks (~> 3.3.0)
|
26
|
+
rspec-core (3.3.2)
|
27
|
+
rspec-support (~> 3.3.0)
|
28
|
+
rspec-expectations (3.3.1)
|
29
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
30
|
+
rspec-support (~> 3.3.0)
|
31
|
+
rspec-mocks (3.3.2)
|
32
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
33
|
+
rspec-support (~> 3.3.0)
|
34
|
+
rspec-support (3.3.0)
|
35
|
+
rubocop (0.33.0)
|
36
|
+
astrolabe (~> 1.3)
|
37
|
+
parser (>= 2.2.2.5, < 3.0)
|
38
|
+
powerpack (~> 0.1)
|
39
|
+
rainbow (>= 1.99.1, < 3.0)
|
40
|
+
ruby-progressbar (~> 1.4)
|
41
|
+
ruby-progressbar (1.7.5)
|
42
|
+
simplecov (0.10.0)
|
43
|
+
docile (~> 1.1.0)
|
44
|
+
json (~> 1.8)
|
45
|
+
simplecov-html (~> 0.10.0)
|
46
|
+
simplecov-html (0.10.0)
|
47
|
+
|
48
|
+
PLATFORMS
|
49
|
+
ruby
|
50
|
+
|
51
|
+
DEPENDENCIES
|
52
|
+
bundler (~> 1.7)
|
53
|
+
codeclimate-test-reporter
|
54
|
+
rake (~> 10.0)
|
55
|
+
rspec (~> 3.0)
|
56
|
+
rubocop (~> 0.30)
|
57
|
+
vaquero_io_provider_template!
|
58
|
+
|
59
|
+
BUNDLED WITH
|
60
|
+
1.10.5
|
data/README.md
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
[![Build Status](https://travis-ci.org/vaquero-io/vaquero_io_provider_template.svg?branch=master)](https://travis-ci.org/vaquero-io/vaquero_io_provider_template)
|
2
|
+
[![Code Climate](https://codeclimate.com/github/vaquero-io/vaquero_io_provider_template/badges/gpa.svg)](https://codeclimate.com/github/vaquero-io/vaquero_io_provider_template)
|
3
|
+
[![Test Coverage](https://codeclimate.com/github/vaquero-io/vaquero_io_provider_template/badges/coverage.svg)](https://codeclimate.com/github/vaquero-io/vaquero_io_provider_template/coverage)
|
4
|
+
[![Dependency Status](https://gemnasium.com/vaquero-io/vaquero_io_provider_template.png?travis)](https://gemnasium.com/vaquero-io/vaquero_io_provider_template)
|
5
|
+
# vaquero_io_provider_template
|
6
|
+
Documentation on the vaquero.io site describes how to use this template to create provider gems
|
7
|
+
to use with vaquero_io.
|
8
|
+
|
9
|
+
### Getting started
|
10
|
+
|
data/Rakefile
ADDED
@@ -0,0 +1,73 @@
|
|
1
|
+
provider:
|
2
|
+
|
3
|
+
infrastructure:
|
4
|
+
- vcenter
|
5
|
+
- network
|
6
|
+
- compute
|
7
|
+
|
8
|
+
platform:
|
9
|
+
count:
|
10
|
+
type: integer
|
11
|
+
range: 1..40
|
12
|
+
cmserver:
|
13
|
+
type: URL
|
14
|
+
cmrunlist:
|
15
|
+
array:
|
16
|
+
type: string
|
17
|
+
match: '(role|recipe)\[([-_a-zA-Z0-9#]+)\]'
|
18
|
+
addresses:
|
19
|
+
array:
|
20
|
+
type: IP
|
21
|
+
|
22
|
+
vcenter:
|
23
|
+
timezone:
|
24
|
+
type: integer
|
25
|
+
range: 0..300
|
26
|
+
datacenter:
|
27
|
+
type: URL
|
28
|
+
imagefolder:
|
29
|
+
type: string
|
30
|
+
match: '((?:[a-zA-Z]\:){0,1}(?:[\w.]+){1,})'
|
31
|
+
destfolder:
|
32
|
+
type: string
|
33
|
+
match: '((?:[a-zA-Z]\:){0,1}(?:[\w.]+){1,})'
|
34
|
+
datastore:
|
35
|
+
type: string
|
36
|
+
match: '\A(?:[ \w-]+\/?)+\z'
|
37
|
+
domain:
|
38
|
+
type: string
|
39
|
+
match: '((?:[a-zA-Z]\:){0,1}(?:[\w.]+){1,})'
|
40
|
+
dnsips:
|
41
|
+
array:
|
42
|
+
type: IP
|
43
|
+
|
44
|
+
network:
|
45
|
+
vlanid:
|
46
|
+
type: string
|
47
|
+
match: '\A(?:[\w-]+\/?)+\z'
|
48
|
+
gateway:
|
49
|
+
type: IP
|
50
|
+
netmask:
|
51
|
+
type: integer
|
52
|
+
range: 1..24
|
53
|
+
|
54
|
+
compute:
|
55
|
+
windows:
|
56
|
+
type: boolean
|
57
|
+
ram:
|
58
|
+
type: integer
|
59
|
+
range: 128..262144
|
60
|
+
cpu:
|
61
|
+
type: integer
|
62
|
+
range: 1..16
|
63
|
+
image:
|
64
|
+
type: string
|
65
|
+
match: '\A(?:[.\w-]+\/?)+\z'
|
66
|
+
disk:
|
67
|
+
hash:
|
68
|
+
mount:
|
69
|
+
type: string
|
70
|
+
match: '((?:[a-zA-Z]\:){0,1}(?:[\w.]+){1,})'
|
71
|
+
capacity:
|
72
|
+
type: integer
|
73
|
+
range: 4096..2048000
|
@@ -0,0 +1,32 @@
|
|
1
|
+
require 'vaquero_io_provider_template/version'
|
2
|
+
|
3
|
+
module VaqueroIo
|
4
|
+
# this module will be extended to ProviderPlugin class in vaquero_io
|
5
|
+
module ProviderPluginExtensions
|
6
|
+
def create(args, options = nil)
|
7
|
+
"create function with arguments:#{args} and options:#{options}"
|
8
|
+
end
|
9
|
+
|
10
|
+
def destroy(args, options = nil)
|
11
|
+
"destroy function with arguments:#{args} and options:#{options}"
|
12
|
+
end
|
13
|
+
|
14
|
+
def name
|
15
|
+
VaqueroIo::ProviderPluginExtensions::PLUGIN_NAME
|
16
|
+
end
|
17
|
+
|
18
|
+
def version
|
19
|
+
VaqueroIo::ProviderPluginExtensions::VERSION
|
20
|
+
end
|
21
|
+
|
22
|
+
def definition(test_path = nil)
|
23
|
+
gem_root ||= Pathname.new(File.expand_path('../../../', __FILE__))
|
24
|
+
template_path = VaqueroIo::ProviderPluginExtensions::PLUGIN_NAME + '-' +
|
25
|
+
VaqueroIo::ProviderPluginExtensions::VERSION + '/lib/' +
|
26
|
+
VaqueroIo::ProviderPluginExtensions::PLUGIN_NAME
|
27
|
+
providerfile_path = gem_root + template_path + 'providerfile.yml'
|
28
|
+
providerfile_path = test_path + 'providerfile.yml' if test_path
|
29
|
+
YAML.load_file(providerfile_path)
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'pathname'
|
3
|
+
require 'yaml'
|
4
|
+
require 'vaquero_io_provider_template'
|
5
|
+
|
6
|
+
describe 'base provider' do
|
7
|
+
let(:test_class) { Class.new { extend VaqueroIo::ProviderPluginExtensions } }
|
8
|
+
let(:providerfile) do
|
9
|
+
Pathname.new(File.expand_path('../../../', __FILE__)) +
|
10
|
+
'vaquero_io_provider_template' + 'lib/' + 'vaquero_io_provider_template'
|
11
|
+
end
|
12
|
+
|
13
|
+
it '.version should return the version' do
|
14
|
+
expect(test_class.version).to eq '2.0.0'
|
15
|
+
end
|
16
|
+
|
17
|
+
it '.name should return the name' do
|
18
|
+
expect(test_class.name).to eq 'vaquero_io_provider_template'
|
19
|
+
end
|
20
|
+
|
21
|
+
it '.create method should exist' do
|
22
|
+
expect(test_class.create('arguments', 'options')).to eq \
|
23
|
+
'create function with arguments:arguments and options:options'
|
24
|
+
end
|
25
|
+
|
26
|
+
it '.destroy method should exist' do
|
27
|
+
expect(test_class.destroy('arguments', 'options')).to eq \
|
28
|
+
'destroy function with arguments:arguments and options:options'
|
29
|
+
end
|
30
|
+
|
31
|
+
it '.definition should load providerfile.yml without error' do
|
32
|
+
expect { test_class.definition(providerfile) }.to_not raise_error
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
lib = File.expand_path('../lib', __FILE__)
|
2
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
|
+
require 'vaquero_io_provider_template/version'
|
4
|
+
Gem::Specification.new do |gem|
|
5
|
+
gem.name = VaqueroIo::ProviderPluginExtensions::PLUGIN_NAME
|
6
|
+
gem.version = VaqueroIo::ProviderPluginExtensions::VERSION
|
7
|
+
gem.authors = ['Nic Cheneweth', 'Gregory Ruiz-ade']
|
8
|
+
gem.email = ['Nic.Cheneweth@thoughtworks.com',
|
9
|
+
'gregory.ruiz-ade@activenetwork.com']
|
10
|
+
gem.summary = 'Reference provider plugin gem template'
|
11
|
+
gem.description = 'Provider plugin gem framework with required module method and \
|
12
|
+
basic testing structure for creating custom vaquero_io providers'
|
13
|
+
gem.license = 'Apache 2.0'
|
14
|
+
gem.homepage = 'http://vaquero.io/'
|
15
|
+
|
16
|
+
gem.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR)
|
17
|
+
gem.test_files = gem.files.grep(%r{/^\/(test|spec|features)/})
|
18
|
+
gem.require_paths = ['lib']
|
19
|
+
gem.required_ruby_version = '>= 2.0.0'
|
20
|
+
|
21
|
+
gem.add_development_dependency 'bundler', '~> 1.7'
|
22
|
+
gem.add_development_dependency 'rake', '~> 10.0'
|
23
|
+
gem.add_development_dependency 'rubocop', '~> 0.30'
|
24
|
+
gem.add_development_dependency 'rspec', '~> 3.0'
|
25
|
+
end
|
metadata
ADDED
@@ -0,0 +1,118 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: vaquero_io_provider_template
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 2.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Nic Cheneweth
|
8
|
+
- Gregory Ruiz-ade
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2015-09-26 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: bundler
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
requirements:
|
18
|
+
- - "~>"
|
19
|
+
- !ruby/object:Gem::Version
|
20
|
+
version: '1.7'
|
21
|
+
type: :development
|
22
|
+
prerelease: false
|
23
|
+
version_requirements: !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - "~>"
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
version: '1.7'
|
28
|
+
- !ruby/object:Gem::Dependency
|
29
|
+
name: rake
|
30
|
+
requirement: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - "~>"
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: '10.0'
|
35
|
+
type: :development
|
36
|
+
prerelease: false
|
37
|
+
version_requirements: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - "~>"
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: '10.0'
|
42
|
+
- !ruby/object:Gem::Dependency
|
43
|
+
name: rubocop
|
44
|
+
requirement: !ruby/object:Gem::Requirement
|
45
|
+
requirements:
|
46
|
+
- - "~>"
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: '0.30'
|
49
|
+
type: :development
|
50
|
+
prerelease: false
|
51
|
+
version_requirements: !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - "~>"
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: '0.30'
|
56
|
+
- !ruby/object:Gem::Dependency
|
57
|
+
name: rspec
|
58
|
+
requirement: !ruby/object:Gem::Requirement
|
59
|
+
requirements:
|
60
|
+
- - "~>"
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '3.0'
|
63
|
+
type: :development
|
64
|
+
prerelease: false
|
65
|
+
version_requirements: !ruby/object:Gem::Requirement
|
66
|
+
requirements:
|
67
|
+
- - "~>"
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '3.0'
|
70
|
+
description: |-
|
71
|
+
Provider plugin gem framework with required module method and \
|
72
|
+
basic testing structure for creating custom vaquero_io providers
|
73
|
+
email:
|
74
|
+
- Nic.Cheneweth@thoughtworks.com
|
75
|
+
- gregory.ruiz-ade@activenetwork.com
|
76
|
+
executables: []
|
77
|
+
extensions: []
|
78
|
+
extra_rdoc_files: []
|
79
|
+
files:
|
80
|
+
- ".gitignore"
|
81
|
+
- ".rubocop.yml"
|
82
|
+
- ".travis.yml"
|
83
|
+
- Gemfile
|
84
|
+
- Gemfile.lock
|
85
|
+
- README.md
|
86
|
+
- Rakefile
|
87
|
+
- lib/vaquero_io_provider_template.rb
|
88
|
+
- lib/vaquero_io_provider_template/providerfile.yml
|
89
|
+
- lib/vaquero_io_provider_template/version.rb
|
90
|
+
- spec/spec_helper.rb
|
91
|
+
- spec/version_spec.rb
|
92
|
+
- vaquero_io_provider_template.gemspec
|
93
|
+
homepage: http://vaquero.io/
|
94
|
+
licenses:
|
95
|
+
- Apache 2.0
|
96
|
+
metadata: {}
|
97
|
+
post_install_message:
|
98
|
+
rdoc_options: []
|
99
|
+
require_paths:
|
100
|
+
- lib
|
101
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
102
|
+
requirements:
|
103
|
+
- - ">="
|
104
|
+
- !ruby/object:Gem::Version
|
105
|
+
version: 2.0.0
|
106
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
requirements: []
|
112
|
+
rubyforge_project:
|
113
|
+
rubygems_version: 2.4.5
|
114
|
+
signing_key:
|
115
|
+
specification_version: 4
|
116
|
+
summary: Reference provider plugin gem template
|
117
|
+
test_files: []
|
118
|
+
has_rdoc:
|