From 5eb682a569cdc4f33ea053e3619163c98aefcdd1 Mon Sep 17 00:00:00 2001 From: David Steele Date: Wed, 21 Feb 2018 18:10:53 -0500 Subject: [PATCH] Add id param for hosts created with host-add. The host-*-ip variable is created from the id param so the name param can be changed without affecting the host-*-ip variable. If id is not specified then it is copied from name. --- doc/lib/BackRestDoc/Common/DocExecute.pm | 13 +++++++++++-- doc/xml/dtd/doc.dtd | 1 + doc/xml/release.xml | 4 ++++ 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/doc/lib/BackRestDoc/Common/DocExecute.pm b/doc/lib/BackRestDoc/Common/DocExecute.pm index 973a40869..12f1ea1d9 100644 --- a/doc/lib/BackRestDoc/Common/DocExecute.pm +++ b/doc/lib/BackRestDoc/Common/DocExecute.pm @@ -817,6 +817,15 @@ sub hostKey image => $self->{oManifest}->variableReplace($oHost->paramGet('image')), }; + if (defined($oHost->paramGet('id', false))) + { + $hCacheKey->{id} = $self->{oManifest}->variableReplace($oHost->paramGet('id')); + } + else + { + $hCacheKey->{id} = $hCacheKey->{name}; + } + if (defined($oHost->paramGet('option', false))) { $$hCacheKey{option} = $self->{oManifest}->variableReplace($oHost->paramGet('option')); @@ -997,7 +1006,7 @@ sub sectionChildProcess if ($bCacheHit) { - $self->{oManifest}->variableSet("host-$$hCacheKey{name}-ip", $$hCacheValue{ip}, true); + $self->{oManifest}->variableSet('host-' . $hCacheKey->{id} . '-ip', $hCacheValue->{ip}, true); } else { @@ -1017,7 +1026,7 @@ sub sectionChildProcess $$hCacheKey{option}); $self->{host}{$$hCacheKey{name}} = $oHost; - $self->{oManifest}->variableSet("host-$$hCacheKey{name}-ip", $oHost->{strIP}, true); + $self->{oManifest}->variableSet('host-' . $hCacheKey->{id} . '-ip', $oHost->{strIP}, true); $$hCacheValue{ip} = $oHost->{strIP}; # Add to the host group diff --git a/doc/xml/dtd/doc.dtd b/doc/xml/dtd/doc.dtd index 08e1ca009..2146862a7 100644 --- a/doc/xml/dtd/doc.dtd +++ b/doc/xml/dtd/doc.dtd @@ -184,6 +184,7 @@ + diff --git a/doc/xml/release.xml b/doc/xml/release.xml index 55e2cfe65..075770af7 100644 --- a/doc/xml/release.xml +++ b/doc/xml/release.xml @@ -173,6 +173,10 @@

PDF rendering improvements. Check both doc-path and bin-path for logo. Allow PDF to be output to a location other than the output directory. Use PDF-specific version variable for more flexible formatting. Allow sections to be excluded from table of contents. More flexible replacements for titles and footers.

+ +

Add id param for hosts created with host-add. The host-*-ip variable is created from the id param so the name param can be changed without affecting the host-*-ip variable. If id is not specified then it is copied from name.

+
+

Deploy historical documentation to prior rather than the root directory.