From 95d7ea741812b2876423892767214afe0161b66f Mon Sep 17 00:00:00 2001 From: Misty Stanley-Jones Date: Thu, 11 Jan 2018 08:59:08 -0800 Subject: [PATCH] Update CLI template to add badges for orchestrator and experimentalcli --- _includes/cli.md | 38 +++++++++++++++++++++++++++++++++----- 1 file changed, 33 insertions(+), 5 deletions(-) diff --git a/_includes/cli.md b/_includes/cli.md index 5092b76d97..729529989c 100644 --- a/_includes/cli.md +++ b/_includes/cli.md @@ -33,11 +33,34 @@ your client and daemon API versions. > This command is experimental. > -> It should not be used in production environments. +> This command is experimental on the Docker daemon. It should not be used in production environments. {: .important } {% endif %} +{% if site.data[include.datafolder][include.datafile].experimentalcli %} + +> This command is experimental. +> +> This command is experimental on the Docker client. It should not be used in production environments. +{: .important } + +{% endif %} + +{% capture command-orchestrator %} +{% if site.data[include.datafolder][include.datafile].swarm %} + +Swarm This command works with the Swarm orchestrator. + +{% endif %} +{% if site.data[include.datafolder][include.datafile].kubernetes %} + +Kubernetes This command works with the Kubernetes orchestrator. + +{% endif %} +{% endcapture %}{{ command-orchestrator }} + + {% if site.data[include.datafolder][include.datafile].usage %} ## Usage @@ -48,7 +71,11 @@ your client and daemon API versions. {% endif %} {% if site.data[include.datafolder][include.datafile].options %} - + {% if site.data[include.datafolder][include.datafile].inherited_options %} + {% assign alloptions = site.data[include.datafolder][include.datafile].options | concat:site.data[include.datafolder][include.datafile].inherited_options %} + {% else %} + {% assign alloptions = site.data[include.datafolder][include.datafile].options %} + {% endif %} ## Options @@ -60,11 +87,12 @@ your client and daemon API versions. -{% for option in site.data[include.datafolder][include.datafile].options %} +{% for option in alloptions %} {% capture min-api %}{% if option.min_api_version %}API {{ option.min_api_version }}+ {% endif %}{%endcapture%} - {% capture stability-string %}{% if option.deprecated and option.experimental %}deprecated experimental {% elsif option.deprecated %}deprecated {% elsif option.experimental %}experimental {% endif %}{% endcapture %} - {% capture all-badges %}{% unless min-api == '' and stability-string == '' %}{{ min-api }}{{ stability-string }}
{% endunless %}{% endcapture %} + {% capture stability-string %}{% if option.deprecated and (option.experimental or option.experimentalcli) %}deprecated experimental {% elsif option.deprecated %}deprecated {% elsif (option.experimental or option.experimentalcli) %}experimental {% endif %}{% endcapture %} + {% capture flag-orchestrator %}{% if option.swarm %}Swarm{% endif %}{% if option.kubernetes %}Kubernetes{% endif %}{% endcapture %} + {% capture all-badges %}{% unless min-api == '' and stability-string == '' %}{{ min-api }}{{ stability-string }}{{ flag-orchestrator }}
{% endunless %}{% endcapture %} {% assign defaults-to-skip = "[],map[],false,0,0s,default,'',\"\"" | split: ',' %} {% capture option-default %}{% if option.default_value %}{% unless defaults-to-skip contains option.default_value or defaults-to-skip == blank %}`{{ option.default_value }}`{% endunless %}{% endif %}{% endcapture %}