foreman_puppet 4.0.3 → 4.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -2
- data/app/models/foreman_puppet/puppetclass.rb +2 -2
- data/lib/foreman_puppet/version.rb +1 -1
- data/test/graphql/mutations/hosts/create_mutation_test.rb +1 -1
- data/webpack/src/Extends/Host/PuppetTab/SubTabs/ENCPreview/index.js +1 -1
- data/webpack/src/Extends/Host/PuppetTab/SubTabs/Reports/components/DescriptionCard.js +72 -48
- metadata +60 -60
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 745a9b5da4d9e341965da09876aea703a9a9e40f2bfc989f002e1263aa67547b
|
4
|
+
data.tar.gz: 2e80676582c1105c5839682d076f2e03ae6240721e46daf04a7c76e0721aafca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a246077d90bf3e91c5963bb603680354ee18c94a0e523067d85683ebd48ee4cd4757e88a8438a456438abd6086a3db88087099e69520bdf79f1213ddddb0b282
|
7
|
+
data.tar.gz: 58f460b97fad16c5d4ca45850d58baf059e70fd72b7ab898369c64200bfe5a3dd3b472d3b52dfdc0f2650061c49604e59a6cafec5b97933ad996d9aed9332640
|
data/README.md
CHANGED
@@ -37,8 +37,9 @@ You can install it on Foreman 2.5 to prepare for the Foreman update.
|
|
37
37
|
|
38
38
|
|Foreman version|Plugin version|Notes |
|
39
39
|
|---------------|--------------|------------------------------------------|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
| ~> 3.4 | ~> 4.1 | Required |
|
41
|
+
| ~> 3.3 | ~> 4.0 | Required |
|
42
|
+
| ~> 3.2 | ~> 3.0 | Required |
|
42
43
|
| ~> 3.1 | ~> 2.0 | Required |
|
43
44
|
| ~> 3.0 | ~> 1.0 | Required |
|
44
45
|
| >= 2.5 | ~> 0.1 | Optional; replaces Core features |
|
@@ -15,8 +15,8 @@ module ForemanPuppet
|
|
15
15
|
before_destroy EnsureNotUsedBy.new(:hosts, :hostgroups)
|
16
16
|
has_many :environment_classes, dependent: :destroy, inverse_of: :puppetclass
|
17
17
|
has_many :environments, -> { distinct }, through: :environment_classes
|
18
|
-
has_many :organizations, -> { distinct.reorder(
|
19
|
-
has_many :locations, -> { distinct.reorder(
|
18
|
+
has_many :organizations, -> { distinct.reorder(:id) }, through: :environments
|
19
|
+
has_many :locations, -> { distinct.reorder(:id) }, through: :environments
|
20
20
|
|
21
21
|
# rubocop:disable Rails/HasAndBelongsToMany
|
22
22
|
has_and_belongs_to_many :operatingsystems
|
@@ -72,7 +72,7 @@ module ForemanPuppet
|
|
72
72
|
assert_equal 1, host.interfaces.count
|
73
73
|
interface = host.interfaces.first
|
74
74
|
assert_equal 'Nic::Bond', interface.type
|
75
|
-
|
75
|
+
assert_same_elements %w[eth0 eth1], interface.attached_to.split(', ')
|
76
76
|
assert_equal 'bond0', interface.identifier
|
77
77
|
assert interface.primary
|
78
78
|
assert interface.provision
|
@@ -36,7 +36,7 @@ const ENCPreview = ({ hostName }) => {
|
|
36
36
|
}
|
37
37
|
if (response !== '' || response !== undefined) {
|
38
38
|
return (
|
39
|
-
<div className="enc-preview-tab" padding
|
39
|
+
<div className="enc-preview-tab" style={{ padding: '16px 24px' }}>
|
40
40
|
<ENCTab encData={response} />
|
41
41
|
</div>
|
42
42
|
);
|
@@ -1,7 +1,11 @@
|
|
1
1
|
import PropTypes from 'prop-types';
|
2
2
|
import React from 'react';
|
3
|
-
import CardTemplate from 'foremanReact/components/HostDetails/Templates/CardItem/CardTemplate';
|
4
3
|
import {
|
4
|
+
Card,
|
5
|
+
CardBody,
|
6
|
+
CardHeader,
|
7
|
+
CardTitle,
|
8
|
+
CardExpandableContent,
|
5
9
|
DescriptionList,
|
6
10
|
DescriptionListTerm,
|
7
11
|
DescriptionListGroup,
|
@@ -19,53 +23,73 @@ const DescriptionCard = ({
|
|
19
23
|
caProxyId,
|
20
24
|
env,
|
21
25
|
status,
|
22
|
-
}) =>
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
<
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
>
|
32
|
-
|
33
|
-
<
|
34
|
-
{
|
35
|
-
</
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
)
|
26
|
+
}) => {
|
27
|
+
const [isExpanded, setIsExpanded] = React.useState(false);
|
28
|
+
return (
|
29
|
+
<Card isExpanded={isExpanded} ouiaId="card-template">
|
30
|
+
<CardHeader onExpand={() => setIsExpanded(v => !v)}>
|
31
|
+
<CardTitle id="expandable-card-title">{__('Puppet details')}</CardTitle>
|
32
|
+
</CardHeader>
|
33
|
+
<CardExpandableContent>
|
34
|
+
<CardBody>
|
35
|
+
<DescriptionList isCompact>
|
36
|
+
<DescriptionListGroup>
|
37
|
+
<DescriptionListTerm>
|
38
|
+
{__('Puppet environment')}
|
39
|
+
</DescriptionListTerm>
|
40
|
+
<DescriptionListDescription>
|
41
|
+
<SkeletonLoader
|
42
|
+
emptyState={<DefaultLoaderEmptyState />}
|
43
|
+
status={status}
|
44
|
+
>
|
45
|
+
{env && (
|
46
|
+
<a
|
47
|
+
href={`/foreman_puppet/environments/?search=name+%3D+${env}`}
|
48
|
+
>
|
49
|
+
{env}
|
50
|
+
</a>
|
51
|
+
)}
|
52
|
+
</SkeletonLoader>
|
53
|
+
</DescriptionListDescription>
|
54
|
+
</DescriptionListGroup>
|
55
|
+
<DescriptionListGroup>
|
56
|
+
<DescriptionListTerm>
|
57
|
+
{__('Puppet Smart Proxy')}
|
58
|
+
</DescriptionListTerm>
|
59
|
+
<DescriptionListDescription>
|
60
|
+
<SkeletonLoader
|
61
|
+
emptyState={<DefaultLoaderEmptyState />}
|
62
|
+
status={status}
|
63
|
+
>
|
64
|
+
{proxyName && (
|
65
|
+
<a href={`/smart_proxies/${proxyId}#puppet`}>{proxyName}</a>
|
66
|
+
)}
|
67
|
+
</SkeletonLoader>
|
68
|
+
</DescriptionListDescription>
|
69
|
+
</DescriptionListGroup>
|
70
|
+
<DescriptionListGroup>
|
71
|
+
<DescriptionListTerm>
|
72
|
+
{__('Puppet CA Smart Proxy')}
|
73
|
+
</DescriptionListTerm>
|
74
|
+
<DescriptionListDescription>
|
75
|
+
<SkeletonLoader
|
76
|
+
emptyState={<DefaultLoaderEmptyState />}
|
77
|
+
status={status}
|
78
|
+
>
|
79
|
+
{caProxy && (
|
80
|
+
<a href={`/smart_proxies/${caProxyId}#puppet-ca`}>
|
81
|
+
{caProxy}
|
82
|
+
</a>
|
83
|
+
)}
|
84
|
+
</SkeletonLoader>
|
85
|
+
</DescriptionListDescription>
|
86
|
+
</DescriptionListGroup>
|
87
|
+
</DescriptionList>
|
88
|
+
</CardBody>
|
89
|
+
</CardExpandableContent>
|
90
|
+
</Card>
|
91
|
+
);
|
92
|
+
};
|
69
93
|
|
70
94
|
DescriptionCard.propTypes = {
|
71
95
|
caProxy: PropTypes.string,
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreman_puppet
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0
|
4
|
+
version: 4.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ondřej Ezr
|
8
8
|
- Shira Maximov
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2022-
|
12
|
+
date: 2022-12-25 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: Allow assigning Puppet environments and classes to the Foreman Hosts.
|
15
15
|
email:
|
@@ -360,7 +360,7 @@ homepage: https://github.com/theforeman/foreman_puppet
|
|
360
360
|
licenses:
|
361
361
|
- GPL-3.0
|
362
362
|
metadata: {}
|
363
|
-
post_install_message:
|
363
|
+
post_install_message:
|
364
364
|
rdoc_options: []
|
365
365
|
require_paths:
|
366
366
|
- lib
|
@@ -375,75 +375,75 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
375
375
|
- !ruby/object:Gem::Version
|
376
376
|
version: '0'
|
377
377
|
requirements: []
|
378
|
-
rubygems_version: 3.1.
|
379
|
-
signing_key:
|
378
|
+
rubygems_version: 3.1.6
|
379
|
+
signing_key:
|
380
380
|
specification_version: 4
|
381
381
|
summary: Add Puppet features to Foreman
|
382
382
|
test_files:
|
383
|
-
- test/
|
384
|
-
- test/
|
385
|
-
- test/
|
386
|
-
- test/
|
387
|
-
- test/
|
383
|
+
- test/controllers/foreman_puppet/api/v2/config_groups_controller_test.rb
|
384
|
+
- test/controllers/foreman_puppet/api/v2/host_classes_controller_test.rb
|
385
|
+
- test/controllers/foreman_puppet/api/v2/hostgroup_classes_controller_test.rb
|
386
|
+
- test/controllers/foreman_puppet/api/v2/hostgroups_controller_test.rb
|
387
|
+
- test/controllers/foreman_puppet/api/v2/lookups_common_controller_test.rb
|
388
|
+
- test/controllers/foreman_puppet/api/v2/provisioning_templates_controller_test.rb
|
389
|
+
- test/controllers/foreman_puppet/api/v2/puppetclasses_controller_test.rb
|
390
|
+
- test/controllers/foreman_puppet/api/v2/smart_proxies_controller_test.rb
|
391
|
+
- test/controllers/foreman_puppet/api/v2/template_combinations_controller_test.rb
|
392
|
+
- test/controllers/foreman_puppet/api/v2/environments_controller_test.rb
|
393
|
+
- test/controllers/foreman_puppet/api/v2/hosts_controller_test.rb
|
394
|
+
- test/controllers/foreman_puppet/api/v2/override_values_controller_test.rb
|
395
|
+
- test/controllers/foreman_puppet/api/v2/smart_class_parameters_controller_test.rb
|
396
|
+
- test/controllers/foreman_puppet/config_groups_controller_test.rb
|
397
|
+
- test/controllers/foreman_puppet/hostgroups_controller_test.rb
|
398
|
+
- test/controllers/foreman_puppet/puppet_smart_proxies_controller_test.rb
|
399
|
+
- test/controllers/foreman_puppet/puppetclass_lookup_keys_controller_test.rb
|
400
|
+
- test/controllers/foreman_puppet/puppetclasses_controller_test.rb
|
401
|
+
- test/controllers/foreman_puppet/environments_controller_test.rb
|
402
|
+
- test/controllers/foreman_puppet/hosts_controller_test.rb
|
403
|
+
- test/controllers/provisioning_templates_controller_test.rb
|
404
|
+
- test/factories/foreman_puppet_factories.rb
|
405
|
+
- test/factories/host_puppet_enhancements.rb
|
406
|
+
- test/factories/proxy_puppet_enhancements.rb
|
407
|
+
- test/graphql/mutations/hosts/create_mutation_test.rb
|
408
|
+
- test/graphql/queries/environments_query_test.rb
|
409
|
+
- test/graphql/queries/host_puppet_query_test.rb
|
410
|
+
- test/graphql/queries/hostgroup_puppet_query_test.rb
|
411
|
+
- test/graphql/queries/location_query_test.rb
|
412
|
+
- test/graphql/queries/organization_query_test.rb
|
413
|
+
- test/graphql/queries/puppetclasses_query_test.rb
|
414
|
+
- test/graphql/queries/environment_query_test.rb
|
415
|
+
- test/graphql/queries/puppetclass_query_test.rb
|
416
|
+
- test/helpers/foreman_puppet/hosts_and_hostgroups_helper_test.rb
|
417
|
+
- test/helpers/foreman_puppet/puppetclass_lookup_keys_helper_test.rb
|
418
|
+
- test/helpers/foreman_puppet/puppetclasses_helper_test.rb
|
419
|
+
- test/integration/foreman_puppet/dashboard_js_test.rb
|
420
|
+
- test/integration/foreman_puppet/environment_js_test.rb
|
421
|
+
- test/integration/foreman_puppet/host_js_test.rb
|
422
|
+
- test/integration/foreman_puppet/hostgroup_js_test.rb
|
423
|
+
- test/integration/foreman_puppet/puppetclass_js_test.rb
|
424
|
+
- test/integration/foreman_puppet/smartclass_parameter_js_test.rb
|
388
425
|
- test/models/foreman_puppet/config_group_class_test.rb
|
389
426
|
- test/models/foreman_puppet/config_group_test.rb
|
390
|
-
- test/models/foreman_puppet/
|
427
|
+
- test/models/foreman_puppet/environment_test.rb
|
391
428
|
- test/models/foreman_puppet/host_config_group_test.rb
|
392
|
-
- test/models/foreman_puppet/puppetclass_test.rb
|
393
|
-
- test/models/foreman_puppet/provisioning_template_test.rb
|
394
|
-
- test/models/foreman_puppet/lookup_value_test.rb
|
395
|
-
- test/models/foreman_puppet/puppetclass_lookup_key_test.rb
|
396
429
|
- test/models/foreman_puppet/hostgroup_puppet_facet_test.rb
|
397
|
-
- test/models/foreman_puppet/environment_test.rb
|
398
430
|
- test/models/foreman_puppet/hostgroup_test.rb
|
431
|
+
- test/models/foreman_puppet/lookup_value_test.rb
|
432
|
+
- test/models/foreman_puppet/puppetclass_lookup_key_test.rb
|
433
|
+
- test/models/foreman_puppet/report_test.rb
|
434
|
+
- test/models/foreman_puppet/smart_proxy_test.rb
|
435
|
+
- test/models/foreman_puppet/user_test.rb
|
436
|
+
- test/models/foreman_puppet/host_puppet_facet_test.rb
|
437
|
+
- test/models/foreman_puppet/host_test.rb
|
438
|
+
- test/models/foreman_puppet/provisioning_template_test.rb
|
439
|
+
- test/models/foreman_puppet/puppetclass_test.rb
|
399
440
|
- test/services/foreman_puppet/host_counter_test.rb
|
400
441
|
- test/services/foreman_puppet/host_info_providers/config_groups_info_test.rb
|
401
442
|
- test/services/foreman_puppet/host_info_providers/puppet_info_test.rb
|
402
443
|
- test/services/foreman_puppet/input_type/puppet_parameter_input_test.rb
|
403
|
-
- test/
|
404
|
-
- test/factories/host_puppet_enhancements.rb
|
405
|
-
- test/factories/proxy_puppet_enhancements.rb
|
444
|
+
- test/test_puppet_helper.rb
|
406
445
|
- test/unit/foreman_puppet/access_permissions_test.rb
|
407
|
-
- test/unit/foreman_puppet/template_rendering_test.rb
|
408
446
|
- test/unit/foreman_puppet/puppet_class_importer_test.rb
|
447
|
+
- test/unit/foreman_puppet/template_rendering_test.rb
|
409
448
|
- test/unit/foreman_puppet_test.rb
|
410
|
-
- test/graphql/mutations/hosts/create_mutation_test.rb
|
411
|
-
- test/graphql/queries/environments_query_test.rb
|
412
|
-
- test/graphql/queries/location_query_test.rb
|
413
|
-
- test/graphql/queries/puppetclass_query_test.rb
|
414
|
-
- test/graphql/queries/organization_query_test.rb
|
415
|
-
- test/graphql/queries/host_puppet_query_test.rb
|
416
|
-
- test/graphql/queries/environment_query_test.rb
|
417
|
-
- test/graphql/queries/puppetclasses_query_test.rb
|
418
|
-
- test/graphql/queries/hostgroup_puppet_query_test.rb
|
419
|
-
- test/controllers/foreman_puppet/hostgroups_controller_test.rb
|
420
|
-
- test/controllers/foreman_puppet/config_groups_controller_test.rb
|
421
|
-
- test/controllers/foreman_puppet/puppetclass_lookup_keys_controller_test.rb
|
422
|
-
- test/controllers/foreman_puppet/environments_controller_test.rb
|
423
|
-
- test/controllers/foreman_puppet/puppet_smart_proxies_controller_test.rb
|
424
|
-
- test/controllers/foreman_puppet/hosts_controller_test.rb
|
425
|
-
- test/controllers/foreman_puppet/api/v2/hostgroups_controller_test.rb
|
426
|
-
- test/controllers/foreman_puppet/api/v2/override_values_controller_test.rb
|
427
|
-
- test/controllers/foreman_puppet/api/v2/config_groups_controller_test.rb
|
428
|
-
- test/controllers/foreman_puppet/api/v2/smart_proxies_controller_test.rb
|
429
|
-
- test/controllers/foreman_puppet/api/v2/environments_controller_test.rb
|
430
|
-
- test/controllers/foreman_puppet/api/v2/hosts_controller_test.rb
|
431
|
-
- test/controllers/foreman_puppet/api/v2/lookups_common_controller_test.rb
|
432
|
-
- test/controllers/foreman_puppet/api/v2/smart_class_parameters_controller_test.rb
|
433
|
-
- test/controllers/foreman_puppet/api/v2/provisioning_templates_controller_test.rb
|
434
|
-
- test/controllers/foreman_puppet/api/v2/template_combinations_controller_test.rb
|
435
|
-
- test/controllers/foreman_puppet/api/v2/host_classes_controller_test.rb
|
436
|
-
- test/controllers/foreman_puppet/api/v2/puppetclasses_controller_test.rb
|
437
|
-
- test/controllers/foreman_puppet/api/v2/hostgroup_classes_controller_test.rb
|
438
|
-
- test/controllers/foreman_puppet/puppetclasses_controller_test.rb
|
439
|
-
- test/controllers/provisioning_templates_controller_test.rb
|
440
|
-
- test/integration/foreman_puppet/puppetclass_js_test.rb
|
441
|
-
- test/integration/foreman_puppet/host_js_test.rb
|
442
|
-
- test/integration/foreman_puppet/environment_js_test.rb
|
443
|
-
- test/integration/foreman_puppet/dashboard_js_test.rb
|
444
|
-
- test/integration/foreman_puppet/smartclass_parameter_js_test.rb
|
445
|
-
- test/integration/foreman_puppet/hostgroup_js_test.rb
|
446
|
-
- test/helpers/foreman_puppet/puppetclass_lookup_keys_helper_test.rb
|
447
|
-
- test/helpers/foreman_puppet/puppetclasses_helper_test.rb
|
448
|
-
- test/helpers/foreman_puppet/hosts_and_hostgroups_helper_test.rb
|
449
449
|
- test/integration_puppet_helper.rb
|