foreman_snapshot_management 4.0.0 → 4.1.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
  SHA256:
3
- metadata.gz: f8a82e13a73e1ff6d7590c3b1580ecd0127dada9482135673a918f4570ff1181
4
- data.tar.gz: 2de8b8fa18746e11ccce0f4606319e5f2927357bbe4a2e398c5e60cb30929cec
3
+ metadata.gz: c872c9738f4420df6261d1e68a1b76b7552c47213478a5106c378657b3434e1b
4
+ data.tar.gz: e602296b4f589f864492101642c3af985931a80050e6e5134259e89b0b15b356
5
5
  SHA512:
6
- metadata.gz: 7efe5542565db15d82a81e76e6cc2789378187cde8f4eae14dcb9394c0f315f966b9237d0dbad11a491e40330fc511d8331bc68a97758b66b5b37ed41f0fd828
7
- data.tar.gz: 5f360e4018c1ea3f13f5ba5aaa41e383dac116b653c3548684a247df58a2bbd5c340ddb02440ec76678daf2be8af17f607df67d947b15a5b79912eca9c083d41
6
+ metadata.gz: 6f8de7ae1dbeb419c5c3dba8198e9bbb34aae775d28ad582a234c293aa02b6ec449c85e64967c1801cb08e1115ddf3b56e61f37dde838d035af8b9ad85aa0e29
7
+ data.tar.gz: a8e07746d8b5c98014e3977650c43a46afc2e33c07c991b74d16b54e6b20164fb5c82042dfcd8ed6d3d4dbace57159a0f18dd85bc034d23e6c49a5dd3fc24663
data/README.md CHANGED
@@ -24,16 +24,9 @@ For more information, see [Installing the Snapshot Management Plug-in](https://d
24
24
 
25
25
  | Foreman Version | Plugin Version |
26
26
  | --------------- | -------------- |
27
+ | >= 3.13 | >= 4.0.0 |
27
28
  | >= 3.7 | >= 3.0.0 |
28
29
  | >= 2.3 | >= 2.0.0 |
29
- | 1.24 | >= 1.7.0 |
30
- | 1.23 | >= 1.7.0 |
31
- | 1.22 | >= 1.6.0 |
32
- | 1.21 | >= 1.5.0 |
33
- | 1.20 | >= 1.5.0 |
34
- | 1.19 | >= 1.5.0 |
35
- | 1.18 | >= 1.5.0 |
36
- | 1.17 | >= 1.5.0 |
37
30
 
38
31
  ## Usage
39
32
 
@@ -229,7 +222,7 @@ curl -s -u "$AUTH" \
229
222
  Fork and send a Pull Request. Thanks!
230
223
 
231
224
  ## Copyright
232
- Copyright (c) 2024 ATIX AG - http://www.atix.de
225
+ Copyright (c) 2025 ATIX AG - http://www.atix.de
233
226
 
234
227
  This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
235
228
 
@@ -1,3 +1,4 @@
1
+ <% if @host.compute_resource && @host.compute_resource.capabilities.include?(:snapshots) && authorized_for(:auth_object => @host, :permission => :view_snapshots) %>
1
2
  <%= react_component('SnapshotManagement', {
2
3
  host: @host,
3
4
  canCreate: authorized_for(:auth_object => @host, :permission => :create_snapshots),
@@ -11,3 +12,4 @@
11
12
  quiesceOption: @host.compute_resource.capable?(:snapshot_include_quiesce)
12
13
  }
13
14
  }) %>
15
+ <% end %>
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ForemanSnapshotManagement
4
- VERSION = '4.0.0'
4
+ VERSION = '4.1.1'
5
5
  end
@@ -1,7 +1,7 @@
1
1
 
2
2
  .snapshot-date {
3
- color: var(--pf-global--secondary-color--100);
4
- font-size: calc(var(--pf-global--icon--FontSize--sm) * 0.9);
3
+ color: var(--pf-v5-global--secondary-color--100);
4
+ font-size: calc(var(--pf-v5-global--icon--FontSize--sm) * 0.9);
5
5
  }
