foreman_snapshot_management 4.1.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 +4 -4
- data/README.md +1 -9
- data/app/views/foreman_snapshot_management/snapshots/_index.html.erb +2 -0
- data/lib/foreman_snapshot_management/version.rb +1 -1
- data/webpack/components/SnapshotManagementCard/SnapshotManagementCard.js +8 -1
- data/webpack/components/SnapshotManagementCard/__tests__/SnapshotManagementCard.test.js +8 -0
- data/webpack/components/SnapshotManagementCard/__tests__/__snapshots__/SnapshotManagementCard.test.js.snap +2 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c872c9738f4420df6261d1e68a1b76b7552c47213478a5106c378657b3434e1b
|
|
4
|
+
data.tar.gz: e602296b4f589f864492101642c3af985931a80050e6e5134259e89b0b15b356
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6f8de7ae1dbeb419c5c3dba8198e9bbb34aae775d28ad582a234c293aa02b6ec449c85e64967c1801cb08e1115ddf3b56e61f37dde838d035af8b9ad85aa0e29
|
|
7
|
+
data.tar.gz: a8e07746d8b5c98014e3977650c43a46afc2e33c07c991b74d16b54e6b20164fb5c82042dfcd8ed6d3d4dbace57159a0f18dd85bc034d23e6c49a5dd3fc24663
|
data/README.md
CHANGED
|
@@ -27,14 +27,6 @@ For more information, see [Installing the Snapshot Management Plug-in](https://d
|
|
|
27
27
|
| >= 3.13 | >= 4.0.0 |
|
|
28
28
|
| >= 3.7 | >= 3.0.0 |
|
|
29
29
|
| >= 2.3 | >= 2.0.0 |
|
|
30
|
-
| 1.24 | >= 1.7.0 |
|
|
31
|
-
| 1.23 | >= 1.7.0 |
|
|
32
|
-
| 1.22 | >= 1.6.0 |
|
|
33
|
-
| 1.21 | >= 1.5.0 |
|
|
34
|
-
| 1.20 | >= 1.5.0 |
|
|
35
|
-
| 1.19 | >= 1.5.0 |
|
|
36
|
-
| 1.18 | >= 1.5.0 |
|
|
37
|
-
| 1.17 | >= 1.5.0 |
|
|
38
30
|
|
|
39
31
|
## Usage
|
|
40
32
|
|
|
@@ -230,7 +222,7 @@ curl -s -u "$AUTH" \
|
|
|
230
222
|
Fork and send a Pull Request. Thanks!
|
|
231
223
|
|
|
232
224
|
## Copyright
|
|
233
|
-
Copyright (c)
|
|
225
|
+
Copyright (c) 2025 ATIX AG - http://www.atix.de
|
|
234
226
|
|
|
235
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.
|
|
236
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 %>
|
|
@@ -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 (
|
|
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', () => {
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: foreman_snapshot_management
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 4.1.
|
|
4
|
+
version: 4.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- ATIX AG
|
|
8
8
|
bindir: bin
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date: 2025-
|
|
10
|
+
date: 2025-10-22 00:00:00.000000000 Z
|
|
11
11
|
dependencies: []
|
|
12
12
|
description: Foreman-plugin to manage snapshots in a virtual-hardware environments.
|
|
13
13
|
email:
|