foreman_virt_who_configure 0.2.0 → 0.2.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/app/controllers/foreman_virt_who_configure/api/v2/configs_controller.rb +2 -1
- data/app/models/foreman_virt_who_configure/config.rb +1 -1
- data/app/models/foreman_virt_who_configure/output_generator.rb +3 -1
- data/app/views/foreman_virt_who_configure/configs/edit.html.erb +11 -0
- data/app/views/foreman_virt_who_configure/configs/show.html.erb +11 -0
- data/config/routes.rb +1 -1
- data/lib/foreman_virt_who_configure/engine.rb +1 -1
- data/lib/foreman_virt_who_configure/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 60f3058d47ccfec1dbff64e791b8f603bcd014b6
|
|
4
|
+
data.tar.gz: d3d5bbd84b774815b613a0b2e05d4db74b626e47
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 33a7a86a2fd7c4fedf0fc0c900aae67c5e21cb237e8fdc827883b3bcdfd09825379049384b5ac54aa8b43069f1b48751a97c38e638d48017cb42a858e2b527f0
|
|
7
|
+
data.tar.gz: c737677746cf70b109f521ff511354a416bebe70a92963c2aec79840661c41c6edd4a447cd3f9223495f24dce1664029e91f23003a9f21e878f8db9fb1d972ef
|
|
@@ -5,7 +5,8 @@ module ForemanVirtWhoConfigure
|
|
|
5
5
|
include ::Api::Version2
|
|
6
6
|
include ForemanVirtWhoConfigure::Concerns::ConfigParameters if Foreman::Version.new.short >= '1.13'
|
|
7
7
|
resource_description do
|
|
8
|
-
|
|
8
|
+
api_version 'v2'
|
|
9
|
+
api_base_url "/foreman_virt_who_configure/api/v2"
|
|
9
10
|
end
|
|
10
11
|
|
|
11
12
|
before_action :find_resource, :only => %w{show deploy_script update destroy}
|
|
@@ -8,7 +8,7 @@ module ForemanVirtWhoConfigure
|
|
|
8
8
|
# We keep both params permitted for compatibility with 1.11
|
|
9
9
|
:listing_mode, :filtering_mode
|
|
10
10
|
]
|
|
11
|
-
audited :except => [ :hypervisor_password, :last_report_at, :out_of_date_at ]
|
|
11
|
+
audited :except => [ :hypervisor_password, :last_report_at, :out_of_date_at ], :associations => []
|
|
12
12
|
include Authorizable
|
|
13
13
|
validates_lengths_from_database
|
|
14
14
|
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
require 'shellwords'
|
|
2
|
+
|
|
1
3
|
module ForemanVirtWhoConfigure
|
|
2
4
|
class OutputGenerator
|
|
3
5
|
class ConfigurationResult
|
|
@@ -191,7 +193,7 @@ EOS
|
|
|
191
193
|
end
|
|
192
194
|
|
|
193
195
|
def cr_username
|
|
194
|
-
config.hypervisor_username
|
|
196
|
+
Shellwords.escape(config.hypervisor_username)
|
|
195
197
|
end
|
|
196
198
|
|
|
197
199
|
def cr_password
|
|
@@ -1,3 +1,14 @@
|
|
|
1
1
|
<% title _("Edit Virt-who Config") %>
|
|
2
2
|
|
|
3
|
+
<%= breadcrumbs(:resource_url => foreman_virt_who_configure_api_configs_path,
|
|
4
|
+
:items => [
|
|
5
|
+
{:caption => _('Configurations'),
|
|
6
|
+
:url => url_for(foreman_virt_who_configure_configs_path)
|
|
7
|
+
},
|
|
8
|
+
{:caption => _('Edit') + ' ' + @config.name,
|
|
9
|
+
:url => (edit_foreman_virt_who_configure_config_path(@config) if authorized_for(hash_for_edit_foreman_virt_who_configure_config_path(@config)))
|
|
10
|
+
}
|
|
11
|
+
]
|
|
12
|
+
) %>
|
|
13
|
+
|
|
3
14
|
<%= render :partial => 'form' %>
|
|
@@ -6,6 +6,17 @@
|
|
|
6
6
|
display_delete_if_authorized(hash_for_foreman_virt_who_configure_config_path(@config).merge(:permission => 'destroy_virt_who_config', :auth_object => @config), :class => 'btn btn-default', :data => {:confirm => _("Delete virt-who configuration %s?") % config.name})
|
|
7
7
|
) %>
|
|
8
8
|
|
|
9
|
+
<%= breadcrumbs(:resource_url => foreman_virt_who_configure_api_configs_path,
|
|
10
|
+
:items => [
|
|
11
|
+
{:caption => _('Configurations'),
|
|
12
|
+
:url => url_for(foreman_virt_who_configure_configs_path)
|
|
13
|
+
},
|
|
14
|
+
{:caption => @config.name,
|
|
15
|
+
:url => (edit_foreman_virt_who_configure_config_path(@config) if authorized_for(hash_for_edit_foreman_virt_who_configure_config_path(@config)))
|
|
16
|
+
}
|
|
17
|
+
]
|
|
18
|
+
) %>
|
|
19
|
+
|
|
9
20
|
<ul id="config-tab" class="nav nav-tabs">
|
|
10
21
|
<li class="active"><a href="#overview" data-toggle="tab"><%= _('Overview') %></a></li>
|
|
11
22
|
<li><a href="#deploy" data-toggle="tab"><%= _('Deploy') %></a></li>
|
data/config/routes.rb
CHANGED
|
@@ -11,7 +11,7 @@ Rails.application.routes.draw do
|
|
|
11
11
|
end
|
|
12
12
|
|
|
13
13
|
namespace :api, :defaults => {:format => 'json'} do
|
|
14
|
-
scope "(:apiv)", :module => :v2, :defaults => {:apiv => 'v2'}, :apiv => /v1|v2/, :constraints => ApiConstraints.new(:version => 2) do
|
|
14
|
+
scope "(:apiv)", :module => :v2, :defaults => {:apiv => 'v2'}, :apiv => /v1|v2/, :constraints => ApiConstraints.new(:version => 2, :default => true) do
|
|
15
15
|
resources :configs do
|
|
16
16
|
get :deploy_script, :on => :member
|
|
17
17
|
end
|
|
@@ -27,7 +27,7 @@ module ForemanVirtWhoConfigure
|
|
|
27
27
|
|
|
28
28
|
initializer 'foreman_virt_who_configure.register_plugin', :before => :finisher_hook do |_app|
|
|
29
29
|
Foreman::Plugin.register :foreman_virt_who_configure do
|
|
30
|
-
requires_foreman '>= 1.
|
|
30
|
+
requires_foreman '>= 1.18'
|
|
31
31
|
requires_foreman_plugin 'katello', '>= 3.0.0'
|
|
32
32
|
|
|
33
33
|
apipie_documented_controllers ["#{ForemanVirtWhoConfigure::Engine.root}/app/controllers/foreman_virt_who_configure/api/v2/*.rb"]
|
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.2.
|
|
4
|
+
version: 0.2.1
|
|
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: 2018-
|
|
11
|
+
date: 2018-05-30 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: katello
|