kitchen-vmpool 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8e0a7a42b3db814a96216aaa4292bef0fa20b866
4
- data.tar.gz: 405f15c69be0901b3fd7d6d3450fa7eeea54ac02
3
+ metadata.gz: 7869a48f15c969c13245f666431ba7e2abb74f0e
4
+ data.tar.gz: a13cdd5ec5d9605770f0bd62fb0efffca68a0baf
5
5
  SHA512:
6
- metadata.gz: 6a5e6bdc0e6e2235b76b52bb4331a5bc088372c6430e4af37d29f87e0b0aa2d77efe42ced1c061904eafb21642c29afe91d81803d8999e329b3675f51729058b
7
- data.tar.gz: b0eec9a6b626562359f18293310938471ddf094ce15009b8a8a8ab6da4ae3d4eefca8255aa295dfff75dac971e2e58dec6dddfadc57ac649a45401fb7ff4316a
6
+ metadata.gz: 7fde87b12f5a35231eb14d8c30db4b15f8c0ef724d46318c132d7f345346a414eb759458ec4b9995da8ed89db3f57c54761d956d39448e878969a1e7a7bf131e
7
+ data.tar.gz: bab5e2011b01b74392943118990382b67e06cdda35484415eef43f35a9c41c14d138475263a0c1b834a057b288dc57563272ee49e1406847b785d661e9ba973d
data/CHANGELOG.md CHANGED
@@ -1,7 +1,8 @@
1
1
  # Kitchen-Vmpool
2
2
 
3
- ## Unreleased
4
-
3
+ ## v0.3.1
4
+ * Ensures CRUD methods are public
5
+
5
6
  ## v0.3.0
6
7
  * Major refactor of file based stores
7
8
  * changes instances to size
@@ -148,7 +148,7 @@ module VraUtilities
148
148
  {
149
149
  cpus: template_data['data']['Machine']['data']['cpu'] || 2,
150
150
  memory: template_data['data']['Machine']['data']['memory'] || 4096,
151
- requested_for: ENV['VRA_USER']
151
+ requested_for: ENV['VRA_USER'],
152
152
  lease_days: 2,
153
153
  notes: 'VRA Server Pool Test',
154
154
  subtenant_id: template_data['businessGroupId']
data/exe/vra_create_pool CHANGED
@@ -147,7 +147,7 @@ OptionParser.new do |opts|
147
147
  Summary: A tool used to create a pool of vra systems
148
148
 
149
149
  Example:
150
- #{__FILE__} -f pool_file.yaml -p 33 -f vmpool
150
+ #{File.basename(__FILE__)} -p 33 -f vmpool
151
151
 
152
152
  If you wish to store the config in a file, this script will read vmpool_config.yaml
153
153
  for the same configs.
@@ -34,6 +34,33 @@ module Kitchen
34
34
  @pool_data ||= YAML.load(read_content)
35
35
  end
36
36
 
37
+ def update(content = nil)
38
+ #info("Updating vmpool data")
39
+ write_content(content)
40
+ read
41
+ end
42
+
43
+ def create
44
+ #info("Creating new vmpool data")
45
+ write_content(base_content)
46
+ read
47
+ end
48
+
49
+ def read
50
+ #info("Reading vmpool data")
51
+ read_content
52
+ end
53
+
54
+ def reread
55
+ pool_data(true)
56
+ end
57
+
58
+ def save
59
+ #info("Saving vmpool data")
60
+ write_content
61
+ read
62
+ end
63
+
37
64
  private
38
65
 
39
66
  # @return Array[String] - a list of pool names
@@ -72,33 +99,6 @@ module Kitchen
72
99
  save
73
100
  used_hosts(pool_name)
74
101
  end
75
-
76
- def update(content = nil)
77
- #info("Updating vmpool data")
78
- write_content(content)
79
- read
80
- end
81
-
82
- def create
83
- #info("Creating new vmpool data")
84
- write_content(base_content)
85
- read
86
- end
87
-
88
- def read
89
- #info("Reading vmpool data")
90
- read_content
91
- end
92
-
93
- def reread
94
- pool_data(true)
95
- end
96
-
97
- def save
98
- #info("Saving vmpool data")
99
- write_content
100
- read
101
- end
102
102
 
103
103
  def read_content
104
104
  raise NotImplementedError
@@ -21,8 +21,6 @@ module Kitchen
21
21
  @branch = 'master'
22
22
  end
23
23
 
24
- private
25
-
26
24
  def update(content = nil)
27
25
  #info("Updating vmpool data")
28
26
  update_file
@@ -41,6 +39,9 @@ module Kitchen
41
39
  read
42
40
  end
43
41
 
42
+ private
43
+
44
+
44
45
  def file_exists?(project = project_id, file = pool_file)
45
46
  read_content(project, file)
46
47
  end
@@ -18,8 +18,6 @@ module Kitchen
18
18
  @pool_file = options['pool_file']
19
19
  end
20
20
 
21
- private
22
-
23
21
  def update(content = nil)
24
22
  #info("Updating vmpool data")
25
23
  update_snippet
@@ -39,6 +37,8 @@ module Kitchen
39
37
  read
40
38
  end
41
39
 
40
+ private
41
+
42
42
  def snippet_exists?(project = project_id)
43
43
  return false unless snippet_id
44
44
  client.snippets(project, {
@@ -1,3 +1,3 @@
1
1
  module KitchenVmpool
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kitchen-vmpool
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Corey Osman
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-09-08 00:00:00.000000000 Z
11
+ date: 2017-09-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gitlab
@@ -70,7 +70,7 @@ description: When you need to create pools of vms and manage them with test kitc
70
70
  email:
71
71
  - corey@nwops.io
72
72
  executables:
73
- - vra_create.rb
73
+ - vra_create
74
74
  - vra_create_pool
75
75
  extensions: []
76
76
  extra_rdoc_files: []
@@ -86,7 +86,7 @@ files:
86
86
  - Rakefile
87
87
  - bin/console
88
88
  - bin/setup
89
- - exe/vra_create.rb
89
+ - exe/vra_create
90
90
  - exe/vra_create_pool
91
91
  - kitchen-vmpool.gemspec
92
92
  - lib/kitchen-vmpool/version.rb