vmpooler 0.9.0 → 0.9.1
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/lib/vmpooler/pool_manager.rb +11 -2
- data/lib/vmpooler/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 09dd1d718bab583f033ebc481fbfd9f7041c8d9d039dd20c6df4b4e55e1e477c
|
4
|
+
data.tar.gz: aebd0b6ec5fe9101a65182c40237cb80bbb99c0debf86ea469955d2ad0529d5a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0f2393c6caf7a36dfa58837e30d6f57a804ede99b53b26096c70c0fdfdee21871432ca82f346b5a92a8a5cb597ce79b357f003c5047ba18406eef3b73bb8f637
|
7
|
+
data.tar.gz: 192f1fde3e83f5a53a46d08572955295a7f64747d73ece4f0a2b5306f9de7a92ff09ca1dc13e4be236526185694dda9365d39706d7f521fd769a54c1b6358a60
|
@@ -269,8 +269,17 @@ module Vmpooler
|
|
269
269
|
end
|
270
270
|
|
271
271
|
def generate_and_check_hostname(pool_name)
|
272
|
-
# Generate a randomized hostname
|
273
|
-
|
272
|
+
# Generate a randomized hostname. The total name must no longer than 15
|
273
|
+
# character including the hyphen. The shortest adjective in the corpus is
|
274
|
+
# three characters long. Therefore, we can technically select a noun up to 11
|
275
|
+
# characters long and still be guaranteed to have an available adjective.
|
276
|
+
# Because of the limited set of 11 letter nouns and corresponding 3
|
277
|
+
# letter adjectives, we actually limit the noun to 10 letters to avoid
|
278
|
+
# inviting more conflicts. We favor selecting a longer noun rather than a
|
279
|
+
# longer adjective because longer adjectives tend to be less fun.
|
280
|
+
noun = @name_generator.noun(max: 10)
|
281
|
+
adjective = @name_generator.adjective(max: 14-noun.length)
|
282
|
+
random_name = [adjective, noun].join('-')
|
274
283
|
hostname = $config[:config]['prefix'] + random_name
|
275
284
|
available = $redis.hlen('vmpooler__vm__' + hostname) == 0
|
276
285
|
|
data/lib/vmpooler/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vmpooler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Puppet
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-01-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pickup
|