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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fbec596d63b0929f914715bae800aa6bccefb034
4
- data.tar.gz: 82878e9e9b51c0ebcade48897398456082a11b5c
3
+ metadata.gz: 60f3058d47ccfec1dbff64e791b8f603bcd014b6
4
+ data.tar.gz: d3d5bbd84b774815b613a0b2e05d4db74b626e47
5
5
  SHA512:
6
- metadata.gz: db056b2ccc2260d4aa2ed880e036538f591848e6e1afe1c8514381f61492af33e1e07e2c91275613e12b69017cebb43be1855b71f9dd4ff40dd80225440f3a02
7
- data.tar.gz: 42c181ac286dd6444c1a815e3d319a1c575894b9ef1278b819f88142f16378050ea3558a5f0fafd5cdbce36528516c53e77fe23b030920f576d7479e91525b1c
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
- api_base_url "/foreman_virt_who_configure/api"
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.16'
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"]
@@ -1,3 +1,3 @@
1
1
  module ForemanVirtWhoConfigure
2
- VERSION = '0.2.0'.freeze
2
+ VERSION = '0.2.1'.freeze
3
3
  end
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.0
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-04-10 00:00:00.000000000 Z
11
+ date: 2018-05-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: katello