6
6
 
7
7
  .description {
@@ -1,5 +1,5 @@
1
1
  .snapshot-create {
2
- font-size: var(--pf-global--FontSize--md);
2
+ font-size: var(--pf-v5-global--FontSize--md);
3
3
  margin-bottom: 20px;
4
4
  margin-top: 10px;
5
5
  }
@@ -8,6 +8,8 @@ import SnapshotManagement from '../SnapshotManagement';
8
8
 
9
9
  const SnapshotManagementCard = ({ hostDetails, ...props }) => {
10
10
  const children = [];
11
+ const snapshotsEnabled =
12
+ hostDetails?.capabilities?.includes('snapshots') || false;
11
13
  const capabilities = {
12
14
  editableSnapshotName:
13
15
  hostDetails?.capabilities?.includes('editable_snapshot_name') || false,
@@ -18,7 +20,12 @@ const SnapshotManagementCard = ({ hostDetails, ...props }) => {
18
20
  hostDetails?.capabilities?.includes('snapshot_include_quiesce') || false,
19
21
  };
20
22
 
21
- if (hostDetails?.uuid && hostDetails?.id && hostDetails?.permissions) {
23
+ if (
24
+ snapshotsEnabled &&
25
+ hostDetails?.uuid &&
26
+ hostDetails?.id &&
27
+ hostDetails?.permissions
28
+ ) {
22
29
  children.push(
23
30
  <SnapshotManagement
24
31
  key="SnapshotManagement"
@@ -12,6 +12,7 @@ const hostDetails = {
12
12
  revert_snapshots: true,
13
13
  destroy_snapshots: false,
14
14
  },
15
+ capabilities: ['snapshots'],
15
16
  };
16
17
 
17
18
  const hostDetailsVmware = {
@@ -36,6 +37,10 @@ const hostDetailsProxmox = {
36
37
  'limit_snapshot_name_format',
37
38
  ],
38
39
  };
40
+ const hostDetailsNotSupported = {
41
+ ...hostDetails,
42
+ capabilities: ['build', 'new_volume', 'new_interface', 'image'],
43
+ };
39
44
 
40
45
  const fixtures = {
41
46
  'without optional Props': {},
@@ -46,6 +51,9 @@ const fixtures = {
46
51
  'with Proxmox capabilities': {
47
52
  hostDetails: hostDetailsProxmox,
48
53
  },
54
+ 'with NotSupported CR capabilities': {
55
+ hostDetails: hostDetailsNotSupported,
56
+ },
49
57
  };
50
58
 
51
59
  describe('SnapshotManagementCard', () => {
@@ -1,5 +1,7 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
+ exports[`SnapshotManagementCard renders with NotSupported CR capabilities 1`] = `""`;
4
+
3
5
  exports[`SnapshotManagementCard renders with Props 1`] = `
4
6
  <CardTemplate
5
7
  expandable={false}
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_snapshot_management
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0
4
+ version: 4.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - ATIX AG
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-10-23 00:00:00.000000000 Z
10
+ date: 2025-10-22 00:00:00.000000000 Z
12
11
  dependencies: []
13
12
  description: Foreman-plugin to manage snapshots in a virtual-hardware environments.
14
13
  email:
@@ -120,7 +119,6 @@ homepage: https://www.orcharhino.com
120
119
  licenses:
121
120
  - GPL-3.0-only
122
121
  metadata: {}
123
- post_install_message:
124
122
  rdoc_options: []
125
123
  require_paths:
126
124
  - lib
@@ -135,8 +133,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
135
133
  - !ruby/object:Gem::Version
136
134
  version: '0'
137
135
  requirements: []
138
- rubygems_version: 3.3.27
139
- signing_key:
136
+ rubygems_version: 3.6.9
140
137
  specification_version: 4
141
138
  summary: Snapshot Management for machines on virtualization-platforms
142
139
  test_files: