vagrant-registration 1.2.2 → 1.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/Gemfile +14 -4
- data/README.md +58 -34
- data/Rakefile +8 -0
- data/lib/vagrant-registration/action/register.rb +10 -9
- data/lib/vagrant-registration/action/unregister_on_destroy.rb +5 -5
- data/lib/vagrant-registration/action/unregister_on_halt.rb +6 -6
- data/lib/vagrant-registration/config.rb +2 -2
- data/lib/vagrant-registration/plugin.rb +3 -7
- data/lib/vagrant-registration/version.rb +1 -1
- data/lib/vagrant-registration.rb +2 -0
- data/locales/en.yml +29 -0
- data/plugins/guests/redhat/cap/rhn_register.rb +4 -1
- data/plugins/guests/redhat/cap/subscription_manager.rb +4 -1
- data/vagrant-registration.gemspec +1 -2
- metadata +4 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7d0a262191ce340767417bd2f542b36d2e2f866c
|
4
|
+
data.tar.gz: 3e87e116bf9fbe99e0aeeebef4ea150d4b2afab9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ea8d8d230c3d3d1960fd518bc6670173f83cca21c62aff7a7c51c4e1d8e79eb3d95a7dc61fab7a2adb1622ba62e2ca434027943ce76604a222db31908dd3e19e
|
7
|
+
data.tar.gz: 03b3a92b92f327c7110bb71739b176f43f7878658b76f26e0b5d61852813b2edda0e64ca49a82e3a7296686f8e6284c6ba6875e8ade2cb13d0da5913f2938de9
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,13 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 1.2.3
|
4
|
+
|
5
|
+
- Issue #90 Use locale based messaging
|
6
|
+
- Issue #65 Adding cucumber tests for proxy settings
|
7
|
+
- Issue #65 Adding proxy options to rhn_register and subscription_manager
|
8
|
+
- Adding minitest as unit test framework and setting up basic test harness for Vagrant plugins
|
9
|
+
- Issue #65 Removing obsolete bash tests
|
10
|
+
|
3
11
|
## 1.2.2
|
4
12
|
|
5
13
|
- Introducing Cucumber based acceptance tests.
|
data/Gemfile
CHANGED
@@ -1,16 +1,26 @@
|
|
1
1
|
source 'https://rubygems.org'
|
2
2
|
|
3
|
-
gemspec
|
4
|
-
|
5
3
|
group :development do
|
6
|
-
gem 'vagrant',
|
7
|
-
|
4
|
+
gem 'vagrant',
|
5
|
+
:git => 'git://github.com/mitchellh/vagrant.git',
|
6
|
+
:ref => 'v1.8.4'
|
7
|
+
|
8
|
+
# test dependencies
|
9
|
+
gem 'minitest'
|
10
|
+
gem 'mocha'
|
11
|
+
|
8
12
|
gem 'cucumber', '~> 2.1'
|
9
13
|
gem 'aruba', '~> 0.13'
|
10
14
|
gem 'komenda', '~> 0.1.6'
|
11
15
|
gem 'launchy'
|
12
16
|
gem 'gem-compare'
|
13
17
|
gem 'mechanize'
|
18
|
+
|
19
|
+
# build tool
|
20
|
+
gem 'rake', '10.4.2'
|
21
|
+
gem 'yard'
|
22
|
+
|
23
|
+
# virtualization providers (for testing)
|
14
24
|
gem 'vagrant-vbguest'
|
15
25
|
gem 'vagrant-libvirt' if RUBY_PLATFORM =~ /linux/i
|
16
26
|
gem 'fog-libvirt', '0.0.3' if RUBY_PLATFORM =~ /linux/i # https://github.com/pradels/vagrant-libvirt/issues/568
|
data/README.md
CHANGED
@@ -4,8 +4,9 @@
|
|
4
4
|
|
5
5
|
- [Installation](#installation)
|
6
6
|
- [Usage](#usage)
|
7
|
-
- [
|
8
|
-
- [
|
7
|
+
- [General Configuration](#general-configuration)
|
8
|
+
- [Credential Configuration](#credential-configuration)
|
9
|
+
- [HTTP Proxy Configuration](#http-proxy-configuration)
|
9
10
|
- [subscription-manager Configuration](#subscription-manager-configuration)
|
10
11
|
- [subscription-manager Default Options](#subscription-manager-default-options)
|
11
12
|
- [subscription-manager Options Reference](#subscription-manager-options-reference)
|
@@ -14,7 +15,7 @@
|
|
14
15
|
- [rhn-register Options Reference](#rhn-register-options-reference)
|
15
16
|
- [Development](#development)
|
16
17
|
- [Tests](#tests)
|
17
|
-
- [
|
18
|
+
- [Minitest](#minitest)
|
18
19
|
- [Acceptance tests](#acceptance-tests)
|
19
20
|
- [Acknowledgements](#acknowledgements)
|
20
21
|
|
@@ -54,8 +55,8 @@ Vagrant.configure('2') do |config|
|
|
54
55
|
end
|
55
56
|
```
|
56
57
|
|
57
|
-
<a name="
|
58
|
-
###
|
58
|
+
<a name="general-configuration"></a>
|
59
|
+
### General Configuration
|
59
60
|
|
60
61
|
- **skip** skips the registration. If you wish to skip the registration process altogether, you can do so by setting a `skip` option to `true`:
|
61
62
|
|
@@ -75,8 +76,8 @@ end
|
|
75
76
|
config.registration.manager = 'subscription_manager'
|
76
77
|
```
|
77
78
|
|
78
|
-
<a name="
|
79
|
-
###
|
79
|
+
<a name="credential-configuration"></a>
|
80
|
+
### Credential Configuration
|
80
81
|
|
81
82
|
Setting up the credentials can be done as follows:
|
82
83
|
|
@@ -119,10 +120,32 @@ If you do not provide credentials, you will be prompted for them in the "up proc
|
|
119
120
|
Please note the the interactive mode asks you for the preferred registration pair only
|
120
121
|
of the configured manager.
|
121
122
|
|
123
|
+
<a name="http-proxy-configuration"></a>
|
124
|
+
### HTTP Proxy Configuration
|
125
|
+
|
126
|
+
HTTP Proxies can be configured via the _proxy_, _proxyUser_ and _proxyPassword_ configuration options:
|
127
|
+
|
128
|
+
```ruby
|
129
|
+
Vagrant.configure('2') do |config|
|
130
|
+
...
|
131
|
+
if Vagrant.has_plugin?('vagrant-registration')
|
132
|
+
config.registration.proxy = 'mongo:8080'
|
133
|
+
config.registration.proxyUser = 'flash'
|
134
|
+
config.registration.proxyPassword = 'zarkov'
|
135
|
+
end
|
136
|
+
...
|
137
|
+
end
|
138
|
+
```
|
139
|
+
|
140
|
+
As described in the [credentials configuration](#credentials-configuration) section, these settings
|
141
|
+
can also either be placed into the Vagrantfile in your Vagrant home directory or provided as
|
142
|
+
environment variables.
|
143
|
+
|
122
144
|
<a name="subscription-manager-configuration"></a>
|
123
145
|
### subscription-manager Configuration
|
124
146
|
|
125
|
-
vagrant-registration will use the `subscription_manager` manager by default or can be explicitly
|
147
|
+
vagrant-registration will use the `subscription_manager` manager by default or can be explicitly
|
148
|
+
configured by setting the `manager` option to `subscription_manager`:
|
126
149
|
|
127
150
|
```ruby
|
128
151
|
Vagrant.configure('2') do |config|
|
@@ -158,7 +181,8 @@ description).
|
|
158
181
|
config.registration.auto_attach = false
|
159
182
|
```
|
160
183
|
|
161
|
-
Note that the `auto_attach` option is set to false when using org/activationkey for registration
|
184
|
+
Note that the `auto_attach` option is set to false when using org/activationkey for registration
|
185
|
+
or if pools are specified.
|
162
186
|
|
163
187
|
<a name="subscription-manager-options-reference"></a>
|
164
188
|
#### subscription-manager Options Reference
|
@@ -216,6 +240,15 @@ Note that the `auto_attach` option is set to false when using org/activationkey
|
|
216
240
|
# Skip the registration (optional, skip if true, defaults to false)
|
217
241
|
config.registration.skip
|
218
242
|
|
243
|
+
# Specify a HTTP proxy to use. This config option if of the format [<host>|<ip>:<port>], eg mongo:8080
|
244
|
+
config.registration.proxy
|
245
|
+
|
246
|
+
# Specify a username to use with an authenticated HTTP proxy
|
247
|
+
config.registration.proxyUser
|
248
|
+
|
249
|
+
# Specify a password to use with an authenticated HTTP proxy
|
250
|
+
config.registration.proxyPassword
|
251
|
+
|
219
252
|
# Attach to specified pool(s) (optional)
|
220
253
|
#
|
221
254
|
# Example:
|
@@ -318,6 +351,15 @@ vagrant-registration supports most of the options of rhnreg_ks's command. You ca
|
|
318
351
|
|
319
352
|
# Skip the registration (optional, skip if true, defaults to false)
|
320
353
|
config.registration.skip
|
354
|
+
|
355
|
+
# Specify a HTTP proxy to use. This config option if of the format [<host>|<ip>:<port>], eg mongo:8080
|
356
|
+
config.registration.proxy
|
357
|
+
|
358
|
+
# Specify a username to use with an authenticated HTTP proxy
|
359
|
+
config.registration.proxyUser
|
360
|
+
|
361
|
+
# Specify a password to use with an authenticated HTTP proxy
|
362
|
+
config.registration.proxyPassword
|
321
363
|
```
|
322
364
|
|
323
365
|
<a name="development"></a>
|
@@ -326,40 +368,22 @@ vagrant-registration supports most of the options of rhnreg_ks's command. You ca
|
|
326
368
|
To install a development environment, clone the repo and prepare dependencies by
|
327
369
|
|
328
370
|
```
|
329
|
-
gem install bundler
|
371
|
+
gem install bundler
|
330
372
|
bundler install
|
331
373
|
```
|
332
374
|
|
333
|
-
The use of [RVM
|
375
|
+
The use of [RVM](https://rvm.io) is recommended. Verified to work with ruby 2.0.0p643.
|
334
376
|
|
335
377
|
<a name="tests"></a>
|
336
378
|
### Tests
|
337
379
|
|
338
|
-
<a name="
|
339
|
-
####
|
340
|
-
|
341
|
-
Tests currently test the plugin with `subscription-manager` and `rhn_register` on RHEL 7.1 guest and Fedora host. You need an imported RHEL 7.1 Vagrant box named `rhel-7.1`.
|
380
|
+
<a name="minitest"></a>
|
381
|
+
#### Minitest
|
342
382
|
|
343
|
-
|
383
|
+
The source contains a set of [Minitest](http://ruby-doc.org/stdlib-2.0.0/libdoc/minitest/rdoc/MiniTest.html)
|
384
|
+
unit tests. They can be run via:
|
344
385
|
|
345
|
-
|
346
|
-
export VAGRANT_REGISTRATION_MANAGER=
|
347
|
-
export VAGRANT_REGISTRATION_USERNAME=
|
348
|
-
export VAGRANT_REGISTRATION_PASSWORD=
|
349
|
-
export VAGRANT_REGISTRATION_ORG=
|
350
|
-
export VAGRANT_REGISTRATION_ACTIVATIONKEY=
|
351
|
-
export VAGRANT_REGISTRATION_SERVERURL=
|
352
|
-
export VAGRANT_REGISTRATION_CA_CERT=
|
353
|
-
./tests/run.sh
|
354
|
-
./tests/run_rhn_register.sh
|
355
|
-
```
|
356
|
-
|
357
|
-
To show the Vagrant output on the console during the tests run, set the `DEBUG`
|
358
|
-
environment variable on `1` before executing the test script:
|
359
|
-
|
360
|
-
```
|
361
|
-
export DEBUG=1
|
362
|
-
```
|
386
|
+
$ bundle exec rake test
|
363
387
|
|
364
388
|
<a name="acceptance-tests"></a>
|
365
389
|
#### Acceptance tests
|
data/Rakefile
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'bundler/gem_tasks'
|
2
2
|
require 'rake/clean'
|
3
|
+
require 'rake/testtask'
|
3
4
|
require 'cucumber/rake/task'
|
4
5
|
require 'yard'
|
5
6
|
require 'rubygems/comparator'
|
@@ -21,6 +22,13 @@ task :init do
|
|
21
22
|
FileUtils.mkdir_p 'build'
|
22
23
|
end
|
23
24
|
|
25
|
+
# Default test task
|
26
|
+
desc 'Run all unit tests'
|
27
|
+
Rake::TestTask.new do |t|
|
28
|
+
t.pattern = 'test/**/*_test.rb'
|
29
|
+
t.libs << 'test'
|
30
|
+
end
|
31
|
+
|
24
32
|
# Cucumber acceptance test tasks
|
25
33
|
Cucumber::Rake::Task.new(:features)
|
26
34
|
task :features => :init
|
@@ -17,14 +17,14 @@ module VagrantPlugins
|
|
17
17
|
guest = env[:machine].guest
|
18
18
|
|
19
19
|
if should_register?(machine, env[:ui])
|
20
|
-
env[:ui].info('
|
20
|
+
env[:ui].info I18n.t('registration.action.register.registration_info')
|
21
21
|
check_configuration_options(machine, env[:ui])
|
22
22
|
|
23
23
|
unless credentials_provided? machine
|
24
|
-
@logger.debug('
|
24
|
+
@logger.debug I18n.t('registration.action.register.no_credentials')
|
25
25
|
|
26
26
|
# Offer to register ATM or skip
|
27
|
-
register_now = env[:ui].ask('
|
27
|
+
register_now = env[:ui].ask I18n.t('registration.action.register.prompt')
|
28
28
|
|
29
29
|
if register_now == 'n'
|
30
30
|
config.skip = true
|
@@ -35,7 +35,7 @@ module VagrantPlugins
|
|
35
35
|
guest.capability(:registration_register, env[:ui]) unless config.skip
|
36
36
|
end
|
37
37
|
|
38
|
-
@logger.debug('
|
38
|
+
@logger.debug(I18n.t('registration.action.register.skip_due_config')) if config.skip
|
39
39
|
|
40
40
|
# Call next middleware in chain
|
41
41
|
@app.call(env)
|
@@ -59,8 +59,8 @@ module VagrantPlugins
|
|
59
59
|
options = machine.config.registration.conf.each_pair.map { |pair| pair[0] }
|
60
60
|
|
61
61
|
if unsupported_options_provided?(manager, available_options, options, ui)
|
62
|
-
ui.warn(
|
63
|
-
|
62
|
+
ui.warn(I18n.t('registration.action.register.options_support_warning',
|
63
|
+
manager: manager, options: available_options.join(', ')))
|
64
64
|
end
|
65
65
|
end
|
66
66
|
|
@@ -69,7 +69,8 @@ module VagrantPlugins
|
|
69
69
|
warned = false
|
70
70
|
options.each do |option|
|
71
71
|
unless available_options.include? option
|
72
|
-
ui.warn(
|
72
|
+
ui.warn(I18n.t('registration.action.register.unsupported_option',
|
73
|
+
manager: manager, option: option))
|
73
74
|
warned = true
|
74
75
|
end
|
75
76
|
end
|
@@ -83,7 +84,7 @@ module VagrantPlugins
|
|
83
84
|
guest.capability?(:registration_registered?)
|
84
85
|
true
|
85
86
|
else
|
86
|
-
@logger.debug('
|
87
|
+
@logger.debug I18n.t('registration.action.register.skip_missing_guest_capability')
|
87
88
|
false
|
88
89
|
end
|
89
90
|
end
|
@@ -93,7 +94,7 @@ module VagrantPlugins
|
|
93
94
|
if guest.capability(:registration_manager_installed, ui)
|
94
95
|
true
|
95
96
|
else
|
96
|
-
@logger.debug('
|
97
|
+
@logger.debug I18n.t('registration.action.manager_not_found')
|
97
98
|
false
|
98
99
|
end
|
99
100
|
end
|
@@ -15,17 +15,17 @@ module VagrantPlugins
|
|
15
15
|
guest = env[:machine].guest
|
16
16
|
|
17
17
|
if capabilities_provided?(guest) && manager_installed?(guest, env[:ui]) && !config.skip
|
18
|
-
env[:ui].info('
|
18
|
+
env[:ui].info I18n.t('registration.action.unregister.unregistration_info')
|
19
19
|
guest.capability(:registration_unregister)
|
20
20
|
end
|
21
21
|
|
22
|
-
@logger.debug('
|
22
|
+
@logger.debug(I18n.t('registration.action.unregister.skip_due_config')) if config.skip
|
23
23
|
@app.call(env)
|
24
24
|
|
25
25
|
# Guest might not be available after halting, so log the exception and continue
|
26
26
|
rescue => e
|
27
27
|
@logger.info(e)
|
28
|
-
@logger.debug('
|
28
|
+
@logger.debug I18n.t('registration.action.unregister.guest_unavailable')
|
29
29
|
@app.call(env)
|
30
30
|
end
|
31
31
|
|
@@ -36,7 +36,7 @@ module VagrantPlugins
|
|
36
36
|
if guest.capability?(:registration_unregister) && guest.capability?(:registration_manager_installed)
|
37
37
|
true
|
38
38
|
else
|
39
|
-
@logger.debug('
|
39
|
+
@logger.debug I18n.t('registration.action.unregister.skip_missing_guest_capability')
|
40
40
|
false
|
41
41
|
end
|
42
42
|
end
|
@@ -46,7 +46,7 @@ module VagrantPlugins
|
|
46
46
|
if guest.capability(:registration_manager_installed, ui)
|
47
47
|
true
|
48
48
|
else
|
49
|
-
@logger.debug('
|
49
|
+
@logger.debug I18n.t('registration.action.manager_not_found')
|
50
50
|
false
|
51
51
|
end
|
52
52
|
end
|
@@ -15,18 +15,18 @@ module VagrantPlugins
|
|
15
15
|
guest = env[:machine].guest
|
16
16
|
|
17
17
|
if capabilities_provided?(guest) && manager_installed?(guest, env[:ui]) && !config.skip && config.unregister_on_halt
|
18
|
-
env[:ui].info('
|
18
|
+
env[:ui].info I18n.t('registration.action.unregister.unregistration_info')
|
19
19
|
guest.capability(:registration_unregister)
|
20
20
|
end
|
21
21
|
|
22
|
-
@logger.debug('
|
23
|
-
@logger.debug('
|
22
|
+
@logger.debug(I18n.t('registration.action.unregister.skip_due_config')) if config.skip
|
23
|
+
@logger.debug(I18n.t('registration.action.unregister.skip_on_halt_due_config')) unless config.unregister_on_halt
|
24
24
|
@app.call(env)
|
25
25
|
|
26
26
|
# Guest might not be available after halting, so log the exception and continue
|
27
27
|
rescue => e
|
28
28
|
@logger.info(e)
|
29
|
-
@logger.debug('
|
29
|
+
@logger.debug I18n.t('registration.action.unregister.guest_unavailable')
|
30
30
|
@app.call(env)
|
31
31
|
end
|
32
32
|
|
@@ -37,7 +37,7 @@ module VagrantPlugins
|
|
37
37
|
if guest.capability?(:registration_unregister) && guest.capability?(:registration_manager_installed)
|
38
38
|
true
|
39
39
|
else
|
40
|
-
@logger.debug('
|
40
|
+
@logger.debug I18n.t('registration.action.unregister.skip_missing_guest_capability')
|
41
41
|
false
|
42
42
|
end
|
43
43
|
end
|
@@ -47,7 +47,7 @@ module VagrantPlugins
|
|
47
47
|
if guest.capability(:registration_manager_installed, ui)
|
48
48
|
true
|
49
49
|
else
|
50
|
-
@logger.debug('
|
50
|
+
@logger.debug I18n.t('registration.action.manager_not_found')
|
51
51
|
false
|
52
52
|
end
|
53
53
|
end
|
@@ -16,13 +16,13 @@ module VagrantPlugins
|
|
16
16
|
@conf.skip = false unless @conf.skip
|
17
17
|
# Unregister on halt by default
|
18
18
|
@conf.unregister_on_halt = true if @conf.unregister_on_halt.nil?
|
19
|
-
@logger.info
|
19
|
+
@logger.info I18n.t('registration.config.final_message', conf: @conf.inspect)
|
20
20
|
end
|
21
21
|
|
22
22
|
def method_missing(method_sym, *arguments, &block)
|
23
23
|
get_config
|
24
24
|
command = "@conf.#{method_sym} #{adjust_arguments(arguments)}"
|
25
|
-
@logger.info
|
25
|
+
@logger.info I18n.t('registration.config.method_missing_command', command: command)
|
26
26
|
eval command
|
27
27
|
end
|
28
28
|
|
@@ -7,14 +7,13 @@ end
|
|
7
7
|
# This is a sanity check to make sure no one is attempting to install
|
8
8
|
# this into an early Vagrant version.
|
9
9
|
if Vagrant::VERSION < '1.2.0'
|
10
|
-
fail '
|
10
|
+
fail I18n.t('registration.plugin.compatible_message')
|
11
11
|
end
|
12
12
|
|
13
13
|
module VagrantPlugins
|
14
14
|
module Registration
|
15
15
|
class Plugin < Vagrant.plugin('2')
|
16
16
|
class << self
|
17
|
-
|
18
17
|
# vagrant-vbguest plugin updates GuestAdditions for VirtualBox
|
19
18
|
# and therefore needs to be run after the box got registered.
|
20
19
|
# See https://github.com/projectatomic/adb-vagrant-registration/issues/69
|
@@ -57,11 +56,8 @@ module VagrantPlugins
|
|
57
56
|
end
|
58
57
|
end
|
59
58
|
|
60
|
-
name '
|
61
|
-
description
|
62
|
-
This plugin adds register and unregister functionality to Vagrant Guests that
|
63
|
-
support the capability
|
64
|
-
DESC
|
59
|
+
name I18n.t('registration.plugin.name')
|
60
|
+
description I18n.t('registration.plugin.description')
|
65
61
|
|
66
62
|
action_hook(:registration_register, :machine_action_up, &method(:register))
|
67
63
|
action_hook(:registration_register, :machine_action_provision, &method(:register))
|
data/lib/vagrant-registration.rb
CHANGED
@@ -13,5 +13,7 @@ module VagrantPlugins
|
|
13
13
|
|
14
14
|
# Temporally load the extra capability files for Red Hat
|
15
15
|
load(File.join(source_root, 'plugins/guests/redhat/plugin.rb'))
|
16
|
+
# Default I18n to load the en locale
|
17
|
+
I18n.load_path << File.expand_path('locales/en.yml', source_root)
|
16
18
|
end
|
17
19
|
end
|
data/locales/en.yml
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
en:
|
2
|
+
registration:
|
3
|
+
config:
|
4
|
+
final_message: 'Final registration configuration: %{conf}'
|
5
|
+
method_missing_command: 'Evaluating registration configuration: %{command}'
|
6
|
+
plugin:
|
7
|
+
compatible_message: 'The Vagrant RHEL plugin is only compatible with Vagrant 1.2+.'
|
8
|
+
name: 'Registration'
|
9
|
+
description: |-
|
10
|
+
This plugin adds register and unregister functionality to Vagrant Guests that
|
11
|
+
support the capability
|
12
|
+
action:
|
13
|
+
manager_not_found: 'Registration manager not found on guest'
|
14
|
+
register:
|
15
|
+
registration_info: 'Registering box with vagrant-registration...'
|
16
|
+
no_credentials: 'Credentials for registration not provided'
|
17
|
+
prompt: 'Would you like to register the system now (default: yes)? [y|n]'
|
18
|
+
skip_due_config: 'Registration is skipped due to the configuration'
|
19
|
+
options_support_warning: |-
|
20
|
+
WARNING: %{manager} supports only the following options:
|
21
|
+
WARNING: %{options}"
|
22
|
+
unsupported_option: "WARNING: %{option} option is not supported for %{manager}"
|
23
|
+
skip_missing_guest_capability: 'Registration is skipped due to the missing guest capability'
|
24
|
+
unregister:
|
25
|
+
unregistration_info: 'Unregistering box with vagrant-registration...'
|
26
|
+
skip_due_config: 'Unregistration is skipped due to the configuration'
|
27
|
+
skip_on_halt_due_config: 'Unregistration is skipped on halt due to the configuration'
|
28
|
+
guest_unavailable: 'Guest is not available, ignore unregistration'
|
29
|
+
skip_missing_guest_capability: 'Unregistration is skipped due to the missing guest capability'
|
@@ -61,7 +61,7 @@ module VagrantPlugins
|
|
61
61
|
def self.rhn_register_options(machine)
|
62
62
|
[:name, :username, :password, :org, :serverurl, :ca_cert,
|
63
63
|
:activationkey, :use_eus_channel, :nohardware, :nopackages,
|
64
|
-
:novirtinfo, :norhnsd, :force]
|
64
|
+
:novirtinfo, :norhnsd, :force, :proxy, :proxyUser, :proxyPassword]
|
65
65
|
end
|
66
66
|
|
67
67
|
# Return secret options for rhreg_ks
|
@@ -131,6 +131,9 @@ module VagrantPlugins
|
|
131
131
|
options << '--novirtinfo' if config.novirtinfo
|
132
132
|
options << '--norhnsd' if config.norhnsd
|
133
133
|
options << '--force' if config.force
|
134
|
+
options << "--proxy='#{config.proxy}'" if config.proxy
|
135
|
+
options << "--proxyUser='#{config.proxyUser}'" if config.proxyUser
|
136
|
+
options << "--proxyPassword='#{config.proxyPassword}'" if config.proxyPassword
|
134
137
|
options.join(' ')
|
135
138
|
end
|
136
139
|
end
|
@@ -49,7 +49,7 @@ module VagrantPlugins
|
|
49
49
|
def self.subscription_manager_options(machine)
|
50
50
|
[:username, :password, :serverurl, :baseurl, :org, :environment,
|
51
51
|
:name, :auto_attach, :activationkey, :servicelevel, :release,
|
52
|
-
:force, :type, :ca_cert, :pools]
|
52
|
+
:force, :type, :ca_cert, :pools, :proxy, :proxyUser, :proxyPassword]
|
53
53
|
end
|
54
54
|
|
55
55
|
# Return secret options for subscription-manager
|
@@ -108,6 +108,9 @@ module VagrantPlugins
|
|
108
108
|
options << "--release='#{config.release}'" if config.release
|
109
109
|
options << '--force' if config.force
|
110
110
|
options << "--type='#{config.type}'" if config.type
|
111
|
+
options << "--proxy='#{config.proxy}'" if config.proxy
|
112
|
+
options << "--proxyuser='#{config.proxyUser}'" if config.proxyUser
|
113
|
+
options << "--proxypassword='#{config.proxyPassword}'" if config.proxyPassword
|
111
114
|
options.join(' ')
|
112
115
|
end
|
113
116
|
|
@@ -19,6 +19,7 @@ Gem::Specification.new do |s|
|
|
19
19
|
all_files = Dir.chdir(root_path) do
|
20
20
|
Dir.glob('lib/**/{*,.*}') +
|
21
21
|
Dir.glob('plugins/**/{*,.*}') +
|
22
|
+
Dir.glob('locales/**/{*,.*}') +
|
22
23
|
Dir.glob('resources/**/{*,.*}') +
|
23
24
|
['Rakefile', 'Gemfile', 'README.md', 'CHANGELOG.md', 'LICENSE.md', 'vagrant-registration.gemspec']
|
24
25
|
end
|
@@ -49,6 +50,4 @@ Gem::Specification.new do |s|
|
|
49
50
|
s.files = unignored_files
|
50
51
|
s.executables = unignored_files.map { |f| f[/^bin\/(.*)/, 1] }.compact
|
51
52
|
s.require_path = 'lib'
|
52
|
-
|
53
|
-
s.add_development_dependency 'yard'
|
54
53
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-registration
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Langdon White
|
@@ -10,22 +10,8 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2016-
|
14
|
-
dependencies:
|
15
|
-
- !ruby/object:Gem::Dependency
|
16
|
-
name: yard
|
17
|
-
requirement: !ruby/object:Gem::Requirement
|
18
|
-
requirements:
|
19
|
-
- - ">="
|
20
|
-
- !ruby/object:Gem::Version
|
21
|
-
version: '0'
|
22
|
-
type: :development
|
23
|
-
prerelease: false
|
24
|
-
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
requirements:
|
26
|
-
- - ">="
|
27
|
-
- !ruby/object:Gem::Version
|
28
|
-
version: '0'
|
13
|
+
date: 2016-07-26 00:00:00.000000000 Z
|
14
|
+
dependencies: []
|
29
15
|
description: Enables guests to be registered automatically which is especially useful
|
30
16
|
for RHEL or SLES guests.
|
31
17
|
email:
|
@@ -48,6 +34,7 @@ files:
|
|
48
34
|
- lib/vagrant-registration/config.rb
|
49
35
|
- lib/vagrant-registration/plugin.rb
|
50
36
|
- lib/vagrant-registration/version.rb
|
37
|
+
- locales/en.yml
|
51
38
|
- plugins/guests/redhat/cap/registration.rb
|
52
39
|
- plugins/guests/redhat/cap/rhn_register.rb
|
53
40
|
- plugins/guests/redhat/cap/subscription_manager.rb
|