foreman_remote_execution 7.1.1 → 7.2.0
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_remote_execution/concerns/api/v2/registration_commands_controller_extensions.rb +1 -0
- data/app/controllers/foreman_remote_execution/concerns/api/v2/registration_controller_extensions.rb +8 -0
- data/lib/foreman_remote_execution/engine.rb +1 -0
- data/lib/foreman_remote_execution/version.rb +1 -1
- data/webpack/react_app/components/RegistrationExtension/RexPull.js +73 -0
- data/webpack/react_app/extend/Fills.js +7 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b4f9d5aa836e3804a0b602bca132a51f4d3032b1276360f321867c135f9793c3
|
4
|
+
data.tar.gz: 7a6f9b518f336bbe91882e6c431a465b4aa80c3a262dba9e0789fecf1c9edf51
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 14cf218a2c1267baedcd0980adbe51207e9beebbe8c262e2506167a5a095fb5c14447bf58147efdb5eaaf3f56120d4463572ad1d01d981f93c33f37050b0115e
|
7
|
+
data.tar.gz: f2b7c73889c483a6f134c213c65df5ba21eddcc61b2b578b5f070a98e7ff9a9a0d269c1ad6dbc341285021189e02b973b0b77e90258537b8995adddd901bc5da
|
@@ -9,6 +9,7 @@ module ForemanRemoteExecution
|
|
9
9
|
update_api(:create) do
|
10
10
|
param :registration_command, Hash do
|
11
11
|
param :remote_execution_interface, String, desc: N_("Identifier of the Host interface for Remote execution")
|
12
|
+
param :setup_remote_execution_pull, :bool, desc: N_("Set 'host_registration_remote_execution_pull' parameter for the host. If it is set to true, pull provider client will be deployed on the host")
|
12
13
|
end
|
13
14
|
end
|
14
15
|
end
|
data/app/controllers/foreman_remote_execution/concerns/api/v2/registration_controller_extensions.rb
CHANGED
@@ -6,6 +6,7 @@ module ForemanRemoteExecution
|
|
6
6
|
|
7
7
|
update_api(:global, :host) do
|
8
8
|
param :remote_execution_interface, String, desc: N_("Identifier of the Host interface for Remote execution")
|
9
|
+
param :setup_remote_execution_pull, :bool, desc: N_("Set 'host_registration_remote_execution_pull' parameter for the host. If it is set to true, pull provider client will be deployed on the host")
|
9
10
|
end
|
10
11
|
end
|
11
12
|
|
@@ -13,10 +14,17 @@ module ForemanRemoteExecution
|
|
13
14
|
|
14
15
|
def host_setup_extension
|
15
16
|
remote_execution_interface
|
17
|
+
remote_execution_pull
|
16
18
|
reset_host_known_keys! unless @host.new_record?
|
17
19
|
super
|
18
20
|
end
|
19
21
|
|
22
|
+
def remote_execution_pull
|
23
|
+
HostParameter.where(host: @host, name: 'host_registration_remote_execution_pull').destroy_all
|
24
|
+
|
25
|
+
setup_host_param('host_registration_remote_execution_pull', ActiveRecord::Type::Boolean.new.deserialize(params['setup_remote_execution_pull']))
|
26
|
+
end
|
27
|
+
|
20
28
|
def remote_execution_interface
|
21
29
|
return unless params['remote_execution_interface'].present?
|
22
30
|
|
@@ -275,6 +275,7 @@ module ForemanRemoteExecution
|
|
275
275
|
|
276
276
|
# Extend Registration module
|
277
277
|
extend_allowed_registration_vars :remote_execution_interface
|
278
|
+
extend_allowed_registration_vars :setup_remote_execution_pull
|
278
279
|
ForemanTasks.dynflow.eager_load_actions!
|
279
280
|
extend_observable_events(
|
280
281
|
::Dynflow::Action.descendants.select do |klass|
|
@@ -0,0 +1,73 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import PropTypes from 'prop-types';
|
3
|
+
|
4
|
+
import { translate as __ } from 'foremanReact/common/I18n';
|
5
|
+
import LabelIcon from 'foremanReact/components/common/LabelIcon';
|
6
|
+
|
7
|
+
import {
|
8
|
+
FormGroup,
|
9
|
+
FormSelectOption,
|
10
|
+
FormSelect,
|
11
|
+
} from '@patternfly/react-core';
|
12
|
+
|
13
|
+
const options = (value = '') => {
|
14
|
+
const defaultValue = value ? __('yes') : __('no');
|
15
|
+
const defaultLabel = `${__('Inherit from host parameter')} (${defaultValue})`;
|
16
|
+
|
17
|
+
return (
|
18
|
+
<>
|
19
|
+
<FormSelectOption key={0} value="" label={defaultLabel} />
|
20
|
+
<FormSelectOption key={1} value label={__('Yes (override)')} />
|
21
|
+
<FormSelectOption key={2} value={false} label={__('No (override)')} />
|
22
|
+
</>
|
23
|
+
);
|
24
|
+
};
|
25
|
+
|
26
|
+
const RexPull = ({ isLoading, onChange, pluginValues, configParams }) => (
|
27
|
+
<FormGroup
|
28
|
+
label={__('REX pull mode')}
|
29
|
+
isRequired
|
30
|
+
labelIcon={
|
31
|
+
<LabelIcon
|
32
|
+
text={__(
|
33
|
+
'Setup remote execution pull mode. If set to `Yes`, pull provider client will be deployed on the registered host. The inherited value is based on the `host_registration_remote_execution_pull` parameter. It can be inherited e.g. from host group, operating system, organization. When overridden, the selected value will be stored on host parameter level.'
|
34
|
+
)}
|
35
|
+
/>
|
36
|
+
}
|
37
|
+
fieldId="registration_setup_remote_execution_pull"
|
38
|
+
>
|
39
|
+
<FormSelect
|
40
|
+
value={pluginValues.setupRemoteExecutionPull}
|
41
|
+
onChange={setupRemoteExecutionPull =>
|
42
|
+
onChange({ setupRemoteExecutionPull })
|
43
|
+
}
|
44
|
+
className="without_select2"
|
45
|
+
id="registration_setup_remote_execution_pull"
|
46
|
+
isDisabled={isLoading}
|
47
|
+
isRequired
|
48
|
+
>
|
49
|
+
{/* eslint-disable-next-line camelcase */
|
50
|
+
options(configParams?.host_registration_remote_execution_pull)}
|
51
|
+
</FormSelect>
|
52
|
+
</FormGroup>
|
53
|
+
);
|
54
|
+
|
55
|
+
RexPull.propTypes = {
|
56
|
+
onChange: PropTypes.func,
|
57
|
+
isLoading: PropTypes.bool,
|
58
|
+
pluginValues: PropTypes.shape({
|
59
|
+
setupRemoteExecutionPull: PropTypes.bool,
|
60
|
+
}),
|
61
|
+
configParams: PropTypes.shape({
|
62
|
+
host_registration_remote_execution_pull: PropTypes.bool,
|
63
|
+
}),
|
64
|
+
};
|
65
|
+
|
66
|
+
RexPull.defaultProps = {
|
67
|
+
onChange: undefined,
|
68
|
+
isLoading: false,
|
69
|
+
pluginValues: {},
|
70
|
+
configParams: {},
|
71
|
+
};
|
72
|
+
|
73
|
+
export default RexPull;
|
@@ -3,6 +3,7 @@ import { addGlobalFill } from 'foremanReact/components/common/Fill/GlobalFill';
|
|
3
3
|
|
4
4
|
import FeaturesDropdown from '../components/FeaturesDropdown';
|
5
5
|
import RexInterface from '../components/RegistrationExtension/RexInterface';
|
6
|
+
import RexPull from '../components/RegistrationExtension/RexPull';
|
6
7
|
import RecentJobsCard from '../components/RecentJobsCard';
|
7
8
|
import KebabItems from '../components/HostKebab/KebabItems';
|
8
9
|
|
@@ -25,6 +26,12 @@ const fills = [
|
|
25
26
|
component: props => <RexInterface {...props} />,
|
26
27
|
weight: 500,
|
27
28
|
},
|
29
|
+
{
|
30
|
+
slot: 'registrationAdvanced',
|
31
|
+
name: 'pull',
|
32
|
+
component: props => <RexPull {...props} />,
|
33
|
+
weight: 500,
|
34
|
+
},
|
28
35
|
{
|
29
36
|
slot: '_rex-host-features',
|
30
37
|
name: '_rex-host-features',
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreman_remote_execution
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 7.
|
4
|
+
version: 7.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Foreman Remote Execution team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-08-
|
11
|
+
date: 2022-08-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: deface
|
@@ -492,6 +492,7 @@ files:
|
|
492
492
|
- webpack/react_app/components/RecentJobsCard/index.js
|
493
493
|
- webpack/react_app/components/RecentJobsCard/styles.scss
|
494
494
|
- webpack/react_app/components/RegistrationExtension/RexInterface.js
|
495
|
+
- webpack/react_app/components/RegistrationExtension/RexPull.js
|
495
496
|
- webpack/react_app/components/RegistrationExtension/__tests__/RexInterface.test.js
|
496
497
|
- webpack/react_app/components/RegistrationExtension/__tests__/__snapshots__/RexInterface.test.js.snap
|
497
498
|
- webpack/react_app/components/TargetingHosts/TargetingHosts.js
|