foreman_virt_who_configure 0.5.4 → 0.5.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/foreman_virt_who_configure/api/v2/configs_controller.rb +1 -1
- data/app/views/foreman_virt_who_configure/api/v2/configs/main.json.rabl +9 -0
- data/db/migrate/20201211160234_add_foreign_key_proxy_id.rb +5 -0
- data/lib/foreman_virt_who_configure/version.rb +1 -1
- data/test/functional/api/v2/configs_controller_test.rb +4 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fd228676712de08fec7ea70df6af7170b14fc802ee35d1bd0d74559e8beea160
|
4
|
+
data.tar.gz: cd3bd04a86a3315359c302a80bd55c436c6ded0a3e569402f2455fd183b5969c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6fb574f47761da65869cdb11b26e26b341e674e8f4f920912bb9ed6a8b87fd2090e3ae933cc1bb8769a953109226b3727cfd740c390394f4076c42c93d47fe5b
|
7
|
+
data.tar.gz: a508d300b4417d3546fa27e1dee505d0197ff095578def373f38751d6368afe1989eae238068977060854b7f53887f0358fa8fcbb2f2ef9bdf4d6eb153ebef16
|
@@ -52,7 +52,7 @@ module ForemanVirtWhoConfigure
|
|
52
52
|
param :hypervisor_password, String, :desc => N_("Hypervisor password, required for all hypervisor types except for libvirt"), :required => false
|
53
53
|
param :satellite_url, String, :desc => N_("Satellite server FQDN"), :required => true
|
54
54
|
param :debug, :bool, :desc => N_("Enable debugging output")
|
55
|
-
param :
|
55
|
+
param :http_proxy_id, Integer, :desc => N_('HTTP proxy that should be used for communication between the server on which virt-who is running and the hypervisors and virtualization managers.')
|
56
56
|
param :no_proxy, String, :desc => N_("Ignore proxy. A comma-separated list of hostnames or domains or ip addresses to ignore proxy settings for. Optionally this may be set to * to bypass proxy settings for all hostnames domains or ip addresses.")
|
57
57
|
param :organization_id, Integer, :required => true, :desc => N_("Organization of the virt-who configuration") if ::SETTINGS[:organizations_enabled]
|
58
58
|
end
|
@@ -2,8 +2,17 @@ object @config
|
|
2
2
|
|
3
3
|
extends "foreman_virt_who_configure/api/v2/configs/base"
|
4
4
|
|
5
|
+
glue :http_proxy do
|
6
|
+
attributes :url => :proxy
|
7
|
+
end
|
8
|
+
|
5
9
|
attributes :name, :interval, :organization_id, :whitelist, :blacklist, :hypervisor_id,
|
6
10
|
:hypervisor_type, :hypervisor_server, :hypervisor_username, :debug,
|
7
11
|
:satellite_url, :proxy, :no_proxy, :status, :last_report_at, :out_of_date_at,
|
8
12
|
:filter_host_parents, :exclude_host_parents
|
13
|
+
|
14
|
+
child :http_proxy do
|
15
|
+
attributes :id, :name, :url
|
16
|
+
end
|
17
|
+
|
9
18
|
attributes :listing_mode => :filtering_mode
|
@@ -78,7 +78,8 @@ class ForemanVirtWhoConfigure::Api::V2::ConfigsControllerTest < ActionController
|
|
78
78
|
assert_equal 'unknown', response['status']
|
79
79
|
assert_nil response['last_report_at']
|
80
80
|
assert_nil response['out_of_date_at']
|
81
|
-
assert_equal @http_proxy.id,
|
81
|
+
assert_equal @http_proxy.id, response['http_proxy']['id']
|
82
|
+
assert_equal @http_proxy.url, response['proxy']
|
82
83
|
|
83
84
|
assert_response :success
|
84
85
|
end
|
@@ -140,6 +141,7 @@ class ForemanVirtWhoConfigure::Api::V2::ConfigsControllerTest < ActionController
|
|
140
141
|
:hypervisor_password => "password",
|
141
142
|
:debug => true,
|
142
143
|
:satellite_url => "foreman.example.com",
|
144
|
+
:http_proxy_id => @http_proxy.id,
|
143
145
|
:organization_id => org.id }
|
144
146
|
}, :session => set_session_user
|
145
147
|
|
@@ -158,6 +160,7 @@ class ForemanVirtWhoConfigure::Api::V2::ConfigsControllerTest < ActionController
|
|
158
160
|
assert_equal 'password', new_config.hypervisor_password
|
159
161
|
assert_equal true, new_config.debug
|
160
162
|
assert_equal 'foreman.example.com', new_config.satellite_url
|
163
|
+
assert_equal @http_proxy.id, response['http_proxy']['id']
|
161
164
|
end
|
162
165
|
|
163
166
|
test "should update the config" do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreman_virt_who_configure
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Foreman virt-who-configure team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-12-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: katello
|
@@ -108,6 +108,7 @@ files:
|
|
108
108
|
- db/migrate/20181005065724_filter_and_exclude_host_parents.foreman_virt_who_configure.rb
|
109
109
|
- db/migrate/20190104125749_add_kubeconfig_to_config.rb
|
110
110
|
- db/migrate/20200728054557_refer_config_proxy_to_http_proxy.rb
|
111
|
+
- db/migrate/20201211160234_add_foreign_key_proxy_id.rb
|
111
112
|
- lib/foreman_virt_who_configure.rb
|
112
113
|
- lib/foreman_virt_who_configure/engine.rb
|
113
114
|
- lib/foreman_virt_who_configure/version.rb
|