Skip to content

Commit 9254030

Browse files
committed
fix some tcl examples
1 parent fbad5cd commit 9254030

File tree

2 files changed

+1075
-1039
lines changed

2 files changed

+1075
-1039
lines changed

static/api-docs/2023.3/TestShell-API/TestShell TCL API.html

Lines changed: 27 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -632,7 +632,7 @@
632632
string
633633
</td><td><b>approvalSid</b></td><td><div class="description">Leave empty. Used for internal purposes.</div></td></tr><tr><td>
634634
string
635-
</td><td><b>?resultXml?</b></td><td><div class="description">Specify the variable for the XML output.</div><div class="moreDescription">If a variable is not provided, the results will be sent to stdout.</div></td></tr></table><div><p><b>Example</b><div class="codeSnippetContainerCodeContainer"><div class="codeSnippetContainerCode" dir="ltr"><div style="color:Black;">::TestShellAPI::CreateImmediateReservation "immediate reservation" "admin" 30 0 0 0 resultXml</div></div></div><p><b>Output</b><br /><li><b>resultXml</b></li><div class="codeSnippetContainerCodeContainer"><div class="codeSnippetContainerCode" dir="ltr"><div style="color:Black;"><pre class="preStyle">
635+
</td><td><b>?resultXml?</b></td><td><div class="description">Specify the variable for the XML output.</div><div class="moreDescription">If a variable is not provided, the results will be sent to stdout.</div></td></tr></table><div><p><b>Example</b><div class="codeSnippetContainerCodeContainer"><div class="codeSnippetContainerCode" dir="ltr"><div style="color:Black;">::TestShellAPI::CreateImmediateReservation "immediate reservation" "admin" 30 0 0 0 0 resultXml</div></div></div><p><b>Output</b><br /><li><b>resultXml</b></li><div class="codeSnippetContainerCodeContainer"><div class="codeSnippetContainerCode" dir="ltr"><div style="color:Black;"><pre class="preStyle">
636636
&lt;ResponseInfo&gt;
637637
&lt;Reservation Id="28cb2a71-c8fc-4f41-a22b-e65685ebed14" Name="Immediate reservation" StartTime="2012-06-20T15:05:00" EndTime="2012-06-20T15:35:00" RecurrenceType="None" Owner="admin" Booked="true" Status="Active" ActualEndTime="" CreateDate="2012-06-20T15:05:06" ModificationDate="2012-06-20T15:05:06"&gt;
638638
&lt;Topologies/&gt;
@@ -691,7 +691,7 @@
691691
boolean
692692
</td><td><b>notifyOnSetupComplete</b></td><td><div class="description">Indicate whether to notify the reservation owner when the reservation setup completes.</div></td></tr><tr><td>
693693
string
694-
</td><td><b>?resultXml?</b></td><td><div class="description">Specify the variable for the XML output.</div><div class="moreDescription">If a variable is not provided, the results will be sent to stdout.</div></td></tr></table><div><p><b>Example</b><div class="codeSnippetContainerCodeContainer"><div class="codeSnippetContainerCode" dir="ltr"><div style="color:Black;">::TestShellAPI::CreateImmediateTopologyReservation "immediate reservation" "admin" 30 0 0 0 "Temp Automation Resources/TP1" {{"GlobalInputName_0" "GlobalInputValue_0"} {"GlobalInputName_1" "GlobalInputValue_1"}} {{"ResourceName_0" "RequiredInputName_0" "RequiredInputValue_0" "RequiredInputType_0"}} {{"ResourceName_0" "AdditionalInfoName_0" "AdditionalInfoValue_0"}} resultXml</div></div></div><p><b>Output</b><br /><li><b>resultXml</b></li><div class="codeSnippetContainerCodeContainer"><div class="codeSnippetContainerCode" dir="ltr"><div style="color:Black;"><pre class="preStyle">
694+
</td><td><b>?resultXml?</b></td><td><div class="description">Specify the variable for the XML output.</div><div class="moreDescription">If a variable is not provided, the results will be sent to stdout.</div></td></tr></table><div><p><b>Example</b><div class="codeSnippetContainerCodeContainer"><div class="codeSnippetContainerCode" dir="ltr"><div style="color:Black;">::TestShellAPI::CreateImmediateTopologyReservation "immediate reservation" "admin" 30 0 0 0 0 "Temp Automation Resources/TP1" {{"GlobalInputName_0" "GlobalInputValue_0"} {"GlobalInputName_1" "GlobalInputValue_1"}} {{"ResourceName_0" "RequiredInputName_0" "RequiredInputValue_0" "RequiredInputType_0"}} {{"ResourceName_0" "AdditionalInfoName_0" "AdditionalInfoValue_0"}} resultXml</div></div></div><p><b>Output</b><br /><li><b>resultXml</b></li><div class="codeSnippetContainerCodeContainer"><div class="codeSnippetContainerCode" dir="ltr"><div style="color:Black;"><pre class="preStyle">
695695
&lt;ResponseInfo&gt;
696696
&lt;Reservation Id="28cb2a71-c8fc-4f41-a22b-e65685ebed14" Name="Immediate reservation" StartTime="2012-06-20T15:05:00" EndTime="2012-06-20T15:35:00" RecurrenceType="None" Owner="admin" Booked="true" Status="Active" ActualEndTime="" CreateDate="2012-06-20T15:05:06" ModificationDate="2012-06-20T15:05:06"&gt;
697697
&lt;Topologies/&gt;
@@ -721,7 +721,7 @@
721721
string
722722
</td><td><b>approvalSid</b></td><td><div class="description">Leave empty. Used for internal purposes.</div></td></tr><tr><td>
723723
string
724-
</td><td><b>?resultXml?</b></td><td><div class="description">Specify the variable for the XML output.</div><div class="moreDescription">If a variable is not provided, the results will be sent to stdout.</div></td></tr></table><div><p><b>Example</b><div class="codeSnippetContainerCodeContainer"><div class="codeSnippetContainerCode" dir="ltr"><div style="color:Black;">::TestShellAPI::CreateReservation "test reservation" "admin" "01/01/1970 00:00" "12/21/2012 00:00" 1 1 10 resultXml</div></div></div><p><b>Output</b><br /><li><b>resultXml</b></li><div class="codeSnippetContainerCodeContainer"><div class="codeSnippetContainerCode" dir="ltr"><div style="color:Black;"><pre class="preStyle">
724+
</td><td><b>?resultXml?</b></td><td><div class="description">Specify the variable for the XML output.</div><div class="moreDescription">If a variable is not provided, the results will be sent to stdout.</div></td></tr></table><div><p><b>Example</b><div class="codeSnippetContainerCodeContainer"><div class="codeSnippetContainerCode" dir="ltr"><div style="color:Black;">::TestShellAPI::CreateReservation "test reservation" "admin" "01/01/2026 00:00" "12/21/2026 00:00" 1 1 0 0 0 "" resultXml</div></div></div><p><b>Output</b><br /><li><b>resultXml</b></li><div class="codeSnippetContainerCodeContainer"><div class="codeSnippetContainerCode" dir="ltr"><div style="color:Black;"><pre class="preStyle">
725725
&lt;ResponseInfo&gt;
726726
&lt;Reservation Id="af626b88-458b-4e7a-9054-c03d8cffa260" Name="test reservation" StartTime="2015-01-01T10:00:00" EndTime="2015-01-01T11:00:00" RecurrenceType="None" Owner="admin" Booked="true" Status="Pending" ActualEndTime="" CreateDate="2012-06-20T10:40:47" ModificationDate="2012-06-20T10:40:47"&gt;
727727
&lt;Topologies/&gt;
@@ -808,7 +808,12 @@
808808
string
809809
</td><td><b>resourceDescription</b></td><td><div class="description">Provide a short description to help identify the resource.</div></td></tr><tr><td>
810810
string
811-
</td><td><b>?resultXml?</b></td><td><div class="description">Specify the variable for the XML output.</div><div class="moreDescription">If a variable is not provided, the results will be sent to stdout.</div></td></tr></table><div><p><b>Example</b><div class="codeSnippetContainerCodeContainer"><div class="codeSnippetContainerCode" dir="ltr"><div style="color:Black;"><br /> #create chassis<br /> ::TestShellAPI::CreateResource "Generic Chassis" "Generic Chassis Model" "Router 1234" "192.168.1.200" "Lab Routers" "" "a generic router" resultXml<br /> #create a child port for the chassis<br /> ::TestShellAPI::CreateResource "Generic Port" "Generic Port Model" "Port 1" "1" "Lab Routers" "Router 1234" "a generic router port" resultXml<br /> </div></div></div><p><b>Output</b><br /><li><b>resultXml</b></li><div class="codeSnippetContainerCodeContainer"><div class="codeSnippetContainerCode" dir="ltr"><div style="color:Black;"><pre class="preStyle">
811+
</td><td><b>?resultXml?</b></td><td><div class="description">Specify the variable for the XML output.</div><div class="moreDescription">If a variable is not provided, the results will be sent to stdout.</div></td></tr></table><div><p><b>Example</b><div class="codeSnippetContainerCodeContainer"><div class="codeSnippetContainerCode" dir="ltr"><div style="color:Black;">
812+
<br /> #create chassis
813+
<br /> ::TestShellAPI::CreateResource "Generic Chassis" "Generic Chassis Model" "Router 1234" "192.168.1.200" "Lab Routers" "" "a generic router" resultXml
814+
<br /> #create a child port for the chassis
815+
<br /> ::TestShellAPI::CreateResource "Generic Port" "Generic Port Model" "Port 1" "1" "Lab Routers" "Router 1234" "a generic router port" resultXml
816+
<br /> </div></div></div><p><b>Output</b><br /><li><b>resultXml</b></li><div class="codeSnippetContainerCodeContainer"><div class="codeSnippetContainerCode" dir="ltr"><div style="color:Black;"><pre class="preStyle">
812817
&lt;ResponseInfo Name="Router 1234" FolderFullPath="Lab Routers" Address="192.168.1.200" FullAddress="192.168.1.200" RootAddress="192.168.1.200" ResourceFamilyName="Generic Chassis" ResourceModelName="Generic Chassis Model" Locked="false" Excluded="false" Description="a generic router"&gt;
813818
&lt;ResourceAttributes&gt;
814819
&lt;ResourceAttribute Name="SW_Version" Value="" Type="String"/&gt;
@@ -831,7 +836,12 @@
831836
list
832837
</td><td><b>resourceInfoDtos</b></td><td><div class="description">List of resources to add. </div></td></tr><tr><td>
833838
string
834-
</td><td><b>?resultXml?</b></td><td><div class="description">Specify the variable for the XML output.</div><div class="moreDescription">If a variable is not provided, the results will be sent to stdout.</div></td></tr></table><div><p><b>Example</b><div class="codeSnippetContainerCodeContainer"><div class="codeSnippetContainerCode" dir="ltr"><div style="color:Black;"><br /> #create chassis<br /> ::TestShellAPI::CreateResources {{"Generic Chassis" "Generic Chassis Model" "Router 1234" "192.168.1.200" "Lab Routers" "" "a generic router"}} resultXml<br /> #create two child ports for the chassis<br /> ::TestShellAPI::CreateResources {{Generic Port" "Generic Port Model" "Port 1" "1" "Lab Routers" "Router 1234" "a generic router port"} {Generic Port" "Generic Port Model" "Port 2" "2" "Lab Routers" "Router 1234" "a generic router port"}} resultXml<br /> </div></div></div><p><b>Output</b><br /><li><b>resultXml</b></li><div class="codeSnippetContainerCodeContainer"><div class="codeSnippetContainerCode" dir="ltr"><div style="color:Black;"><pre class="preStyle">&lt;ResponseInfo Output=""/&gt;</pre></div></div></div></p></p></div></div><a class="iref" href="#TOC">back to TOC</a><HR /><div class="command"><a name="CreateRouteInReservation" /><h3>CreateRouteInReservation<span class="commandTitle">Create a route between two resources.</span></h3><div class="description">Creates a route between the specified source and target resources.</div><p><b>
839+
</td><td><b>?resultXml?</b></td><td><div class="description">Specify the variable for the XML output.</div><div class="moreDescription">If a variable is not provided, the results will be sent to stdout.</div></td></tr></table><div><p><b>Example</b><div class="codeSnippetContainerCodeContainer"><div class="codeSnippetContainerCode" dir="ltr"><div style="color:Black;">
840+
<br /> #create chassis
841+
<br /> ::TestShellAPI::CreateResources {{"Generic Chassis" "Generic Chassis Model" "Router 1234" "192.168.1.200" "Lab Routers" "" "a generic router"}} resultXml
842+
<br /> #create two child ports for the chassis
843+
<br /> ::TestShellAPI::CreateResources {{Generic Port" "Generic Port Model" "Port 1" "1" "Lab Routers" "Router 1234" "a generic router port"} {Generic Port" "Generic Port Model" "Port 2" "2" "Lab Routers" "Router 1234" "a generic router port"}} resultXml
844+
<br /> </div></div></div><p><b>Output</b><br /><li><b>resultXml</b></li><div class="codeSnippetContainerCodeContainer"><div class="codeSnippetContainerCode" dir="ltr"><div style="color:Black;"><pre class="preStyle">&lt;ResponseInfo Output=""/&gt;</pre></div></div></div></p></p></div></div><a class="iref" href="#TOC">back to TOC</a><HR /><div class="command"><a name="CreateRouteInReservation" /><h3>CreateRouteInReservation<span class="commandTitle">Create a route between two resources.</span></h3><div class="description">Creates a route between the specified source and target resources.</div><p><b>
835845
Syntax
836846
</b></p><div class="codeSnippetContainerCodeContainer"><div class="codeSnippetContainerCode" dir="ltr"><div style="color:Black;"><pre><p class="syntax">::TestShellAPI::CreateRouteInReservation reservationId sourceResourceFullPath targetResourceFullPath overrideActiveRoutes mappingType maxHops routeAlias isShared ?resultXml?</p></pre></div></div></div><p><b>
837847
Parameters
@@ -1515,7 +1525,9 @@
15151525
string
15161526
</td><td><b>topologyPath</b></td><td><div class="description">Specify topology (name or full path). For full path, specify the full path from the root to the topology, separated by slashes. For example: FolderName/Topologies/TopologyName.</div></td></tr><tr><td>
15171527
string
1518-
</td><td><b>?resultXml?</b></td><td><div class="description">Specify the variable for the XML output. If a variable is not provided, the results will be sent to stdout.</div></td></tr></table><div><p><b>Example</b><div class="codeSnippetContainerCodeContainer"><div class="codeSnippetContainerCode" dir="ltr"><div style="color:Black;"><br /> ::TestShellAPI::GetCategoriesOfTopology "Folder1/exampleTopology" resultXml<br /> </div></div></div><p><b>Output</b><br /><li><b>resultXml</b></li><div class="codeSnippetContainerCodeContainer"><div class="codeSnippetContainerCode" dir="ltr"><div style="color:Black;"><pre class="preStyle">
1528+
</td><td><b>?resultXml?</b></td><td><div class="description">Specify the variable for the XML output. If a variable is not provided, the results will be sent to stdout.</div></td></tr></table><div><p><b>Example</b><div class="codeSnippetContainerCodeContainer"><div class="codeSnippetContainerCode" dir="ltr"><div style="color:Black;">
1529+
<br /> ::TestShellAPI::GetCategoriesOfTopology "Folder1/exampleTopology" resultXml
1530+
<br /> </div></div></div><p><b>Output</b><br /><li><b>resultXml</b></li><div class="codeSnippetContainerCodeContainer"><div class="codeSnippetContainerCode" dir="ltr"><div style="color:Black;"><pre class="preStyle">
15191531
&lt;ResponseInfo xsi:type="CategoriesOfTopologyInfo"&gt;
15201532
&lt;Categories&gt;
15211533
&lt;Category Name="sampleCategory" Value="hello"/&gt;
@@ -2202,7 +2214,9 @@
22022214
string
22032215
</td><td><b>categoryValue</b></td><td><div class="description">Specify the category's value/sub category</div></td></tr><tr><td>
22042216
string
2205-
</td><td><b>?resultXml?</b></td><td><div class="description">Specify the variable for the XML output.</div><div class="moreDescription">If a variable is not provided, the results will be sent to stdout.</div></td></tr></table><div><p><b>Example</b><div class="codeSnippetContainerCodeContainer"><div class="codeSnippetContainerCode" dir="ltr"><div style="color:Black;"><br /> ::TestShellAPI::GetTopologiesByCategory lookUpCategory bonjour resultXml<br /> </div></div></div><p><b>Output</b><br /><li><b>resultXml</b></li><div class="codeSnippetContainerCodeContainer"><div class="codeSnippetContainerCode" dir="ltr"><div style="color:Black;"><pre class="preStyle">
2217+
</td><td><b>?resultXml?</b></td><td><div class="description">Specify the variable for the XML output.</div><div class="moreDescription">If a variable is not provided, the results will be sent to stdout.</div></td></tr></table><div><p><b>Example</b><div class="codeSnippetContainerCodeContainer"><div class="codeSnippetContainerCode" dir="ltr"><div style="color:Black;">
2218+
<br /> ::TestShellAPI::GetTopologiesByCategory lookUpCategory bonjour resultXml
2219+
<br /> </div></div></div><p><b>Output</b><br /><li><b>resultXml</b></li><div class="codeSnippetContainerCodeContainer"><div class="codeSnippetContainerCode" dir="ltr"><div style="color:Black;"><pre class="preStyle">
22062220
&lt;ResponseInfo&gt;
22072221
&lt;Topologies&gt;
22082222
&lt;FullPath&gt;
@@ -2598,7 +2612,9 @@
25982612
string
25992613
</td><td><b>categoryName</b></td><td><div class="description">Specify the category's name which we want to remove.</div></td></tr><tr><td>
26002614
string
2601-
</td><td><b>?resultXml?</b></td><td><div class="description">Specify the variable for the XML output. If a variable is not provided, the results will be sent to stdout.</div></td></tr></table><div><p><b>Example</b><div class="codeSnippetContainerCodeContainer"><div class="codeSnippetContainerCode" dir="ltr"><div style="color:Black;"><br /> ::TestShellAPI::RemoveTopologyCategory "myDir/myTopology" lookUpCategory resultXml<br /> </div></div></div></p></div></div><a class="iref" href="#TOC">back to TOC</a><HR /><div class="command"><a name="MoveResources" /><h3>MoveResources<span class="commandTitle">Move multiple resources.</span></h3><div class="description">Allows to change the folder that the specified root resources belong to.</div><p><b>
2615+
</td><td><b>?resultXml?</b></td><td><div class="description">Specify the variable for the XML output. If a variable is not provided, the results will be sent to stdout.</div></td></tr></table><div><p><b>Example</b><div class="codeSnippetContainerCodeContainer"><div class="codeSnippetContainerCode" dir="ltr"><div style="color:Black;">
2616+
<br /> ::TestShellAPI::RemoveTopologyCategory "myDir/myTopology" lookUpCategory resultXml
2617+
<br /> </div></div></div></p></div></div><a class="iref" href="#TOC">back to TOC</a><HR /><div class="command"><a name="MoveResources" /><h3>MoveResources<span class="commandTitle">Move multiple resources.</span></h3><div class="description">Allows to change the folder that the specified root resources belong to.</div><p><b>
26022618
Syntax
26032619
</b></p><div class="codeSnippetContainerCodeContainer"><div class="codeSnippetContainerCode" dir="ltr"><div style="color:Black;"><pre><p class="syntax">::TestShellAPI::MoveResources resourcesName targetFolder ?resultXml?</p></pre></div></div></div><p><b>
26042620
Parameters
@@ -2941,7 +2957,9 @@
29412957
string
29422958
</td><td><b>categoryValue</b></td><td><div class="description">Specify the category's value</div></td></tr><tr><td>
29432959
string
2944-
</td><td><b>?resultXml?</b></td><td><div class="description">Specify the variable for the XML output. If a variable is not provided, the results will be sent to stdout.</div></td></tr></table><div><p><b>Example</b><div class="codeSnippetContainerCodeContainer"><div class="codeSnippetContainerCode" dir="ltr"><div style="color:Black;"><br /> ::TestShellAPI::SetTopologyCategory "dir1/myTopology" lookUpCategory bonjour resultXml<br /> </div></div></div></p></div></div><a class="iref" href="#TOC">back to TOC</a><HR /><div class="command"><a name="SyncResourceFromDevice" /><h3>SyncResourceFromDevice<span class="commandTitle">Update a resource with current device settings and mappings.</span></h3><div class="description">Synchronizes the specified resource with current device settings and mappings.</div><p><b>
2960+
</td><td><b>?resultXml?</b></td><td><div class="description">Specify the variable for the XML output. If a variable is not provided, the results will be sent to stdout.</div></td></tr></table><div><p><b>Example</b><div class="codeSnippetContainerCodeContainer"><div class="codeSnippetContainerCode" dir="ltr"><div style="color:Black;">
2961+
<br /> ::TestShellAPI::SetTopologyCategory "dir1/myTopology" lookUpCategory bonjour resultXml
2962+
<br /> </div></div></div></p></div></div><a class="iref" href="#TOC">back to TOC</a><HR /><div class="command"><a name="SyncResourceFromDevice" /><h3>SyncResourceFromDevice<span class="commandTitle">Update a resource with current device settings and mappings.</span></h3><div class="description">Synchronizes the specified resource with current device settings and mappings.</div><p><b>
29452963
Syntax
29462964
</b></p><div class="codeSnippetContainerCodeContainer"><div class="codeSnippetContainerCode" dir="ltr"><div style="color:Black;"><pre><p class="syntax">::TestShellAPI::SyncResourceFromDevice resourceFullPath ?resultXml?</p></pre></div></div></div><p><b>
29472965
Parameters

0 commit comments

Comments
 (0)