Skip to content

Commit bbc1487

Browse files
authored
Move download_type enum to own type alias (#525)
This allows users of PEADM to reuse the type and validate their input properly before calling peadm.
1 parent 5d12b3a commit bbc1487

File tree

5 files changed

+14
-5
lines changed

5 files changed

+14
-5
lines changed

REFERENCE.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
### Data types
4545

4646
* [`Peadm::ConvertSteps`](#Peadm--ConvertSteps): type for the different steps where the peadm::convert plan can be started
47+
* [`Peadm::Download_mode`](#Peadm--Download_mode): download the installer to the bolt node and upload to targets, or let the targets download it directly
4748
* [`Peadm::Known_hosts`](#Peadm--Known_hosts)
4849
* [`Peadm::Ldap_config`](#Peadm--Ldap_config)
4950
* [`Peadm::Pe_version`](#Peadm--Pe_version)
@@ -928,6 +929,12 @@ type for the different steps where the peadm::convert plan can be started
928929

929930
Alias of `Enum['modify-primary-certs', 'modify-infra-certs', 'convert-node-groups', 'finalize']`
930931

932+
### <a name="Peadm--Download_mode"></a>`Peadm::Download_mode`
933+
934+
download the installer to the bolt node and upload to targets, or let the targets download it directly
935+
936+
Alias of `Enum['direct', 'bolthost']`
937+
931938
### <a name="Peadm--Known_hosts"></a>`Peadm::Known_hosts`
932939

933940
The Peadm::Known_hosts data type.
@@ -2262,7 +2269,7 @@ Default value: `undef`
22622269

22632270
##### <a name="-peadm--install--download_mode"></a>`download_mode`
22642271

2265-
Data type: `Enum['direct', 'bolthost']`
2272+
Data type: `Peadm::Download_mode`
22662273

22672274

22682275

@@ -2654,7 +2661,7 @@ Default value: `undef`
26542661

26552662
##### <a name="-peadm--upgrade--download_mode"></a>`download_mode`
26562663

2657-
Data type: `Enum[direct,bolthost]`
2664+
Data type: `Peadm::Download_mode`
26582665

26592666

26602667

plans/install.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
Optional[String] $stagingdir = undef,
7272
Optional[String] $uploaddir = undef,
7373
Enum['running', 'stopped'] $final_agent_state = 'running',
74-
Enum['direct', 'bolthost'] $download_mode = 'bolthost',
74+
Peadm::Download_mode $download_mode = 'bolthost',
7575
Boolean $permit_unsafe_versions = false,
7676
String $token_lifetime = '1y',
7777
) {

plans/subplans/install.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
# Other
6969
String $stagingdir = '/tmp',
7070
String $uploaddir = '/tmp',
71-
Enum[direct,bolthost] $download_mode = 'bolthost',
71+
Peadm::Download_mode $download_mode = 'bolthost',
7272
Boolean $permit_unsafe_versions = false,
7373
String $token_lifetime = '1y',
7474
) {

plans/upgrade.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
String $stagingdir = '/tmp',
5858
String $uploaddir = '/tmp',
5959
Enum['running', 'stopped'] $final_agent_state = 'running',
60-
Enum[direct,bolthost] $download_mode = 'bolthost',
60+
Peadm::Download_mode $download_mode = 'bolthost',
6161
Boolean $permit_unsafe_versions = false,
6262

6363
Optional[Peadm::UpgradeSteps] $begin_at_step = undef,

types/download_mode.pp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# @summary download the installer to the bolt node and upload to targets, or let the targets download it directly
2+
type Peadm::Download_mode = Enum['direct','bolthost']

0 commit comments

Comments
 (0)