ActivateTopologyActivate a topology.
Syntax
ActivateTopology(reservationId,topologyFullPath,out activatedTopology,out resources,out attributes,out routes,out connectors, out segments,out resultXml);
Parameters
Type | Name | Description |
---|---|---|
string | reservationId | Specify the string that represents the reservation’s unique identifier. |
string | topologyFullPath | 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. |
out string[,] | activatedTopology | The activated topology and its associated values. |
out string[,] | resources | List of resources and resource values associated with the activated topology. |
out string[,] | attributes | Attributes and attribute values for resources associated with the specified topology. |
out string[,] | routes | Routes and route values associated with the activated topologies. |
out string[,] | connectors | Visual connectors and their values associated with the activated topologies. |
out string[,] | segments | Segment details for topology routes in the specified reservation. Each route is comprised of one or more segments. |
out string | resultXml | Specify the variable for the XML output. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
string reservationId = "af626b88-458b-4e7a-9054-c03d8cffa260";
string[,] activatedTopology, resources, attributes, routes, segments;
string resultXml;
testShellAPI.ActivateTopology(reservationId,"Temp Automation Resources/TP1",out activatedTopology,out resources,out attributes,out routes,out connectors,out segments,out resultXml);
Output
{{"Index","TopologyReservationName","TopologyName","Username","MachineName"},
{"1","TP1","TP1","admin","PRODUCT-W7 - Studio"}}
{{"Index","ActiveTopologyIndex","TopologyReservationName","Name","Address","FullAddress","RootAddress","ResourceFamilyName","ResourceModelName","FolderFullPath","Locked","LockInfo_ReservationName","LockInfo_Username","LockInfo_MachineName","LockInfo_Created","Alias"},
{"1","1","TP1","Router 1234","192.168.1.201","192.168.1.201","192.168.1.201","Generic Chassis","Generic Chassis Model","Lab Routers","False","","","","","Router 1234"},
{"2","1","TP1","L1 Switch 1234/Blade 1/Port 1","1","192.168.43.240/1/1","192.168.43.240","L1 Switch Port","Port EMPMC-36RJ","Temp Automation Resources","True","Immediate reservation","admin","PRODUCT-W7 - Tcl","6/20/2012 6:03:50 PM",""},
{"3","1","TP1","L1 Switch 1234/Blade 1/Port 2","2","192.168.43.240/1/2","192.168.43.240","L1 Switch Port","Port EMPMC-36RJ","Temp Automation Resources","True","Immediate reservation","admin","PRODUCT-W7 - Tcl","6/20/2012 6:03:50 PM",""},
{"4","1","TP1","L1 Switch 1234/Blade 1/Port 3","3","192.168.43.240/1/3","192.168.43.240","L1 Switch Port","Port EMPMC-36RJ","Temp Automation Resources","True","Immediate reservation","admin","PRODUCT-W7 - Tcl","6/20/2012 6:03:50 PM",""},
{"5","1","TP1","GenericResource 1234","192.168.1.20","192.168.1.20","192.168.1.20","Generic Resource","Generic Resource Model","Temp Automation Resources","True","Immediate reservation","admin","PRODUCT-W7 - Tcl","6/20/2012 6:03:50 PM","GenericResource 1234"},
{"6","1","TP1","GenericResource 1234/Port 1","1","192.168.1.20/1","192.168.1.20","Generic Port","Generic Port Model","Temp Automation Resources","True","Immediate reservation","admin","PRODUCT-W7 - Tcl","6/20/2012 6:03:50 PM","Port 1"},
{"7","1","TP1","GenericResource 1234/Port 2","2","192.168.1.20/2","192.168.1.20","Generic Port","Generic Port Model","Temp Automation Resources","True","Immediate reservation","admin","PRODUCT-W7 - Tcl","6/20/2012 6:03:50 PM","Port 2"},
{"8","1","TP1","GenericResource 1234/PowerPort 11","11","192.168.1.20/11","192.168.1.20","Generic Port","Generic Port Model","Temp Automation Resources","True","Immediate reservation","admin","PRODUCT-W7 - Tcl","6/20/2012 6:03:50 PM","PowerPort 11"},
{"9","1","TP1","GenericResource 1234/PowerPort 12","12","192.168.1.20/12","192.168.1.20","Generic Port","Generic Port Model","Temp Automation Resources","True","Immediate reservation","admin","PRODUCT-W7 - Tcl","6/20/2012 6:03:50 PM","PowerPort 12"},
{"10","1","TP1","GenericResource 1234/ConsolePort 21","21","192.168.1.20/21","192.168.1.20","Generic Port","Generic Port Model","Temp Automation Resources","True","Immediate reservation","admin","PRODUCT-W7 - Tcl","6/20/2012 6:03:50 PM","ConsolePort 21"},
{"11","1","TP1","Router 1234/Port 1","1","192.168.1.201/1","192.168.1.201","Generic Port","Generic Port Model","Lab Routers","True","Immediate reservation","admin","PRODUCT-W7 - Tcl","6/20/2012 6:03:50 PM","Port 1"}}
{{"ResourceIndex","ResourceName","Name","Value","Type"},
{"1","Router 1234","SW_Version","","String"},
{"2","L1 Switch 1234/Blade 1/Port 1","Shutdown","Disable","Lookup"},
{"2","L1 Switch 1234/Blade 1/Port 1","Linked","False","String"},
{"2","L1 Switch 1234/Blade 1/Port 1","Shutdown Unmapped","Enable","Lookup"},
{"2","L1 Switch 1234/Blade 1/Port 1","LIN","Disable","Lookup"},
{"2","L1 Switch 1234/Blade 1/Port 1","Auto Negotiation","True","Boolean"},
{"2","L1 Switch 1234/Blade 1/Port 1","Speed","10 Mbps","Lookup"},
{"2","L1 Switch 1234/Blade 1/Port 1","Duplex","Full","Lookup"},
{"2","L1 Switch 1234/Blade 1/Port 1","Link Match","Enable","Lookup"},
{"2","L1 Switch 1234/Blade 1/Port 1","MDI","AutoSense","Lookup"},
{"2","L1 Switch 1234/Blade 1/Port 1","Auto Negotiation Advertise","Other/Uknown","Lookup"},
{"3","L1 Switch 1234/Blade 1/Port 2","Shutdown","Enable","Lookup"},
{"3","L1 Switch 1234/Blade 1/Port 2","Linked","False","String"},
{"3","L1 Switch 1234/Blade 1/Port 2","Shutdown Unmapped","Enable","Lookup"},
{"3","L1 Switch 1234/Blade 1/Port 2","LIN","Disable","Lookup"},
{"3","L1 Switch 1234/Blade 1/Port 2","Auto Negotiation","True","Boolean"},
{"3","L1 Switch 1234/Blade 1/Port 2","Speed","1 Gbps","Lookup"},
{"3","L1 Switch 1234/Blade 1/Port 2","Duplex","Full","Lookup"},
{"3","L1 Switch 1234/Blade 1/Port 2","Link Match","Enable","Lookup"},
{"3","L1 Switch 1234/Blade 1/Port 2","MDI","AutoSense","Lookup"},
{"3","L1 Switch 1234/Blade 1/Port 2","Auto Negotiation Advertise","Other/Uknown","Lookup"},
{"4","L1 Switch 1234/Blade 1/Port 3","Shutdown","Enable","Lookup"},
{"4","L1 Switch 1234/Blade 1/Port 3","Linked","False","String"},
{"4","L1 Switch 1234/Blade 1/Port 3","Shutdown Unmapped","Enable","Lookup"},
{"4","L1 Switch 1234/Blade 1/Port 3","LIN","Disable","Lookup"},
{"4","L1 Switch 1234/Blade 1/Port 3","Auto Negotiation","True","Boolean"},
{"4","L1 Switch 1234/Blade 1/Port 3","Speed","1 Gbps","Lookup"},
{"4","L1 Switch 1234/Blade 1/Port 3","Duplex","Full","Lookup"},
{"4","L1 Switch 1234/Blade 1/Port 3","Link Match","Enable","Lookup"},
{"4","L1 Switch 1234/Blade 1/Port 3","MDI","AutoSense","Lookup"},
{"4","L1 Switch 1234/Blade 1/Port 3","Auto Negotiation Advertise","Other/Uknown","Lookup"}}
{{"Index","Source","Target","RouteType","Alias","Shared"},
{"1","Temp Automation Resources/GenericResource 1234/Port 1","Lab Routers/Router 1234/Port 1","bi","","True"},
{"2","Lab Routers/Router 1234/Port 1","Temp Automation Resources/GenericResource 1234/Port 2","uni","","True"}}
{{"Alias","Type","Resource mapping type","Source","Target"}}
{{"RouteIndex","Source","Target"},
{"1","Temp Automation Resources/GenericResource 1234/Port 1","Temp Automation Resources/L1 Switch 1234/Blade 1/Port 1"},
{"1","Temp Automation Resources/L1 Switch 1234/Blade 1/Port 1","Temp Automation Resources/L1 Switch 1234/Blade 1/Port 3"},
{"1","Temp Automation Resources/L1 Switch 1234/Blade 1/Port 3","Lab Routers/Router 1234/Port 1"},
{"2","Lab Routers/Router 1234/Port 1","Temp Automation Resources/L1 Switch 1234/Blade 1/Port 3"},
{"2","Temp Automation Resources/L1 Switch 1234/Blade 1/Port 3","Temp Automation Resources/L1 Switch 1234/Blade 1/Port 2"},
{"2","Temp Automation Resources/L1 Switch 1234/Blade 1/Port 2","Temp Automation Resources/GenericResource 1234/Port 2"}}
<ResponseInfo Name="TP1" MachineName="PRODUCT-W7 - Tcl" Username="admin" Topology="TP1">
<Resources>
<ResourceInfo Name="Router 1234" FolderFullPath="Lab Routers" Address="192.168.1.201" FullAddress="192.168.1.201" RootAddress="192.168.1.201" ResourceFamilyName="Generic Chassis" ResourceModelName="Generic Chassis Model" Alias="Router 1234" Locked="false">
<ResourceAttributes>
<ResourceAttribute Name="SW_Version" Value="" Type="String"/>
</ResourceAttributes>
<LockInfo/>
</ResourceInfo>
<ResourceInfo Name="L1 Switch 1234/Blade 1/Port 1" FolderFullPath="Temp Automation Resources" Address="1" FullAddress="192.168.43.240/1/1" RootAddress="192.168.43.240" ResourceFamilyName="L1 Switch Port" ResourceModelName="Port EMPMC-36RJ" Alias="" Locked="true">
<ResourceAttributes>
<ResourceAttribute Name="Shutdown" Value="Disable" Type="Lookup"/>
<ResourceAttribute Name="Linked" Value="False" Type="String"/>
<ResourceAttribute Name="Shutdown Unmapped" Value="Enable" Type="Lookup"/>
<ResourceAttribute Name="LIN" Value="Disable" Type="Lookup"/>
<ResourceAttribute Name="Auto Negotiation" Value="True" Type="Boolean"/>
<ResourceAttribute Name="Speed" Value="10 Mbps" Type="Lookup"/>
<ResourceAttribute Name="Duplex" Value="Full" Type="Lookup"/>
<ResourceAttribute Name="Link Match" Value="Enable" Type="Lookup"/>
<ResourceAttribute Name="MDI" Value="AutoSense" Type="Lookup"/>
<ResourceAttribute Name="Auto Negotiation Advertise" Value="Other/Uknown" Type="Lookup"/>
</ResourceAttributes>
<LockInfo ReservationName="Immediate reservation" MachineName="PRODUCT-W7 - Tcl" Username="admin" Created="2012-06-20T18:03:50"/>
<Connections FullPath="Temp Automation Resources/GenericResource 1234/Port 1"/>
</ResourceInfo>
<ResourceInfo Name="L1 Switch 1234/Blade 1/Port 2" FolderFullPath="Temp Automation Resources" Address="2" FullAddress="192.168.43.240/1/2" RootAddress="192.168.43.240" ResourceFamilyName="L1 Switch Port" ResourceModelName="Port EMPMC-36RJ" Alias="" Locked="true">
<ResourceAttributes>
<ResourceAttribute Name="Shutdown" Value="Enable" Type="Lookup"/>
<ResourceAttribute Name="Linked" Value="False" Type="String"/>
<ResourceAttribute Name="Shutdown Unmapped" Value="Enable" Type="Lookup"/>
<ResourceAttribute Name="LIN" Value="Disable" Type="Lookup"/>
<ResourceAttribute Name="Auto Negotiation" Value="True" Type="Boolean"/>
<ResourceAttribute Name="Speed" Value="1 Gbps" Type="Lookup"/>
<ResourceAttribute Name="Duplex" Value="Full" Type="Lookup"/>
<ResourceAttribute Name="Link Match" Value="Enable" Type="Lookup"/>
<ResourceAttribute Name="MDI" Value="AutoSense" Type="Lookup"/>
<ResourceAttribute Name="Auto Negotiation Advertise" Value="Other/Uknown" Type="Lookup"/>
</ResourceAttributes>
<LockInfo ReservationName="Immediate reservation" MachineName="PRODUCT-W7 - Tcl" Username="admin" Created="2012-06-20T18:03:50"/>
<Connections FullPath="Temp Automation Resources/GenericResource 1234/Port 2"/>
</ResourceInfo>
<ResourceInfo Name="L1 Switch 1234/Blade 1/Port 3" FolderFullPath="Temp Automation Resources" Address="3" FullAddress="192.168.43.240/1/3" RootAddress="192.168.43.240" ResourceFamilyName="L1 Switch Port" ResourceModelName="Port EMPMC-36RJ" Alias="" Locked="true">
<ResourceAttributes>
<ResourceAttribute Name="Shutdown" Value="Enable" Type="Lookup"/>
<ResourceAttribute Name="Linked" Value="False" Type="String"/>
<ResourceAttribute Name="Shutdown Unmapped" Value="Enable" Type="Lookup"/>
<ResourceAttribute Name="LIN" Value="Disable" Type="Lookup"/>
<ResourceAttribute Name="Auto Negotiation" Value="True" Type="Boolean"/>
<ResourceAttribute Name="Speed" Value="1 Gbps" Type="Lookup"/>
<ResourceAttribute Name="Duplex" Value="Full" Type="Lookup"/>
<ResourceAttribute Name="Link Match" Value="Enable" Type="Lookup"/>
<ResourceAttribute Name="MDI" Value="AutoSense" Type="Lookup"/>
<ResourceAttribute Name="Auto Negotiation Advertise" Value="Other/Uknown" Type="Lookup"/>
</ResourceAttributes>
<LockInfo ReservationName="Immediate reservation" MachineName="PRODUCT-W7 - Tcl" Username="admin" Created="2012-06-20T18:03:50"/>
<Connections FullPath="Lab Routers/Router 1234/Port 1"/>
</ResourceInfo>
<ResourceInfo Name="GenericResource 1234" FolderFullPath="Temp Automation Resources" Address="192.168.1.20" FullAddress="192.168.1.20" RootAddress="192.168.1.20" ResourceFamilyName="Generic Resource" ResourceModelName="Generic Resource Model" Alias="GenericResource 1234" Locked="true">
<ResourceAttributes/>
<LockInfo ReservationName="Immediate reservation" MachineName="PRODUCT-W7 - Tcl" Username="admin" Created="2012-06-20T18:03:50"/>
</ResourceInfo>
<ResourceInfo Name="GenericResource 1234/Port 1" FolderFullPath="Temp Automation Resources" Address="1" FullAddress="192.168.1.20/1" RootAddress="192.168.1.20" ResourceFamilyName="Generic Port" ResourceModelName="Generic Port Model" Alias="Port 1" Locked="true">
<ResourceAttributes/>
<LockInfo ReservationName="Immediate reservation" MachineName="PRODUCT-W7 - Tcl" Username="admin" Created="2012-06-20T18:03:50"/>
<Connections FullPath="Temp Automation Resources/L1 Switch 1234/Blade 1/Port 1"/>
</ResourceInfo>
<ResourceInfo Name="GenericResource 1234/Port 2" FolderFullPath="Temp Automation Resources" Address="2" FullAddress="192.168.1.20/2" RootAddress="192.168.1.20" ResourceFamilyName="Generic Port" ResourceModelName="Generic Port Model" Alias="Port 2" Locked="true">
<ResourceAttributes/>
<LockInfo ReservationName="Immediate reservation" MachineName="PRODUCT-W7 - Tcl" Username="admin" Created="2012-06-20T18:03:50"/>
<Connections FullPath="Temp Automation Resources/L1 Switch 1234/Blade 1/Port 2"/>
</ResourceInfo>
<ResourceInfo Name="GenericResource 1234/PowerPort 11" FolderFullPath="Temp Automation Resources" Address="11" FullAddress="192.168.1.20/11" RootAddress="192.168.1.20" ResourceFamilyName="Generic Port" ResourceModelName="Generic Port Model" Alias="PowerPort 11" Locked="true">
<ResourceAttributes/>
<LockInfo ReservationName="Immediate reservation" MachineName="PRODUCT-W7 - Tcl" Username="admin" Created="2012-06-20T18:03:50"/>
<Connections FullPath="Temp Automation Resources/SmartPower2L 1234/PowerPort 1"/>
</ResourceInfo>
<ResourceInfo Name="GenericResource 1234/PowerPort 12" FolderFullPath="Temp Automation Resources" Address="12" FullAddress="192.168.1.20/12" RootAddress="192.168.1.20" ResourceFamilyName="Generic Port" ResourceModelName="Generic Port Model" Alias="PowerPort 12" Locked="true">
<ResourceAttributes/>
<LockInfo ReservationName="Immediate reservation" MachineName="PRODUCT-W7 - Tcl" Username="admin" Created="2012-06-20T18:03:50"/>
<Connections FullPath="Temp Automation Resources/SmartPower2L 1234/PowerPort 2"/>
</ResourceInfo>
<ResourceInfo Name="GenericResource 1234/ConsolePort 21" FolderFullPath="Temp Automation Resources" Address="21" FullAddress="192.168.1.20/21" RootAddress="192.168.1.20" ResourceFamilyName="Generic Port" ResourceModelName="Generic Port Model" Alias="ConsolePort 21" Locked="true">
<ResourceAttributes/>
<LockInfo ReservationName="Immediate reservation" MachineName="PRODUCT-W7 - Tcl" Username="admin" Created="2012-06-20T18:03:50"/>
<Connections FullPath="Temp Automation Resources/ConsoleServer 1234/ConsolePort 1"/>
</ResourceInfo>
<ResourceInfo Name="Router 1234/Port 1" FolderFullPath="Lab Routers" Address="1" FullAddress="192.168.1.201/1" RootAddress="192.168.1.201" ResourceFamilyName="Generic Port" ResourceModelName="Generic Port Model" Alias="Port 1" Locked="true">
<ResourceAttributes/>
<LockInfo ReservationName="Immediate reservation" MachineName="PRODUCT-W7 - Tcl" Username="admin" Created="2012-06-20T18:03:50"/>
<Connections FullPath="Temp Automation Resources/L1 Switch 1234/Blade 1/Port 3"/>
</ResourceInfo>
</Resources>
<Routes>
<Route Source="Temp Automation Resources/GenericResource 1234/Port 1" Target="Lab Routers/Router 1234/Port 1" RouteType="bi" Shared="true">
<Segments>
<Segment Source="Temp Automation Resources/GenericResource 1234/Port 1" Target="Temp Automation Resources/L1 Switch 1234/Blade 1/Port 1"/>
<Segment Source="Temp Automation Resources/L1 Switch 1234/Blade 1/Port 1" Target="Temp Automation Resources/L1 Switch 1234/Blade 1/Port 3"/>
<Segment Source="Temp Automation Resources/L1 Switch 1234/Blade 1/Port 3" Target="Lab Routers/Router 1234/Port 1"/>
</Segments>
</Route>
<Route Source="Lab Routers/Router 1234/Port 1" Target="Temp Automation Resources/GenericResource 1234/Port 2" RouteType="uni" Shared="true">
<Segments>
<Segment Source="Lab Routers/Router 1234/Port 1" Target="Temp Automation Resources/L1 Switch 1234/Blade 1/Port 3"/>
<Segment Source="Temp Automation Resources/L1 Switch 1234/Blade 1/Port 3" Target="Temp Automation Resources/L1 Switch 1234/Blade 1/Port 2"/>
<Segment Source="Temp Automation Resources/L1 Switch 1234/Blade 1/Port 2" Target="Temp Automation Resources/GenericResource 1234/Port 2"/>
</Segments>
</Route>
</Routes>
<Connectors>
</Connectors>
</ResponseInfo>
AddGroupsToDomainAdd groups to a domain.
Syntax
AddGroupsToDomain(domainName,groupNames,viewOnly);
Parameters
Type | Name | Description |
---|---|---|
string | domainName | Specify the name of the domain. |
string[] | groupNames | Specify an array of one or more groups. |
YesNoOptions | readOnly | Specify if the array of group should be added with view only permissions. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
testShellAPI.AddGroupsToDomain("Global", new string[,] { "QA_Users", "RND_Users" }, YesNoOptions.Yes);
AddNewDomainAdds a new domain.
Syntax
AddNewDomain(domainName,description);
Parameters
Type | Name | Description |
---|---|---|
string | domainName | Specify the name of the domain. |
string | description | Specify the description of the domain. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
testShellAPI.AddNewDomain("Domain1","My Domain");
AddNewGroupAdd a new group.
Syntax
AddNewGroup(groupName,description,groupRole);
Parameters
Type | Name | Description |
---|---|---|
string | groupName | Specify the name of the group. |
string | description | Provide a short description of the group. |
AddRoleOptions | groupRole | Specify the role of the group, possible values: External, Regular, DomainAdmin. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
testShellAPI.AddNewGroup("QA_Users","QA users", GroupRole.Regular);
AddNewUserAdd a new TestShell user.
Syntax
AddNewUser(username,password,email,isActive,isAdmin);
Parameters
Type | Name | Description |
---|---|---|
string | username | Specify the name of the user. |
string | password | Specify the user’s login password. |
string | Specify the user’s email address. | |
YesNoOptions | isActive | Grant or deny active access to the application. |
YesNoOptions | isAdmin | Add the user to the System Administrators group. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
testShellAPI.AddNewUser("User1234","pass1234","user1234@work.com",YesNoOptions.Yes,YesNoOptions.No);
AddPermittedUsersToReservationAdd permitted users to a reservation.
Syntax
AddPermittedUsersToReservation(reservationId,usernames);
Parameters
Type | Name | Description |
---|---|---|
string | reservationId | Specify the string that represents the reservation’s unique identifier. |
string[] | usernames | List of users to permit access to the reservation. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
testShellAPI.AddPermittedUsersToReservation("2d2f7cde-20g3-4bac-80d2-e8cfhecef45b",new string[]{"name1","name2"});
AddResourcesToDomainAdd resources to a domain.
Syntax
AddResourcesToDomain(domainName,resourcesNames,includeDecendants);
Parameters
Type | Name | Description |
---|---|---|
string | domainName | Specify the name of the domain. |
string[] | resourcesNames | Specify a list of resource names. You can also include the full path from the root to the resource before the resource name, separated by slashes. For example: FolderName/ResourceName |
YesNoOptions | includeDecendants | Specify whether to include child resources. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
testShellAPI.AddResourcesToDomain("Domain1", new string[]{"Router 1234","GenericResource 1234"}, YesNoOptions.Yes);
AddResourcesToReservationReserve resources for locking.
Syntax
AddResourcesToReservation(reservationId,resourcesFullPath,shared,out conflicts,out resultXml);
Parameters
Type | Name | Description |
---|---|---|
string | reservationId | Specify the string that represents the reservation’s unique identifier. |
string[] | resourcesFullPath | Specify a list of resource names. You can also include the full path from the root to the resource before the resource name, separated by slashes. For example: FolderName/ResourceName |
Shareability | shared | Specify whether all resources will be shared among other enviroments |
out string[,] | conflicts | Resource conflicts and their associated values for the specified reservation. |
out string | resultXml | Specify the variable for the XML output. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
string reservationId = "af626b88-458b-4e7a-9054-c03d8cffa260";
string[,] conflicts;
string resultXml;
testShellAPI.AddResourcesToReservation(reservationId, new string[]{"Router 1234","GenericResource 1234"}, Shareability.Shared, out conflicts, out resultXml);
Output
<ResponseInfo>
<Conflicts/>
</ResponseInfo>
AddRoutesToReservationReserve specified routes.
Syntax
AddRoutesToReservation(reservationId,sourceResourcesFullPath,targetResourcesFullPath,mappingType,maxHops,routeAlias,isShared,out segments,out resultXml);
Parameters
Type | Name | Description |
---|---|---|
string | reservationId | Specify the string that represents the reservation’s unique identifier. |
string[] | sourceResourcesFullPath | Specify a list of resource names. You can also include the full path from the root to the resource before the resource name, separated by slashes. For example: FolderName/ResourceName |
string[] | targetResourcesFullPath | Specify a list of resource names. You can also include the full path from the root to the resource before the resource name, separated by slashes. For example: FolderName/ResourceName |
MappingType | mappingType | Specify bidirectional or unidirectional as the mapping type. |
int | maxHops | Specify the maximum number or allowed hops. |
string | routeAlias | Specify the route’s alias. |
YesNoOptions | isShared | Specify whether these routes are shared. Shared routes can be used in more than one reservation. |
out string[,] | routes | Routes and route values associated with the activated topologies. |
out string | resultXml | Specify the variable for the XML output. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
string resultXml;
string reservationId = "28cb2a71-c8fc-4f41-a22b-e65685ebed14";
string[,] routes;
testShellAPI.AddRoutesToReservation(reservationId,new string[]{"Router 1234/Port 1"},new string[]{"GenericResource 1234/Port 1"},MappingType.Bidirectional,2,"a route",YesNoOptions.No,out routes,out resultXml);
Output
{{"Router 1234/Port 1","L1 Switch 1234/Blade 1/Port 3","L1 Switch 1234/Blade 1/Port 1","GenericResource 1234/Port 1"}}
<ResponseInfo>
<Routes>
<Route Source="Router 1234/Port 1" Target="GenericResource 1234/Port 1" RouteType="bi" Shared="true">
<Segments>
<Segment Source="Router 1234/Port 1" Target="L1 Switch 1234/Blade 1/Port 3"/>
<Segment Source="L1 Switch 1234/Blade 1/Port 3" Target="L1 Switch 1234/Blade 1/Port 1"/>
<Segment Source="L1 Switch 1234/Blade 1/Port 1" Target="GenericResource 1234/Port 1"/>
</Segments>
</Route>
</Routes>
</ResponseInfo>
AddTopologiesToDomainAdds a list of one or more topologies to a domain.
Syntax
AddTopologiesToDomain(domainName,topologyNames);
Parameters
Type | Name | Description |
---|---|---|
string | domainName | Specify the name of the domain. |
string[] | topologyNames | Specify a list of topology names. Include the full path from the root to the topology, separated by slashes. For example: FolderName/Topologies/TopologyName. |
YesNoOptions | validateResourceAvailability | Validates the existence of the resource resolution in the target domain. Default value: 'True'. Note: when value 'False' is supplied, there is no process of associating resources and routes with the target domain. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
testShellAPI.AddTopologiesToDomain("Domain1",new string[]{"Topology1"});
AddUsersToGroupAdd users to a group.
Syntax
AddUsersToGroup(usernames,groupName);
Parameters
Type | Name | Description |
---|---|---|
string[] | usernames | Specify an array of one or more users. |
string | groupName | Specify the name of the group. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
testShellAPI.AddUsersToGroup(new string[,] { "User1234", "User2345" }, "QA_Users");
AutoLoadOverwrite switch settings with current data.
Syntax
AutoLoad(resourceFullPath,out resultXml);
Parameters
Type | Name | Description |
---|---|---|
string | resourceFullPath | Specify the resource name. You can also include the full path from the root to the resource before the resource name, separated by slashes. For example: FolderName/RouterA/Port1. |
out string | resultXml | Specify the variable for the XML output. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
string resultXml;
testShellAPI.AutoLoad("L1 Switch 1234",out resultXml);
ArchiveDomainArchive the domain
Syntax
ArchiveDomain(domainName,out resultXml);
Parameters
Type | Name | Description |
---|---|---|
string | domainName | Specify the name of the domain. |
out string | resultXml | Specify the variable for the XML output. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
string resultXml;
testShellAPI.ArchiveDomain("Domain1", out resultXml);
AddAppToReservationAdd an App resource to an existing reservation.
Syntax
AddAppToReservation(reservationId, appName, deploymentPath, positionX, positionY, out createdAppName, out resultXml);
Parameters
Type | Name | Description |
---|---|---|
string | reservationId | Specify the string that represents the reservation’s unique identifier. |
string | appName | Specify the App template's name. |
string | deploymentPath | Specify the way the app will be deploy from a given list of options. |
double | positionX | Specify the x coordinate of the App's top left corner. |
double | positionY | Specify the y coordinate of the App's top left corner. |
out string | createdAppName | The name of the App to be created. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
string reservationId;
string appName, createdAppName;
testShellAPI.AddAppToReservation(reservationId, appName, deploymentPath, 100, 100, out createdAppName, out resultXml);
Output
<ResponseInfo ReservedAppName=""/>
AddServiceToReservationAdd service resource to existing reservation.
Syntax
AddServiceToReservation(reservationId,serviceName,alias,attributes);
Parameters
Type | Name | Description |
---|---|---|
string | reservationId | Specify the string that represents the reservation’s unique identifier. |
string | serviceName | Specify the service name. |
string | alias | Specify the service alias. |
string[,] | attributes | Specify a matrix of attributes and associated attribute values. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
string reservationId;
string serviceName;
string alias;
string[,] attributeValues;
testShellAPI.AddServiceToReservation(reservationId, serviceName, alias, attributes);
CopyDomainsResourcesCopy resources to a domain.
Syntax
CopyDomainsResources(sourceDomains,targetDomain);
Parameters
Type | Name | Description |
---|---|---|
string[] | domainNameSources | Specify the names of the source domains. |
string | domainNameDestination | Specify the name of the target domain. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
testShellAPI.CopyDomainsResources(new string[]{"Domain1","Domain2"}, "Domain3");
ClearAndResetConsoleClear and reset consoles.
Syntax
ClearAndResetConsole(reservationId,resourceFullPath,consolePortsFullPath,baudRate,out output,out resultXml);
Parameters
Type | Name | Description |
---|---|---|
string | reservationId | Specify the string that represents the reservation’s unique identifier. |
string | resourceFullPath | Specify the resource name. You can also include the full path from the root to the resource before the resource name, separated by slashes. For example: FolderName/RouterA/Port1. |
string[] | consolePortsFullPath | Specify a list of console ports according to their location in the Resource Explorer. Include the full path from the root to each console port, separated by slashes. For example: Console/Ports/PortName. |
BaudRate | baudRate | Specify the baud rate to apply to the ports. |
out string | output | The command results. |
out string | resultXml | Specify the variable for the XML output. |
Example
TestShellAPI testShellAPI = new TestShellAPI();
string output;
string resultXml;
string reservationId = "28cb2a71-c8fc-4f41-a22b-e65685ebed14";
testShellAPI.ClearAndResetConsole(reservationId,"GenericResource 1234",new string[]{"GenericResource 1234/ConsolePort 21"},BaudRate.Baud9600,out output,out resultXml);
Output
<ResponseInfo Output=""/>
ConnectRoutesInReservationConnects a list of routes.
Syntax
ConnectRoutesInReservation(reservationId,endpoints,mappingType,out routes,out segments,out resultXml);
Parameters
Type | Name | Description |
---|---|---|
string | reservationId | Specify the string that represents the reservation’s unique identifier. |
string[,] | endpoints | The routes’ endpoints to connect. |
MappingType | mappingType | Specify bidirectional or unidirectional as the mapping type. |
out string[,] | routes | The routes that were connected. |
out string[,] | segments | The segments details of the connected routes. |
out string | resultXml | Specify the variable for the XML output. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
string resultXml;
string reservationId = "28cb2a71-c8fc-4f41-a22b-e65685ebed14";
string[,] routes,segments;
testShellAPI.ConnectRoutesInReservation(reservationId,new string[,]{{"Router 1234/Port 1","GenericResource 1234/Port 1"}},MappingType.Bidirectional,out segments,out resultXml);
Output
{{"Index","Source","Target","RouteType","Alias","Shared"},
{"1","Router 1234/Port 1","GenericResource 1234/Port 1","bi","a route","True"}}
{{"RouteIndex","Source","Target"},
{"1","Router 1234/Port 1","L1 Switch 1234/Blade 1/Port 3"},
{"1","L1 Switch 1234/Blade 1/Port 3","L1 Switch 1234/Blade 1/Port 1"},
{"1","L1 Switch 1234/Blade 1/Port 1","GenericResource 1234/Port 1"}}
<ResponseInfo>
<Routes>
<Route Source="Router 1234/Port 1" Target="GenericResource 1234/Port 1" RouteType="bi" Shared="true">
<Segments>
<Segment Source="Router 1234/Port 1" Target="L1 Switch 1234/Blade 1/Port 3"/>
<Segment Source="L1 Switch 1234/Blade 1/Port 3" Target="L1 Switch 1234/Blade 1/Port 1"/>
<Segment Source="L1 Switch 1234/Blade 1/Port 1" Target="GenericResource 1234/Port 1"/>
</Segments>
</Route>
</Routes>
</ResponseInfo>
CreateFolderAdd a new folder.
Syntax
CreateFolder(folderFullPath);
Parameters
Type | Name | Description |
---|---|---|
string | folderFullPath | Specify the full folder name. Include the full path from the root to a specific folder, separated by slashes. For example: ResourceFamilyFolder/ResourceModelFolder. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
testShellAPI.CreateFolder("Lab Routers");
CreateImmediateReservationCreate an imminent reservation.
Syntax
CreateImmediateReservation(reservationName,owner,durationInMinutes,notifyOnStart,notifyOnSetupComplete,notifyOnEnd,notificationMinutesBeforeEnd,topology,globalInputs,requirementsInputs,additionalInfoInputs, out reservationId, out resultXml);
Parameters
Type | Name | Description |
---|---|---|
string | reservationName | Specify the name of the reservation. |
string | owner | Specify the user name of the reservation owner. |
int | durationInMinutes | Specify the length of the reservation. (in minutes) |
YesNoOptions | notifyOnStart | Indicate whether to notify the reservation owner when the reservation starts. |
YesNoOptions | notifyOnEnd | Indicate whether to notify the reservation owner when the reservation ends. |
int | notificationMinutesBeforeEnd | Indicate the number of minutes before the end of the reservation to send out a Notify On End alert to the reservation owner. (0 = disabled) |
string | topologyFullPath | Specify the full topology name. Include the full path from the root to the topology, separated by slashes. For example: FolderName/Topologies/TopologyName. |
string[,] | globalInputs | Global inputs associated with the specified topology. For example: {['Input Name', 'Value';]}. |
string[,] | requirementsInputs | Requirements inputs associated with the specified topology. For example: {['Resource Name', 'Input Name', 'Value', 'AttributeType';]}, AttributeType can be one of the following: Attributes/Models/Quantity. |
string[,] | additionalInfoInputs | Additional info inputs associated with the specified topology. For example: {['Resource Name', 'Input Name', 'Value';]}. |
YesNoOptions | notifyOnSetupComplete | Indicate whether to notify the reservation owner when the reservation setup completes. |
YesNoOptions | isTerminationProtectionEnabled | Indicate whether to protect the reservation from being terminated. |
string | approvalSid | Leave empty. Used for internal purposes. |
out string | reservationId | Reservation’s unique identifier (string). |
out string | resultXml | Specify the variable for the XML output. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
string[,] globalInputs = {{"input1", "value1"}, {"input2", "value2"}};
string[,] requirementsInputs = {{"resource", "attribute", "value", "Attributes"}};
string[,] additionalInfoInputs = {{"resource", "attribute", "value"}};
string resultXml;
string reservationId;
testShellAPI.CreateImmediateReservation("Immediate reservation", "admin", 30, YesNoOptions.No, YesNoOptions.No, 0, "myTopology", globalInputs, requirementsInputs, additionalInfoInputs, out reservationId, out resultXml);
Output
28cb2a71-c8fc-4f41-a22b-e65685ebed14
<ResponseInfo>
<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">
<Topologies/>
</Reservation>
</ResponseInfo>
CreateReservationCreate a reservation.
Syntax
CreateReservation(reservationName,owner,startTime,endTime,notifyOnStart,notifyOnSetupComplete,notifyOnEnd,notificationMinutesBeforeEnd, topology, globalInputs, requirementsInputs, additionalInfoInputs, out reservationId, out resultXml);
Parameters
Type | Name | Description |
---|---|---|
string | reservationName | Specify the name of the reservation. |
string | owner | Specify the user name of the reservation owner. |
DateTime | startTime | The start time of the reservation. |
DateTime | endTime | The end time of the reservation. |
YesNoOptions | notifyOnStart | Indicate whether to notify the reservation owner when the reservation starts. |
YesNoOptions | notifyOnEnd | Indicate whether to notify the reservation owner when the reservation ends. |
int | notificationMinutesBeforeEnd | Indicate the number of minutes before the end of the reservation to send out a Notify On End alert to the reservation owner. (0 = disabled) |
string | topologyFullPath | Specify the full topology name. Include the full path from the root to the topology, separated by slashes. For example: FolderName/Topologies/TopologyName. |
string[,] | globalInputs | Global inputs associated with the specified topology. For example: {['Input Name', 'Value';]}. |
string[,] | requirementsInputs | Requirements inputs associated with the specified topology. For example: {['Resource Name', 'Input Name', 'Value', 'AttributeType';]}, AttributeType can be one of the following: Attributes/Models/Quantity. |
string[,] | additionalInfoInputs | Additional info inputs associated with the specified topology. For example: {['Resource Name', 'Input Name', 'Value';]}. |
YesNoOptions | notifyOnSetupComplete | Indicate whether to notify the reservation owner when the reservation setup completes. |
YesNoOptions | isTerminationProtectionEnabled | Indicate whether to protect the reservation from being terminated. |
string | approvalSid | Leave empty. Used for internal purposes. |
out string | reservationId | Reservation’s unique identifier (string). |
out string | resultXml | Specify the variable for the XML output. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
string[,] globalInputs = {{"attribute1", "value1"}, {"attribute2", "value2"}};
string[,] requirementsInputs = {{"resource", "attribute", "value", "Attributes"}};
string[,] additionalInfoInputs = {{"resource", "attribute", "value"}};
string resultXml;
string reservationId;
testShellAPI.CreateReservation("Reservation1", "admin", new DateTime(2015, 1, 1, 10, 0, 0), new DateTime(2015, 1, 1, 11, 0, 0), YesNoOptions.No, YesNoOptions.No, 0, "myTopology", globalInputs, requirementsInputs, additionalInfoInputs, out reservationId, out resultXml);
Output
af626b88-458b-4e7a-9054-c03d8cffa260
<ResponseInfo>
<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">
<Topologies/>
</Reservation>
</ResponseInfo>
CreateResourceAdd a new resource.
Syntax
CreateResource(resourceFamily,resourceModel,resourceName,resourceAddress,folderFullPath,parentResourceFullPath,resourceDescription,out resource,out attributes,out resultXml);
Parameters
Type | Name | Description |
---|---|---|
string | resourceFamily | Specify the name of the resource family (optional). |
string | resourceModel | Specify the resource model. |
string | resourceName | Specify the resource name. |
string | resourceAddress | Specify the resource address. |
string | folderFullPath | Specify the full folder name. Include the full path from the root to a specific folder, separated by slashes. For example: ResourceFamilyFolder/ResourceModelFolder. |
string | parentResourceFullPath | Specify the full path from the root to a parent resource, separated by slashes. For example: Traffic Generators/Generic. |
string | resourceDescription | Provide a short description to help identify the resource. |
out string[,] | resource | Details associated with the specified resource. |
out string[,] | attributes | Attributes and attribute values associated with the new resource. |
out string | resultXml | Specify the variable for the XML output. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
string resultXml;
string[,] resource;
string[,] attributes;
testShellAPI.CreateResource("Bridge", "Bridge Generic Model", "Bridge1", "192.168.1.200", "", "", "", out resource, out attributes, out resultXml);
Output
{{Index, ParentIndex, Name, Address, FullAddress, RootAddress, ResourceFamilyName, ResourceModelName, FolderFullPath, Locked, LockInfo_ReservationName, LockInfo_Username, LockInfo_MachineName, LockInfo_Created, Excluded, Permission, UniqueIdentifier}
{1, -1, Bridge1, 192.168.1.200, 192.168.1.200, 192.168.1.200, Bridge, Bridge Generic Model, , False, , , , , False, ReadWrite, }}
{{ResourceIndex, ResourceName, AttributeName, AttributeValue, AttributeType}
{1, Bridge1, Number of Ports, 0, Numeric}}
<ResponseInfo Name="Bridge1" FolderFullPath="" Address="192.168.1.200" FullAddress="192.168.1.200" RootAddress="192.168.1.200" ResourceFamilyName="Bridge" ResourceModelName="Bridge Generic Model" Locked="false" Excluded="false" Description="" Permission="ReadWrite">
<ResourceAttributes>
<ResourceAttribute Name="Number of Ports" Value="0" Type="Numeric"></ResourceAttribute>
</ResourceAttributes>
<Domains></Domains>
<ChildResources></ChildResources>
<LockInfo></LockInfo>
</ResponseInfo>
CreateResourcesAdds new resources.
Syntax
CreateResources(resourceCreationRequests);
Parameters
Type | Name | Description |
---|---|---|
string[,] | resourceInfoDtos | List of resources to add. For example: {['Resource Family','Resource Model','Resource Name','Resource Address','Folder Full Path','Parent Resource Full Path','Resource Description';]} |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
string[,] resources;
testShellAPI.CreateResources(resources);
CreateRouteInReservationCreate a route between two resources.
Syntax
CreateRouteInReservation(reservationId,sourceResourceFullPath,targetResourceFullPath,overrideActiveRoutes,mappingType,maxHops,routeAlias,isShared,out segments,out resultXml);
Parameters
Type | Name | Description |
---|---|---|
string | reservationId | Specify the string that represents the reservation’s unique identifier. |
string | sourceResourceFullPath | Specify the resource name. You can also include the full path from the root to the resource before the resource name, separated by slashes. For example: FolderName/RouterA/Port1. |
string | targetResourceFullPath | Specify the resource name. You can also include the full path from the root to the resource before the resource name, separated by slashes. For example: FolderName/RouterA/Port1. |
YesNoOptions | overrideActiveRoutes | Specify whether the new route can override existing routes. |
MappingType | mappingType | Specify bidirectional or unidirectional as the mapping type. |
int | maxHops | Specify the maximum number or allowed hops. |
string | routeAlias | Specify the route’s alias. |
YesNoOptions | isShared | Specify whether this route is shared. Shared routes can be used in more than one reservation. |
out string[,] | route | Routes and route values associated with the activated topologies. |
out string | resultXml | Specify the variable for the XML output. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
string resultXml;
string reservationId = "28cb2a71-c8fc-4f41-a22b-e65685ebed14";
string[,] route;
testShellAPI.CreateRouteInReservation(reservationId,"Router 1234/Port 1","GenericResource 1234/Port 1",YesNoOptions.Yes,MappingType.Bidirectional,2,"a route",YesNoOptions.No,out route,out resultXml);
Output
{{"Router 1234/Port 1","L1 Switch 1234/Blade 1/Port 3","L1 Switch 1234/Blade 1/Port 1","GenericResource 1234/Port 1"}}
<ResponseInfo>
<Routes>
<Route Source="Router 1234/Port 1" Target="GenericResource 1234/Port 1" RouteType="bi" Shared="true">
<Segments>
<Segment Source="Router 1234/Port 1" Target="L1 Switch 1234/Blade 1/Port 3"/>
<Segment Source="L1 Switch 1234/Blade 1/Port 3" Target="L1 Switch 1234/Blade 1/Port 1"/>
<Segment Source="L1 Switch 1234/Blade 1/Port 1" Target="GenericResource 1234/Port 1"/>
</Segments>
</Route>
</Routes>
</ResponseInfo>
CreateRoutesInReservationCreate routes between the listed source and target resources.
Syntax
CreateRoutesInReservation(reservationId,sourceResourcesFullPath,targetResourcesFullPath,overrideActiveRoutes,mappingType,maxHops,routeAlias,isShared,out segments,out resultXml);
Parameters
Type | Name | Description |
---|---|---|
string | reservationId | Specify the string that represents the reservation’s unique identifier. |
string[] | sourceResourcesFullPath | Specify a list of resource names. You can also include the full path from the root to the resource before the resource name, separated by slashes. For example: FolderName/ResourceName |
string[] | targetResourcesFullPath | Specify a list of resource names. You can also include the full path from the root to the resource before the resource name, separated by slashes. For example: FolderName/ResourceName |
YesNoOptions | overrideActiveRoutes | Specify whether the new route can override existing routes. |
MappingType | mappingType | Specify bidirectional or unidirectional as the mapping type. |
int | maxHops | Specify the maximum number or allowed hops. |
string | routeAlias | Specify the route’s alias. |
YesNoOptions | isShared | Specify whether these routes are shared. Shared routes can be used in more than one reservation. |
out string[,] | routes | Routes and route values associated with the activated topologies. |
out string | resultXml | Specify the variable for the XML output. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
string resultXml;
string reservationId = "28cb2a71-c8fc-4f41-a22b-e65685ebed14";
string[,] routes;
testShellAPI.CreateRoutesInReservation(reservationId,new string[]{"Router 1234/Port 1"},new string[]{"GenericResource 1234/Port 2"},YesNoOptions.Yes,MappingType.Bidirectional,2,"a route",YesNoOptions.No,out routes,out resultXml);
Output
{{"Router 1234/Port 1","L1 Switch 1234/Blade 1/Port 3","L1 Switch 1234/Blade 1/Port 2","GenericResource 1234/Port 2"}}
<ResponseInfo>
<Routes>
<Route Source="Router 1234/Port 1" Target="GenericResource 1234/Port 2" RouteType="uni" Shared="true">
<Segments>
<Segment Source="Router 1234/Port 1" Target="L1 Switch 1234/Blade 1/Port 3"/>
<Segment Source="L1 Switch 1234/Blade 1/Port 3" Target="L1 Switch 1234/Blade 1/Port 2"/>
<Segment Source="L1 Switch 1234/Blade 1/Port 2" Target="GenericResource 1234/Port 2"/>
</Segments>
</Route>
</Routes>
</ResponseInfo>
DeleteDomainDeletes a domain.
Syntax
DeleteDomain(domainName);
Parameters
Type | Name | Description |
---|---|---|
string | domainName | Specify the name of the domain. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
testShellAPI.DeleteDomain("Domain1");
DeleteTopologyDelete a topology.
Syntax
DeleteTopology(topologyFullPath);
Parameters
Type | Name | Description |
---|---|---|
string | topologyFullPath | 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. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
testShellAPI.DeleteTopology("Topology1");
DeleteFolderDelete a folder.
Syntax
DeleteFolder(folderFullPath);
Parameters
Type | Name | Description |
---|---|---|
string | folderFullPath | Specify the full folder name. Include the full path from the root to a specific folder, separated by slashes. For example: ResourceFamilyFolder/ResourceModelFolder. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
testShellAPI.DeleteFolder("Lab Routers");
DeleteGroupDelete a group.
Syntax
DeleteGroup(groupName);
Parameters
Type | Name | Description |
---|---|---|
string | groupName | Specify the name of the group. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
testShellAPI.DeleteGroup("QA_Users")
DeleteReservationDelete a reservation.
Syntax
DeleteReservation(reservationId,unmap);
Parameters
Type | Name | Description |
---|---|---|
string | reservationId | Specify the string that represents the reservation’s unique identifier. |
YesNoOptions | unmap | Specify whether to keep mappings or release mapped resources when deleting the reservation. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
string reservationId = "af626b88-458b-4e7a-9054-c03d8cffa260";
testShellAPI.DeleteReservation(reservationId,YesNoOptions.Yes);
DeleteResourceDelete a resource.
Syntax
DeleteResource(resourceFullPath);
Parameters
Type | Name | Description |
---|---|---|
string | resourceFullPath | Specify the resource name. You can also include the full path from the root to the resource before the resource name, separated by slashes. For example: FolderName/RouterA/Port1. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
testShellAPI.DeleteResource("Router 4321");
DeleteResourcesDeletes the specified resources.
Syntax
DeleteResources(resourcesFullPath);
Parameters
Type | Name | Description |
---|---|---|
string[] | resourcesFullPath | Specify a list of resource names. You can also include the full path from the root to the resource before the resource name, separated by slashes. For example: FolderName/ResourceName |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
testShellAPI.DeleteResources(new string[] {"Router 4321"});
DeleteUserDeletes a user.
Syntax
DeleteUser(username);
Parameters
Type | Name | Description |
---|---|---|
string | username | Specify the name of the user. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
testShellAPI.DeleteUser("User1234");
DisconnectRoutesInReservationDisconnects a list of routes.
Syntax
DisconnectRoutesInReservation(reservationId,endpoints,out routes,out segments,out resultXml);
Parameters
Type | Name | Description |
---|---|---|
string | reservationId | Specify the string that represents the reservation’s unique identifier. |
string[,] | endpoints | The routes endpoints to disconnect. |
out string[,] | routes | The routes that were disconnected. |
out string[,] | segments | The segments details of the disconnected routes. |
out string | resultXml | Specify the variable for the XML output. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
string resultXml;
string reservationId = "28cb2a71-c8fc-4f41-a22b-e65685ebed14";
string[,] routes,segments;
testShellAPI.DisconnectRoutesInReservation(reservationId,new string[,]{{"Router 1234/Port 1","GenericResource 1234/Port 1"}},out segments,out resultXml);
Output
{{"Index","Source","Target","RouteType","Alias","Shared"},
{"1","Router 1234/Port 1","GenericResource 1234/Port 1","bi","a route","True"}}
{{"RouteIndex","Source","Target"},
{"1","Router 1234/Port 1","L1 Switch 1234/Blade 1/Port 3"},
{"1","L1 Switch 1234/Blade 1/Port 3","L1 Switch 1234/Blade 1/Port 1"},
{"1","L1 Switch 1234/Blade 1/Port 1","GenericResource 1234/Port 1"}}
<ResponseInfo>
<Routes>
<Route Source="Router 1234/Port 1" Target="GenericResource 1234/Port 1" RouteType="bi" Shared="true">
<Segments>
<Segment Source="Router 1234/Port 1" Target="L1 Switch 1234/Blade 1/Port 3"/>
<Segment Source="L1 Switch 1234/Blade 1/Port 3" Target="L1 Switch 1234/Blade 1/Port 1"/>
<Segment Source="L1 Switch 1234/Blade 1/Port 1" Target="GenericResource 1234/Port 1"/>
</Segments>
</Route>
</Routes>
</ResponseInfo>
DeleteResourceTemplateDeletes a specific resource template.
Syntax
DeleteResourceTemplate(resourceTemplateName);
Parameters
Type | Name | Description |
---|---|---|
string | resourceTemplateName | Specify the resource template name. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
testShellAPI.DeleteResourceTemplate("Resource Template 4 tests");
EndReservationEnd a reservation.
Syntax
EndReservation(reservationId,unmap);
Parameters
Type | Name | Description |
---|---|---|
string | reservationId | Specify the string that represents the reservation’s unique identifier. |
YesNoOptions | unmap | Specify whether to keep mappings or release mapped resources when deleting the reservation. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
string reservationId = "af626b88-458b-4e7a-9054-c03d8cffa260";
testShellAPI.EndReservation(reservationId,YesNoOptions.Yes);
ExcludeResourceExclude a resource.
Syntax
ExcludeResource(resourceFullPath);
Parameters
Type | Name | Description |
---|---|---|
string | resourceFullPath | Specify the resource name. You can also include the full path from the root to the resource before the resource name, separated by slashes. For example: FolderName/RouterA/Port1. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
testShellAPI.ExcludeResource("L1 Switch 1234");
ExcludeResourcesExcludes the specified resources.
Syntax
ExcludeResources(resourcesFullPath);
Parameters
Type | Name | Description |
---|---|---|
string[] | resourcesFullPath | Specify a list of resource names. You can also include the full path from the root to the resource before the resource name, separated by slashes. For example: FolderName/ResourceName |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
testShellAPI.ExcludeResources(new[] {"L1 Switch 1234"});
SetResourceVisibilitySet the resource visibility state.
Syntax
SetResourceVisibility(resourceFullPath, newVisibility);
Parameters
Type | Name | Description |
---|---|---|
string | resourceFullPath | Specify the resource name. You can also include the full path from the root to the resource before the resource name, separated by slashes. For example: FolderName/RouterA/Port1. |
string | newVisibility | The new visibility state for the resource. options: AdminOnly, Everyone or FamilyDefault |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
testShellAPI.SetResourceVisibility("L1 Switch 1234", "AdminOnly");
EnqueueResourceCommand
Syntax
EnqueueResourceCommand(reservationId,resourceFullPath,commandName,parameterValues,printOutput);
Parameters
Type | Name | Description |
---|---|---|
string | reservationId | Specify the string that represents the reservation’s unique identifier. |
string | resourceFullPath | Specify the resource name. You can also include the full path from the root to the resource before the resource name, separated by slashes. For example: FolderName/RouterA/Port1. |
string | commandName | Specify the name of the command. |
string[] | parameterValues | Specify the list of parameters values required for executing the command. |
YesNoOptions | printOutput | Defines whether to print the command output in the reservation command output window. |
Example
TestShellAPI testShellAPI = new TestShellAPI();
string reservationId = "af626b88-458b-4e7a-9054-c03d8cffa260";
testShellAPI.EnqueueResourceCommand(reservationId, "Router 1234", "ExampleCommand", new string[]{"abcd", "2"}, YesNoOptions.Yes);
EnqueueServiceCommand
Syntax
EnqueueServiceCommand(reservationId,serviceAlias,commandName,parameterValues,printOutput);
Parameters
Type | Name | Description |
---|---|---|
string | reservationId | Specify the string that represents the reservation’s unique identifier. |
string | serviceAlias | Specify the alias of the service. The service alias is its identifier in the environment context. It can be retrieved via the environment details API and is displayed visually on the diagram. |
string | commandName | Specify the name of the command. |
string[] | parameterValues | Specify the list of parameters values required for executing the command. |
YesNoOptions | printOutput | Defines whether to print the command output in the reservation command output window. |
Example
TestShellAPI testShellAPI = new TestShellAPI();
string reservationId = "af626b88-458b-4e7a-9054-c03d8cffa260";
testShellAPI.EnqueueServiceCommand(reservationId, "Service1", "ExampleCommand", new string[]{"abcd", "2"},YesNoOptions.Yes);
ExecuteResourceCommand
Syntax
ExecuteResourceCommand(reservationId,resourceFullPath,commandName,parameterValues,printOutput,out output,out resultXml);
Parameters
Type | Name | Description |
---|---|---|
string | reservationId | Specify the string that represents the reservation’s unique identifier. |
string | resourceFullPath | Specify the resource name. You can also include the full path from the root to the resource before the resource name, separated by slashes. For example: FolderName/RouterA/Port1. |
string | commandName | Specify the name of the command. |
string[] | parameterValues | Specify the list of parameters values required for executing the command. |
YesNoOptions | printOutput | Defines whether to print the command output in the reservation command output window. |
out string | output | The command results. |
out string | resultXml | Specify the variable for the XML output. |
Example
TestShellAPI testShellAPI = new TestShellAPI();
string output;
string resultXml;
string reservationId = "af626b88-458b-4e7a-9054-c03d8cffa260";
testShellAPI.ExecuteResourceCommand(reservationId, "Router 1234", "ExampleCommand", new string[]{"abcd", "2"}, YesNoOptions.Yes, out output, out resultXml);
Output
<ResponseInfo Output="success"/>
ExecuteResourceConnectedCommand
Syntax
ExecuteResourceConnectedCommand(reservationId,resourceFullPath,commandName,commandTag, parameterValues, connectedPortsFullPath,printOutput, out output,out resultXml);
Parameters
Type | Name | Description |
---|---|---|
string | reservationId | Specify the string that represents the reservation’s unique identifier. |
string | resourceFullPath | Specify the resource name. You can also include the full path from the root to the resource before the resource name, separated by slashes. For example: RouterA/Port1. |
string | commandName | Specify the name of the command. |
string | commandTag | Specify the command tag. Connected command tags are used to define categories of functionality (e.g 'virtualization'). |
string[] | parameterValues | Specify the list of parameters values required for executing the command. |
string[] | connectedPortsFullPath | Specify the list of connected ports to use in this operation. Include the full path from the root resource to each port, separated by slashes. For example: Switch20/Blade5/PowerPort1. Leave blank to perform the connected operation on all of the specified resource’s connected ports. |
YesNoOptions | printOutput | Defines whether to print the command output in the reservation command output window. |
out string | output | The command results. |
out string | resultXml | Specify the variable for the XML output. |
Example
TestShellAPI testShellAPI = new TestShellAPI();
string output;
string resultXml;
string reservationId = "af626b88-458b-4e7a-9054-c03d8cffa260";
testShellAPI.ExecuteResourceConnectedCommand(reservationId, "Router 1234", "SpinUp","virtualization", new string[]{"abcd", "2"}, {"Router 1234/Port1"}, YesNoOptions.Yes, out output, out resultXml);
Output
<ResponseInfo Output="success"/>
EnqueueTopologyCommandEnqueue a topology command.
Syntax
EnqueueTopologyCommand(reservationId,commandName,parameterValues,printOutput);
Parameters
Type | Name | Description |
---|---|---|
string | reservationId | Specify the string that represents the reservation’s unique identifier. |
string | commandName | Specify the name of the command. |
string[] | parameterValues | Specify the list of parameters values required for executing the command. |
YesNoOptions | printOutput | Defines whether to print the command output in the reservation command output window. |
Example
TestShellAPI testShellAPI = new TestShellAPI();
string reservationId = "af626b88-458b-4e7a-9054-c03d8cffa260";
testShellAPI.EnqueueTopologyCommand(reservationId, "ExampleCommand", new string[]{"abcd", "2"}, YesNoOptions.Yes);
ExecuteTopologyCommandExecute a topology command.
Syntax
ExecuteTopologyCommand(reservationId,commandName,parameterValues,printOutput,out output,out resultXml);
Parameters
Type | Name | Description |
---|---|---|
string | reservationId | Specify the string that represents the reservation’s unique identifier. |
string | commandName | Specify the name of the command. |
string[] | parameterValues | Specify the list of parameters values required for executing the command. |
YesNoOptions | printOutput | Defines whether to print the command output in the reservation command output window. |
out string | output | The command results. |
out string | resultXml | Specify the variable for the XML output. |
Example
TestShellAPI testShellAPI = new TestShellAPI();
string output;
string resultXml;
string reservationId = "af626b88-458b-4e7a-9054-c03d8cffa260";
testShellAPI.ExecuteTopologyCommand(reservationId, "ExampleCommand", new string[]{"abcd", "2"}, YesNoOptions.Yes, out output, out resultXml);
Output
<ResponseInfo Output="success"/>
ExtendReservationExtend a reservation.
Syntax
ExtendReservation(reservationId,minutesToAdd);
Parameters
Type | Name | Description |
---|---|---|
string | reservationId | Specify the string that represents the reservation’s unique identifier. |
int | minutesToAdd | Specify the number of minutes to add to the specified reservation. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
string reservationId = "af626b88-458b-4e7a-9054-c03d8cffa260";
testShellAPI.ExtendReservation(reservationId,60);
UpdateReservationEndTimeUpdate a reservation end time or persistence.
Syntax
UpdateReservationEndTime(reservationId, isPersistent, endTime);
Parameters
Type | Name | Description |
---|---|---|
string | reservationId | Specify the string that represents the reservation’s unique identifier. |
YesNoOptions | isPersistent | Enable or disable Reservation Persistence. |
string | endTime | The end time of the reservation. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
string reservationId = "af626b88-458b-4e7a-9054-c03d8cffa260";
bool isPersistent = true;
string endTime = DateTime.UtcNow.AddDays(1).ToString();
testShellAPI.UpdateReservationEndTime(reservationId,isPersistent,endTime);
ExportFamiliesAndModelsExports the resource families, models, attributes and structure configuration.
Syntax
ExportFamiliesAndModels(out resultXml);
Parameters
Type | Name | Description |
---|---|---|
out string | resultXml | Specify the variable for the XML output. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
string resultXml;
testShellAPI.ExportFamiliesAndModels(out resultXml);
Output
<ResponseInfo>
ExecuteServiceCommand
Syntax
ExecuteServiceCommand(reservationId, serviceAlias, commandName, parameterValues, printOutput, out output, out resultXml);
Parameters
Type | Name | Description |
---|---|---|
string | reservationId | Specify the string that represents the reservation’s unique identifier. |
string | serviceAlias | Specify the alias of the service. |
string | commandName | Specify the name of the command. |
string[] | parameterValues | Specify the list of parameters values required for executing the command. |
YesNoOptions | printOutput | Defines whether to print the command output in the reservation command output window. |
out string | output | The command results. |
out string | resultXml | Specify the variable for the XML output. |
Example
TestShellAPI testShellAPI = new TestShellAPI();
string output;
string resultXml;
string reservationId = "af626b88-458b-4e7a-9054-c03d8cffa260";
testShellAPI.ExecuteServiceCommand(reservationId, "Service 1", "ExampleCommand", new string[]{"abcd", "2"}, YesNoOptions.Yes, out output, out resultXml);
Output
<ResponseInfo Output="success"/>
EditAppsInReservation
Syntax
EditAppsInReservation(reservationId, editAppsRequests, out resultXml);
Parameters
Type | Name | Description |
---|---|---|
string | reservationId | Specify the string that represents the reservation’s unique identifier. |
string[,] | editAppsRequests | Changes to implement in the App. Please note that when modifying attributes, *all* the attributes in deployed app must be updated. |
out string | resultXml | Specify the variable for the XML output. |
Example
TestShellAPI testShellAPI = new TestShellAPI();
string output;
string resultXml;
string reservationId = "af626b88-458b-4e7a-9054-c03d8cffa260";
var editAppRequest = new ApiEditAppRequest
{
DefaultDeployment = new DefaultDeploymentPath(),
};
editAppRequest.Name = "testApp";
editAppRequest.Description = "my desc";
editAppRequest.NewName = "new name";
editAppRequest.DefaultDeployment.Name = "vCenter Clone VM From VM";
testShellAPI.ExecuteServiceCommand(reservationId, new[]{editAppsRequest}, out resultXml);
Output
<ResponseInfo Output="success"/>
PrepareSandboxConnectivity
Syntax
PrepareSandboxConnectivity(reservationId, out resultXml);
Parameters
Type | Name | Description |
---|---|---|
string | reservationId | Specify the string that represents the reservation’s unique identifier. |
out string | resultXml | Specify the variable for the XML output. |
Example
TestShellAPI testShellAPI = new TestShellAPI();
string output;
string resultXml;
string reservationId = "af626b88-458b-4e7a-9054-c03d8cffa260";
testShellAPI.PrepareSandboxConnectivity(reservationId, out resultXml);
Output
<ResponseInfo Output="success"/>
CleanupSandboxConnectivity
Syntax
CleanupSandboxConnectivity(reservationId, out resultXml);
Parameters
Type | Name | Description |
---|---|---|
string | reservationId | Specify the string that represents the reservation’s unique identifier. |
out string | resultXml | Specify the variable for the XML output. |
Example
TestShellAPI testShellAPI = new TestShellAPI();
string output;
string resultXml;
string reservationId = "af626b88-458b-4e7a-9054-c03d8cffa260";
testShellAPI.CleanupSandboxConnectivity(reservationId, out resultXml);
Output
<ResponseInfo Output="success"/>
EnqueueEnvironmentCommandEnqueue an environment command.
Syntax
EnqueueEnvironmentCommand(reservationId,commandName,commandInputs,printOutput);
Parameters
Type | Name | Description |
---|---|---|
string | reservationId | Specify the string that represents the reservation’s unique identifier. |
string | commandName | Specify the name of the command. |
string[,] | commandInputs | Specify a matrix of input names and values required for executing the command. |
YesNoOptions | printOutput | Defines whether to print the command output in the reservation command output window. |
Example
TestShellAPI testShellAPI = new TestShellAPI();
string reservationId = "af626b88-458b-4e7a-9054-c03d8cffa260";
testShellAPI.EnqueueEnvironmentCommand(reservationId, "ExampleCommand", new string[,]{{"input1", "abc"}}, YesNoOptions.Yes);
ExecuteEnvironmentCommandExecute an environment command.
Syntax
ExecuteEnvironmentCommand(reservationId,commandName,commandInputs,printOutput,out output,out resultXml);
Parameters
Type | Name | Description |
---|---|---|
string | reservationId | Specify the string that represents the reservation’s unique identifier. |
string | commandName | Specify the name of the command. |
string[,] | commandInputs | Specify a matrix of input names and values required for executing the command. |
YesNoOptions | printOutput | Defines whether to print the command output in the reservation command output window. |
out string | output | The command results. |
out string | resultXml | Specify the variable for the XML output. |
Example
TestShellAPI testShellAPI = new TestShellAPI();
string output;
string resultXml;
string reservationId = "af626b88-458b-4e7a-9054-c03d8cffa260";
testShellAPI.ExecuteEnvironmentCommand(reservationId, "ExampleCommand", new string[,]{{"input1", "abc"}}, YesNoOptions.Yes, out output, out resultXml);
Output
<ResponseInfo Output="success"/>
EnqueueCommandEnqueue a command.
Syntax
EnqueueCommand(reservationId,targetName,targetType,commandName,commandInputs,printOutput);
Parameters
Type | Name | Description |
---|---|---|
string | reservationId | Specify the string that represents the reservation’s unique identifier. |
string | targetName | Specify the name of the target according to the target type: for resources - specify the resouce's name, for services - the service's alias. |
CommandTargetType | targetType | Specify the target type for command execution, possible values are: Resource, Service, App. |
string | commandName | Specify the name of the command. |
string[,] | commandInputs | Specify a matrix of input names and values required for executing the command. |
YesNoOptions | printOutput | Defines whether to print the command output in the reservation command output window. |
Example
TestShellAPI testShellAPI = new TestShellAPI();
string reservationId = "af626b88-458b-4e7a-9054-c03d8cffa260";
testShellAPI.EnqueueCommand(reservationId, "Router 1234", CommandTargetType.Resource, "ExampleCommand", new string[,]{{"input1", "abc"}}, YesNoOptions.Yes);
ExecuteCommandExecute a command.
Syntax
ExecuteCommand(reservationId,targetName,targetType,commandName,commandInputs,printOutput,out output,out resultXml);
Parameters
Type | Name | Description |
---|---|---|
string | reservationId | Specify the string that represents the reservation’s unique identifier. |
string | targetName | Specify the name of the target according to the target type: for resources - specify the resouce's name, for services - the service's alias. |
CommandTargetType | targetType | Specify the target type for command execution, possible values are: Resource, Service, App. |
string | commandName | Specify the name of the command. |
string[,] | commandInputs | Specify a matrix of input names and values required for executing the command. |
YesNoOptions | printOutput | Defines whether to print the command output in the reservation command output window. |
out string | output | The command results. |
out string | resultXml | Specify the variable for the XML output. |
Example
TestShellAPI testShellAPI = new TestShellAPI();
string output;
string resultXml;
string reservationId = "af626b88-458b-4e7a-9054-c03d8cffa260";
testShellAPI.ExecuteCommand(reservationId, "Router 1234", CommandTargetType.Resource, "ExampleCommand", new string[,]{{"input1", "abc"}}, YesNoOptions.Yes, out output, out resultXml);
Output
<ResponseInfo Output="success"/>
FindResources
Syntax
FindResources(resourceFamily,resourceModel,attributeValues,showAllDomains,resourceFullName,exactName,includeSubResources,resourceAddress,resourceUniqueIdentifier,maxResults,includeExcludedResources,out resources,out reservations,out usageSummary,out resultXml);
Parameters
Type | Name | Description |
---|---|---|
string | resourceFamily | Specify the name of the resource family. |
string | resourceModel | Specify the resource model. |
string[,] | attributeValues | Specify an array of one or more attributes and attribute values. |
out string[,] | resources | All resources that match the specified query conditions. |
YesNoOptions | showAllDomains | Show all domains associated with the logged in user. |
string | resourceFullName | Specify part of or the full name of the resource. |
YesNoOptions | exactName | Specify whether to search the exact given name or not. |
YesNoOptions | includeSubResources | Specify whether to retrieve the sub resources once the parent matches the name. |
string | resourceAddress | Specify the resource address. Can be partial (e.g. '192.168.'). |
string | resourceUniqueIdentifier | Specify the resource unique identifier. |
int | maxResults | Specify the maximum number of resources to return. |
YesNoOptions | includeExcludedResources | Specify whether to retrieve resources that are excluded |
out string[,] | reservations | All reservations for the resources that match the specified query conditions. |
out string[,] | usageSummary | Specify the number used connected resources, this data will be available only on top level resource. |
out string | resultXml | Specify the variable for the XML output. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
string[,] resources, reservations;
string resultXml;
testShellAPI.FindResources("Generic Chassis", "", false, new string[,]{{"SW_Version","1.3"}},out resources,out reservations,out usageSummary,out resultXml);
Output
{{"Index","Name","Description","Address","FullName","FullAddress","ResourceFamilyName","ResourceModelName","Status","Permissions", "ConnectedTo", "FullPath"},
{"1","Router 1234","a new description for the resource","192.168.1.201","Lab Routers/Router 1234","192.168.1.201","Generic Chassis","Generic Chassis Model","Available","ReadOnly"}}
{{"ResourceIndex","ReservationName","Owner","StartTime","EndTime"}}
{{"ResourceIndex", "NumOfReserved", "NumOfShared", "NumOfNotInReservation"}}
<ResponseInfo>
<Resources>
<Resource Name="Router 1234" Description="a new description for the resource" Address="192.168.1.201" FullName="Lab Routers/Router 1234" FullPath="Lab Routers/Router 1234" FullAddress="192.168.1.201" ResourceFamilyName="Generic Chassis" ResourceModelName="Generic Chassis Model" Status="Available" Permission="ReadOnly">
<Reservations/>
<UsageSummary NumOfNotInReservation="130" NumOfReserved="14" NumOfShared="0"/>
</Resource>
</Resources>
</ResponseInfo>
FindResourcesInTimeRange
Syntax
FindResourcesInTimeRange(resourceFamily,resourceModel,fromTime,untilTime,attributeValues,showAllDomains,resourceFullName,exactName,includeSubResources,resourceAddress,resourceUniqueIdentifier,maxResults,out resources,out reservations,out usageSummary,out resultXml);
Parameters
Type | Name | Description |
---|---|---|
string | resourceFamily | Specify the name of the resource family. |
string | resourceModel | Specify the resource model. |
DateTime | fromTime | Specify from which future time and date to check the resource's availability. |
DateTime | untilTime | Specify until which time and date to check the resource's availability. |
string[,] | attributeValues | Specify an array of one or more attributes and attribute values. |
YesNoOptions | showAllDomains | Show all domains associated with the logged in user. |
string | resourceFullName | Specify part of or the full name of the resource. |
YesNoOptions | exactName | Specify whether to search the exact given name or not. |
YesNoOptions | includeSubResources | Specify whether to retrieve the sub resources once the parent matches the name. |
string | resourceAddress | Specify the resource address. Can be partial (e.g. '192.168.'). |
string | resourceUniqueIdentifier | Specify the resource unique identifier. |
int | maxResults | Specify the maximum number of resources to return. |
out string[,] | resources | All resources that match the specified query conditions. |
out string[,] | reservations | All reservations for the resources that match the specified query conditions. |
out string[,] | usageSummary | Specify the number used connected resources, this data will be available only on top level resource. |
out string | resultXml | Specify the variable for the XML output. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
string[,] resources, reservations;
string resultXml;
testShellAPI.FindResourcesInTimeRange("Generic Chassis", "", new DateTime(2012, 3, 1, 0, 0, 0), new DateTime(2012, 5, 31, 23, 59, 59), new string[,]{{"SW_Version","1.3"}}, false,out resources,out reservations,out usageSummary,out resultXml);
Output
{{"Index","Name","Description","Address","FullName","FullAddress","ResourceFamilyName","ResourceModelName","Status", "Permissions", "ConnectedTo", "FullPath"},
{"1","Router 1234","a new description for the resource","192.168.1.201","Lab Routers/Router 1234","192.168.1.201","Generic Chassis","Generic Chassis Model","Available","ReadOnly"}}
{{"ResourceIndex","ReservationName","Owner","StartTime","EndTime"}}
{{"ResourceIndex", "NumOfReserved", "NumOfShared", "NumOfNotInReservation"}}
<ResponseInfo>
<Resources>
<Resource Name="Router 1234" Description="a new description for the resource" Address="192.168.1.201" FullName="Lab Routers/Router 1234" FullPath="Lab Routers/Router 1234" FullAddress="192.168.1.201" ResourceFamilyName="Generic Chassis" ResourceModelName="Generic Chassis Model" Status="Available" Permission="ReadOnly">
<Reservations/>
<UsageSummary NumOfNotInReservation="130" NumOfReserved="14" NumOfShared="0"/>
</Resource>
</Resources>
</ResponseInfo>
GetReservationResourcesPositionsGet resource positions in a reservation.
Syntax
GetReservationResourcesPositions(reservationId,out layout,out resultXml);
Parameters
Type | Name | Description |
---|---|---|
string | reservationId | Specify the string that represents the reservation’s unique identifier. |
out string[,] | layout | All the resources and their positions in the diagram. |
out string | resultXml | Specify the variable for the XML output. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
string reservationId = "af626b88-458b-4e7a-9054-c03d8cffa260";
string[,] layout;
string resultXml;
testShellAPI.GetReservationResourcesPositions(reservationId, out layout, out resultXml);
Output
<ResponseInfo>
<layout/>
</ResponseInfo>
GetRoutesSolutionGet solution for specified routes.
Syntax
GetRoutesSolution(reservationId,sourceResourcesFullName,targetResourcesFullName,mappingType,maxHops,isShared,out segments,out resultXml);
Parameters
Type | Name | Description |
---|---|---|
string | reservationId | Specify the string that represents the reservation’s unique identifier. |
string[] | sourceResourcesFullPath | Specify a list of resource names. You can also include the full path from the root to the resource before the resource name, separated by slashes. For example: RootResourceName/ResourceName |
string[] | targetResourcesFullPath | Specify a list of resource names. You can also include the full path from the root to the resource before the resource name, separated by slashes. For example: RootResourceName/ResourceName |
MappingType | mappingType | Specify bidirectional or unidirectional as the mapping type. |
int | maxHops | Specify the maximum number or allowed hops. |
YesNoOptions | isShared | Specify whether these routes are shared. Shared routes can be used in more than one reservation. |
out string[,] | routes | Routes and route values associated with the activated topologies. |
out string | resultXml | Specify the variable for the XML output. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
string resultXml;
string reservationId = "28cb2a71-c8fc-4f41-a22b-e65685ebed14";
string[,] routes;
testShellAPI.GetRoutesSolution(reservationId,new string[]{"Router 1234/Port 1"},new string[]{"GenericResource 1234/Port 1"},MappingType.Bidirectional,2, YesNoOptions.No,out routes,out resultXml);
Output
{{"Router 1234/Port 1","L1 Switch 1234/Blade 1/Port 3","L1 Switch 1234/Blade 1/Port 1","GenericResource 1234/Port 1"}}
<ResponseInfo>
<Routes>
<Route Source="Router 1234/Port 1" Target="GenericResource 1234/Port 1" RouteType="bi" Shared="true">
<Segments>
<Segment Source="Router 1234/Port 1" Target="L1 Switch 1234/Blade 1/Port 3"/>
<Segment Source="L1 Switch 1234/Blade 1/Port 3" Target="L1 Switch 1234/Blade 1/Port 1"/>
<Segment Source="L1 Switch 1234/Blade 1/Port 1" Target="GenericResource 1234/Port 1"/>
</Segments>
</Route>
</Routes>
</ResponseInfo>
GenerateUtilizationReportGenerate a utilization report.
Syntax
GenerateUtilizationReport(resourceFamilyName,fromDate,toDate,resourceFullName,resourceModelName,includeChildResources,groupBy,utilizationReportType,out resultXml);
Parameters
Type | Name | Description |
---|---|---|
string | resourceFamilyName | Specify the name of the resource family. |
DateTime | fromDate | Specify the start time and date. |
DateTime | toDate | Specify the end time and date. |
string | resourceFullName | Specify the resource name. You can also include the full path from the root to the resource before the resource name, separated by slashes. For example: FolderName/ResourceName. |
string | resourceModelName | Specify the resource model. |
YesNoOptions | includeChildResources | Specify whether to include child resources utilization. |
UtilizationReportGroupByOption | groupBy | Specify how to group the utilization results: Resource, User, or Machine |
UtilizationReportTypeOption | utilizationReportType | Specify the report type: Lock or Mapping. |
out string | resultXml | Specify the variable for the XML output. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
string resultXml;
testShellAPI.GenerateUtilizationReport("Router", new DateTime(2012, 3, 1, 0, 0, 0), new DateTime(2012, 5, 31, 23, 59, 59), "", "", YesNoOptions.No, UtilizationReportGroupByOption.Resource, UtilizationReportTypeOption.Lock, out resultXml);
GetActiveTopologyNamesRetrieve a user's reserved topologies.
Syntax
GetActiveTopologyNames(out reservedTopologyNames,out resultXml);
Parameters
Type | Name | Description |
---|---|---|
out string[] | reservedTopologyNames | The list of active topologies reserved for the current user. |
out string | resultXml | Specify the variable for the XML output. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
string resultXml;
string[] reservedTopologyNames;
testShellAPI.GetActiveTopologyNames(out reservedTopologyNames,out resultXml);
Output
{"Temp Automation Resources/TP1"}
<ResponseInfo>
<Topologies>
<TopologyName>Temp Automation Resources/TP1</TopologyName>
</Topologies>
</ResponseInfo>
GetAllUsersDetailsRetrieve all users and user settings.
Syntax
GetAllUserDetails(out userDetails,out resultXml);
Parameters
Type | Name | Description |
---|---|---|
out string[,] | userDetails | User settings for the specified user. |
out string | resultXml | Specify the variable for the XML output. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
testShellAPI.GetAllUsersDetails();
Output
{{"Name","Email","IsAdmin","IsActive","IsDomainAdmin","DomainName"},{"admin","admin@work.com","True","True","False",""},{"User1234","user1234@work.com","True","True","False",""}}
<ResponseInfo>
<Users>
<User Name="admin" IsAdmin="true" IsActive="true" IsDomainAdmin="false">
<Groups>
<Group Name="System Administrators" Description="Built in group, all members have administrative rights.">
<TestShellDomains>
<TestShellDomain Name="Global" Description="A domain that includes all available resources" Id="dbaf480c-09f7-46d3-a2e2-e35d3e374a16"/>
</TestShellDomains>
</Group>
<Group Name="Everyone">
<TestShellDomains/>
</Group>
</Groups>
</User>
<User Name="User1234" IsAdmin="false" IsActive="true" IsDomainAdmin="false" Email="user1234@work.com">
<Groups>
<Group Name="Everyone">
<TestShellDomains/>
</Group>
</Groups>
</User>
<User Name="User2345" IsAdmin="false" IsActive="true" IsDomainAdmin="false" Email="">
<Groups>
<Group Name="Everyone">
<TestShellDomains/>
</Group>
</Groups>
</User>
</Users>
</ResponseInfo>
GetAttributeValueRetrieve an attribute's value.
Syntax
GetAttributeValue(resourceFullPath,attributeName,out attributeValue,out resultXml);
Parameters
Type | Name | Description |
---|---|---|
string | resourceFullPath | Specify the resource name. You can also include the full path from the root to the resource before the resource name, separated by slashes. For example: FolderName/RouterA/Port1. |
string | attributeName | Specify the attribute name. |
out string | attributeValue | The attribute value. |
out string | resultXml | Specify the variable for the XML output. |
Example
TestShellAPI testShellAPI = new TestShellAPI();
string attributeValue;
string resultXml;
testShellAPI.GetAttributeValue("Router 1234", "SW_Version", out attributeValue, out resultXml);
Output
1.3
<ResponseInfo Name="SW_Version" Value="1.3"/>
GetCategoriesOfTopologyRetrieves all categories of a given topology.
Syntax
GetCategoriesOfTopology(topologyPath, out categories, out resultXml);
Parameters
Type | Name | Description |
---|---|---|
string | topologyPath | 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. |
out string | categories | Specify a list of all categories belong to given topology. |
out string | resultXml | Specify the variable for the XML output. If a variable is not provided, the results will be sent to stdout. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
testShellAPI.GetCategoriesOfTopology("Folder1/exampleTopology");
Output
{['sampleCategory', 'Category2'; 'hello', 'bye']}
<ResponseInfo>
<Categories>
<Category Name="sampleCategory" Value="hello"/>
<Category Name="Category2" Value="bye"/>
</Categories>
</ResponseInfo>
GetCurrentReservationsRetrieve current reservations.
Syntax
GetCurrentReservations(reservationOwner,out reservations,out permittedUsers,out resultXml);
Parameters
Type | Name | Description |
---|---|---|
string | reservationOwner | Specify the user name of the reservation owner. |
out string[,] | reservations | All current reservations for the specified owner, or all current reservations (if no owner is specified). |
out string[,] | permittedUsers | Lists users with [active | full] access to the specified reservation. |
out string | resultXml | Specify the variable for the XML output. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
string[,] reservations;
string resultXml;
testShellAPI.GetCurrentReservations(admin, out reservations,out permittedUsers, out resultXml);
Output
{{"Id","Name","Description","Start","End","Owner","Booked","Status","RecurrenceType","Topologies","ActualEndTime","CreateDate","ModificationDate","Provisioning Status","DomainName"},
{"65b45c9b-7694-4a42-b8fa-0239109b5246","Reservation","","6/19/2012 2:30:00 PM","6/19/2012 4:30:00 PM","admin","True","Overtime","None","Topologies/Lab 1/Topology,Topologies/Lab 1/TrafficTopology,Topologies/Lab 1/TrafficTopology1","","6/19/2012 2:30:23 PM","6/19/2012 2:37:55 PM","Pending","Global"}}
{{ReservationId, UserName}
{65b45c9b-7694-4a42-b8fa-0239109b5246, admin}
{65b45c9b-7694-4a42-b8fa-0239109b5246, user1}
{65b45c9b-7694-4a42-b8fa-0239109b5246, user2}
<ResponseInfo>
<Reservations>
<Reservation Id="65b45c9b-7694-4a42-b8fa-0239109b5246" Name="Reservation" StartTime="2012-06-19T14:30:00" EndTime="2012-06-19T16:30:00" RecurrenceType="None" Owner="admin" Booked="true" Status="Overtime" ProvisioningStatus="Ready" ActualEndTime="" CreateDate="2012-06-19T14:30:23" ModificationDate="2012-06-19T14:37:55" DomainName="Global">
<Topologies>
<TopologyName>Topologies/Lab 1/Topology</TopologyName>
<TopologyName>Topologies/Lab 1/TrafficTopology</TopologyName>
<TopologyName>Topologies/Lab 1/TrafficTopology1</TopologyName>
</Topologies>
</Reservation>
</Reservations>
</ResponseInfo>
GetDomainDetailsRetrieves a domain's details including groups, topologies and resources associated with the specified domain.
Syntax
GetDomainDetails(domainName,out domainTopologiesFolder,out domainGroups,out domainTopologies,out domainResources,out resultXml);
Parameters
Type | Name | Description |
---|---|---|
string | domainName | Specify the name of the domain. |
out string | domainTopologiesFolder | The topologies folder of the domain. |
out string[,] | domainGroups | Groups and their associated values for the specified domain. |
out string[,] | domainTopologies | Topologies and their associated values for the specified domain. |
out string[,] | domainResources | Resources and their associated values for the specified domain. |
out string | resultXml | Specify the variable for the XML output. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
string domainTopologiesFolder;
string[,] domainGroups, domainTopologies, domainResources;
string resultXml;
testShellAPI.GetDomainDetails("Domain1",out domainTopologiesFolder,out domainGroups,out domainTopologies,out domainResources,out resultXml);
Output
"Root\Domain1 topologies"
{{"Animals","","Regular"}}
{{"Topology",""}}
{{"b1","b1"}}
<ResponseInfo Name="Domain1" Description="" TopologiesFolder="Root\Domain1 topologies">
<Groups>
<Group Name="Animals" Role="Regular"></Group>
</Groups>
<Topologies>
<Topology Name="Topology" Description=""></Topology>
</Topologies>
<Resources>
<Resource Name="b1" Path="b1"></Resource>
</Resources>
</ResponseInfo>
GetFolderContentRetrieve content for a specified path.
Syntax
GetFolderContent(fullPath, showAllDomains,out content,out resultXml);
Parameters
Type | Name | Description |
---|---|---|
string | fullPath | Specify the full folder name. Include the full path from the root to a specific folder, separated by slashes. For example: ResourceFamilyFolder/ResourceModelFolder. |
YesNoOptions | showAllDomains | Show all domains associated with the logged in user. |
out string[,] | content | Content and content parameters for the specified resource. |
out string | resultXml | Specify the variable for the XML output. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
testShellAPI.GetFolderContent("Lab Routers");
Output
{{"Name","Type"},{"Router 1234","Resource","ReadWrite"},{"Router 4321","Resource","ReadWrite"}}
<ResponseInfo>
<ContentArray>
<Content Name="Router 1234" Type="Resource" Permissions="ReadOnly"/>
<Content Name="Router 4321" Type="Resource" Permissions="ReadOnly"/>
</ContentArray>
</ResponseInfo>
MoveFolderAllows to change the location of a folder (and all its content, including sub folders) in the folder hierarchy.
Syntax
MoveFolder(originalFolder,targetFolder);
Parameters
Type | Name | Description |
---|---|---|
string | originalFolder | Path of the folder to be moved. |
string | targetFolder | The path of the new containing folder. To move a folder to root, value should be empty. |
out string | resultXml | Specify the variable for the XML output. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
testShellAPI.MoveFolder("MyFolder", "MyCompanyFolder");
GetGroupDomainsRetrieve a group's domains.
Syntax
GetGroupDomains(groupName,out domains,out resultXml);
Parameters
Type | Name | Description |
---|---|---|
string | groupName | Specify the name of the group. |
out string[,] | domains | All domains associated with the specified group. |
out string | resultXml | Specify the variable for the XML output. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
testShellAPI.GetGroupDomains("QA_Users");
Output
{{"Name", "Description", "Id"}, {"Global", "A domain that includes all available resources", "dbaf480c-09f7-46d3-a2e2-e35d3e374a16"}}
GetGroupsDetailsRetrieve all system groups.
Syntax
GetGroupsDetails(out groups,out resultXml);
Parameters
Type | Name | Description |
---|---|---|
out string[,] | groups | Retrieves all groups in the system, together with the description and role for each group. |
out string | resultXml | Specify the variable for the XML output. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
testShellAPI.GetGroupsDetails();
Output
{{"Name","Description"}, {"System Administrators","Built in group, all members have administrative rights."}, {"Domain Administrators","Built in group, all members have administrative Domain rights."}, {"QA_Users","QA users"}, {"RND users",""}}
<ResponseInfo>
<Groups>
<Group Name="System Administrators" Description="Built in group, all members have administrative rights." GroupRole="SystemAdmin">
<TestShellDomains>
<TestShellDomain Name="Global" Description="A domain that includes all available resources" Id="dbaf480c-09f7-46d3-a2e2-e35d3e374a16"/>
</TestShellDomains>
<Users>
<User Name="admin" IsAdmin="true" IsActive="true" IsDomainAdmin="false">
<Groups>
<Group Name="System Administrators" Description="Built in group, all members have administrative rights.">
<TestShellDomains>
<TestShellDomain Name="Global" Description="A domain that includes all available resources" Id="dbaf480c-09f7-46d3-a2e2-e35d3e374a16"/>
</TestShellDomains>
</Group>
<Group Name="Everyone">
<TestShellDomains/>
</Group>
<Group Name="Lab1">
<TestShellDomains>
<TestShellDomain Name="Lab1" Description="" Id="71aa4f7e-174d-4df1-b50a-59e98f09005c"/>
</TestShellDomains>
</Group>
</Groups>
</User>
</Users>
</Group>
<Group Name="Domain Administrators" Description="Built in group, all members have administrative Domain rights." GroupRole="DomainAdmin">
<TestShellDomains>
<TestShellDomain Name="Global" Description="A domain that includes all available resources" Id="dbaf480c-09f7-46d3-a2e2-e35d3e374a16"/>
</TestShellDomains>
<Users>
<User Name="User1234" IsAdmin="false" IsActive="true" IsDomainAdmin="true" Email="">
<Groups>
<Group Name="Domain Administrators" Description="Built in group, all members have administrative Domain rights.">
<TestShellDomains>
<TestShellDomain Name="Global" Description="" Id="dbaf480c-09f7-46d3-a2e2-e35d3e374a16"/>
</TestShellDomains>
</Group>
<Group Name="Everyone">
<TestShellDomains/>
</Group>
</Groups>
</User>
</Users>
</Group>
<Group Name="QA_Users" Description="QA users" GroupRole="Regular">
<TestShellDomains>
<TestShellDomain Name="Global" Description="A domain that includes all available resources" Id="dbaf480c-09f7-46d3-a2e2-e35d3e374a16"/>
</TestShellDomains>
<Users>
<User Name="User1234" IsAdmin="false" IsActive="true" IsDomainAdmin="false" Email="user1234@work.com">
<Groups>
<Group Name="Everyone">
<TestShellDomains/>
</Group>
<Group Name="QA_Users" Description="QA users">
<TestShellDomains>
<TestShellDomain Name="Global" Description="A domain that includes all available resources" Id="dbaf480c-09f7-46d3-a2e2-e35d3e374a16"/>
</TestShellDomains>
</Group>
</Groups>
</User>
<User Name="User2345" IsAdmin="false" IsActive="true" IsDomainAdmin="false" Email="">
<Groups>
<Group Name="Everyone">
<TestShellDomains/>
</Group>
<Group Name="QA_Users" Description="QA users">
<TestShellDomains>
<TestShellDomain Name="Global" Description="A domain that includes all available resources" Id="dbaf480c-09f7-46d3-a2e2-e35d3e374a16"/>
</TestShellDomains>
</Group>
</Groups>
</User>
</Users>
</Group>
<Group Name="RND_Users" GroupRole="Regular">
<TestShellDomains>
<TestShellDomain Name="Global" Description="A domain that includes all available resources" Id="dbaf480c-09f7-46d3-a2e2-e35d3e374a16"/>
</TestShellDomains>
<Users/>
</Group>
</Groups>
</ResponseInfo>
GetLockedResourcesRetrieve a list of locked resources.
Syntax
GetLockedResources(user,machine,folderFullPath,out reservations,out resources,out resultXml);
Parameters
Type | Name | Description |
---|---|---|
string | user | Specify a user name to retrieve locked resources for that user. |
string | machine | Specify a machine name to retrieve locked resources for that computer. |
string | folderFullPath | Specify the full folder name. Include the full path from the root to a specific folder, separated by slashes. For example: ResourceFamilyFolder/ResourceModelFolder. |
out string[,] | reservations | Retrieves all reservations for the resources that match the specified query conditions. |
out string[,] | resources | Resources and resource values associated with the specified topology. |
out string | resultXml | Specify the variable for the XML output. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
string[,] reservations,resources;
testShellAPI.GetLockedResources("admin","","",out reservations,out resources,out resultXml);
Output
{{"Index","Name","Owner","Created"},{"1","Immediate reservation","admin","6/20/2012 3:05:06 PM"}}
{{"ReservationIndex","ReservationName","Name","Address","FullAddress","RootAddress","ResourceModelName","FolderFullPath","Excluded"},
{"1","Immediate reservation","GenericResource 1234/Port 2","2","192.168.1.20/2","192.168.1.20","Generic Port Model","Temp Automation Resources","False"},
{"1","Immediate reservation","GenericResource 1234/Port 1","1","192.168.1.20/1","192.168.1.20","Generic Port Model","Temp Automation Resources","False"}}
<ResponseInfo>
<Reservations>
<Reservation Name="Immediate reservation" Owner="admin" Created="2012-06-20T15:05:06">
<LockedResources>
<Resource Name="GenericResource 1234/Port 2" FolderFullPath="Temp Automation Resources" Address="2" FullAddress="192.168.1.20/2" RootAddress="192.168.1.20" ResourceFamilyName="Generic Port" ResourceModelName="Generic Port Model" Locked="true" Excluded="false"/>
<Resource Name="GenericResource 1234/Port 1" FolderFullPath="Temp Automation Resources" Address="1" FullAddress="192.168.1.20/1" RootAddress="192.168.1.20" ResourceFamilyName="Generic Port" ResourceModelName="Generic Port Model" Locked="true" Excluded="false"/>
</LockedResources>
</Reservation>
</Reservations>
</ResponseInfo>
GetReservationDetailsRetrieve reservation details and parameters.
Syntax
GetReservationDetails(reservationId, disableCache, out name, out description, out creationTime, out startTime, out endTime,out reservationStatus, out provisioningStatus, out resources, out conflicts, out topologies,out topologyResources, out topologyRoutes, out topologyRouteSegments, out topologyInstructions, out connectedRoutes,out connectedRoutesSegments,out reservationRoutes, out reservationRouteSegments, out permittedUsers, out domainName, out topologyResourcesAttributes, out connectors, out connectorAttributes, out liveStatus,out services, out serviceAttributes, out apps,out setupStage, out resultXml);
Parameters
Type | Name | Description |
---|---|---|
string | reservationId | Specify the string that represents the reservation’s unique identifier. |
YesNoOptions | disableCache | Specify if the reservation detail is new or cached |
out string | name | The name of the reservation associated with the specified reservation ID. |
out string | description | The description of the reservation associated with the specified reservation ID. |
out string | Creation Time | The creation time and date for the specified reservation. |
out string | startTime | The start time and date for the specified reservation. |
out string | endTime | The end time and date for the specified reservation. |
out string | reservationStatus | Indicates the current reservation status. |
out string | provisioningStatus | Indicates the current provisioning status. |
out string[,] | resources | Resources and their associated values for the specified reservation. |
out string[,] | conflicts | Resource conflicts and their associated values for the specified reservation. |
out string[,] | topologies | Topologies and their associated values for the specified reservation. |
out string[,] | topologyResources | Topology resources and their associated values for the specified reservation. |
out string[,] | topologyRoutes | Topology routes in the specified reservation. |
out string[,] | topologyRouteSegments | Segment details for topology routes in the specified reservation. Each route is comprised of one or more segments. |
out string[,] | topologyInstructions | Topology instructions. |
out string[,] | connectedRoutes | Routes currently connected in the specified reservation. |
out string[,] | connectedRoutesSegments | Segment details for connected routes in the specified reservation. Each route is comprised of one or more segments. |
out string[,] | reservationRoutes | Routes in the specified reservation. |
out string[,] | reservationRouteSegments | Segment details for routes in the specified reservation. Each route is comprised of one or more segments. |
out string[,] | permittedUsers | Lists users with [active | full] access to the specified reservation. |
out string | domainName | The domain name of the specified reservation. |
out string[,] | topologyResourcesAttributes | Topology resources and their associated attribute changes for the specified reservation. |
out string[,] | connectors | Visual connectors associated with the specified reservation. |
out string[,] | ConnectorAttributes | Visual connectors attributes associated with a specified connector. |
out string[,] | LiveStatus | Gets the live status of the reservations. |
out string[,] | services | Matrix of service instances. |
out string[,] | serviceAttributes | Matrix of attributes of the services. |
out string[,] | apps | Apps associated with the specified reservation.. |
out string | SetupStage | Reservation's setup stage |
out string | resultXml | Specify the variable for the XML output. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
string reservationId = "af626b88-458b-4e7a-9054-c03d8cffa260";
string name, description;
string startTime,endTime;
string reservationStatus, provisioningStatus;
string domainName;
string setupStage;
string[,] resources, conflicts, topologies, topologyResources, topologyRoutes, topologyRouteSegments,topologyInstructions, connectedRoutes, connectedRoutesSegments, reservationRoutes, reservationRouteSegments, permittedUsers, topologyResourcesAttributes, connectors, connectorAttributes, apps;
string resultXml;
testShellAPI.GetReservationDetails(reservationId, true,out name,out description, out creationTime,out startTime,out endTime,out reservationStatus,out provisioningStatus,out resources,out conflicts,out topologies,out topologyResources,out topologyRoutes,out topologyRouteSegments,out topologyInstructions,out connectedRoutes,out connectedRoutesSegments,out reservationRoutes,out reservationRouteSegments,out permittedUsers,out domainName,out topologyResourcesAttributes, out connectors, out connectorAttributes, out liveStatus,out services, out servicrAttributes, out apps,out setupStage, out resultXml);
Output
test reservation
My Reservation
01/01/2015 10:00:00
01/01/2015 10:00:00
01/01/2015 11:00:00
Pending
Ready
{{"Name","FolderFullPath","FullAddress","Shared","Availability","Locked","Released","ResourceFamilyName","ResourceModelName"}}
{{"ResourceName","ConflictType","Topology","ConflictWith","ConflictWithUser","ConflictStarted","ConflictPlannedEndTime"}}
{{"Index","Name","Type","State"}}
{{"TopologyIndex","Name","FullAddress","Shared","Availability","Locked","Released","ResourceFamilyName","ResourceModelName"}}
{{"Index","TopologyIndex","Source","Target","RouteType","Alias","Shared"}}
{{"RouteIndex","Source","Target"}}
{{"topology1","topology2","topology3"}}
{{"Index","Source","Target","RouteType","Alias","Shared"}}
{{"RouteIndex","Source","Target"}}
{{"Index","Source","Target","RouteType","Alias","Shared"}}
{{"RouteIndex","Source","Target"}}
{{"user1","user2","user3"}}
Global
{{"TopologyIndex","Name","Alias", "AttributeName", "AttributeValue", Usage},
{"1", "t2", "test*", "Protocol", "Transparent", "Additional"}}
{{"Index","Source","Target","Direction", "Alias"},
{"1","Server1/Port1", "Server2/Port2", "Bi", "Connector1"}}
{{"ConnectorIndex","Name","Value"},
{"1","Duplex", "Half"}}
{{"Id","LiveStatusName","LiveStatusDescription"},
{"90205def-6c53-4cf5-abfa-632b8486a968","Pass",""}}
{{"Index","ServiceName","Alias"},
{"1","Sql1","Sql64"}}
{{"ServiceInstanceIndex","Name","Value"},
{"1","Duplex", "Half"}}
{{"Name","LogicalResourceFamily","LogicalResourceModel"},
{"App name","Deployed app family","Deployed app model"}}
"None"
<ResponseInfo xsi:type="GetReservationDescriptionResponseInfo">
<ReservationDescription Id="a97ce9c2-48eb-420e-85b7-2318106c35a3" Name="Sandbox-5-16-2017 15-59" StartTime="16/05/2017 15:59:00" EndTime="16/05/2017 17:59:00" RecurrenceType="None" Owner="admin" Booked="true" Status="Started" ProvisioningStatus="Not Run" ActualEndTime="" CreateDate="16/05/2017 15:59:21" ModificationDate="16/05/2017 16:01:38" DomainName="Global">
<Topologies>
<TopologyName>Environment-03-02-2015 18-21</TopologyName>
</Topologies>
<TopologiesInfo>
<Topology Name="Environment-03-02-2015 18-21" Alias="Environment-03-02-2015 18-21">
<Type>Regular</Type>
<State>Pending</State>
</Topology>
</TopologiesInfo>
<PermittedUsers>
<PermittedUser>admin</PermittedUser>
</PermittedUsers>
<Resources>
<ReservedResource Name="Database_ec513a05" FolderFullPath="" FullAddress="NA" Shared="false" Availability="Available" Locked="false" Released="false" ResourceFamilyName="Generic App Family" ResourceModelName="Generic App Model" CreatedByUser="admin" CreatedInDomain="Global" CreatedInReservation="a97ce9c2-48eb-420e-85b7-2318106c35a3">
<VmDetails UID="4232175a-6a64-bb3c-1cca-e8699845549b" CloudProviderFullName="testing">
<VmCustomParams>
<VmCustomParam Name="ip_regex" Value="" />
<VmCustomParam Name="auto_power_on" Value="True" />
<VmCustomParam Name="auto_power_off" Value="True" />
<VmCustomParam Name="wait_for_ip" Value="True" />
<VmCustomParam Name="auto_delete" Value="True" />
<VmCustomParam Name="refresh_ip_timeout" Value="600" />
<VmCustomParam Name="autoload" Value="True" />
</VmCustomParams>
</VmDetails>
<AppDetails AppName="Database" />
</ReservedResource>
</Resources>
<TopologiesReservedResources />
<Conflicts />
<TopologiesRouteInfo />
<TopologiesResourcesAttributeInfo />
<TopologiesInstructionsInfo />
<ActiveRoutesInfo />
<RequestedRoutesInfo />
<Connectors />
<Apps>
<ReservedApp Name="MonitoringApp">
<LogicalResource Family="Monitoring" Model="DefaultMonitoring"/>
</ReservedApp>
</Apps>
<ReservationLiveStatus ReservationId="a97ce9c2-48eb-420e-85b7-2318106c35a3" />
<SetupStage>None</SetupStage>
<Services />
</ReservationDescription>
</ResponseInfo>
GetResourcesLabelsInReservationGet resources associated with labels in reservation.
Syntax
GetResourcesLabelsInReservation(reservationId, out resultXml);
Parameters
Type | Name | Description |
---|---|---|
string | reservationId | Specify the string that represents the reservation’s unique identifier. |
out string | resultXml | Specify the variable for the XML output. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
string resultXml;
testShellAPI.GetResourcesLabelsInReservation("af626b88-458b-4e7a-9054-c03d8cffa260", out resultXml);
Output
<ResponseInfo xsi:type="GetResourcesLabelsInTopologyResponseInfo">
<Resources>
<Resource Name="res" Type="Resource" LabelName="label1">
</Resource>
<Resources>
<Resource Name="res2" Type="Resource" LabelName="label2">
</Resource>
<Resources>
<Resource Name="service1" Type="Service" LabelName="label3">
</Resource>
<Resources>
<Resource Name="app1" Type="App" LabelName="label4">
</Resource>
</Resources>
</ResponseInfo>
GetReservationInputsRetrieves all topology inputs for a specified reservation.
Syntax
GetReservationInputs(reservationId, out globalInputs, out requirementsInputs, out additionalInfoInputs, out resultXml);
Parameters
Type | Name | Description |
---|---|---|
string | reservationId | Specify the string that represents the reservation’s unique identifier. |
out string[,] | globalInputs | Global inputs associated with the specified reservation. |
out string[,] | requirementsInputs | Requirements inputs associated with the specified reservation. |
out string[,] | additionalInfoInputs | Additional info inputs associated with the specified reservation. |
out string | resultXml | Specify the variable for the XML output. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
string reservationId = "af626b88-458b-4e7a-9054-c03d8cffa260";
string resultXml;
string[,] globalInputs, requirementsInputs, additionalInfoInputs;
testShellAPI.GetReservationInputs(reservationId, out globalInputs, out requirementsInputs, out additionalInfoInputs, out resultXml);
Output
{{"Param Name", "Value", "Possible Values"}}
{{"Resource Name", "Param Name", "Value", "Input Type"}}
{{"Resource Name", "Param Name", "Value", "Possible Values"}}
<ResponseInfo/>
GetReservationRemainingTimeRetrieve the amount of time until the end of a reservation.
Syntax
GetReservationRemainingTime(reservationId,out reservationRemainingTimeInMinutes,out resultXml);
Parameters
Type | Name | Description |
---|---|---|
string | reservationId | Specify the string that represents the reservation’s unique identifier. |
out double | reservationRemainingTimeInMinutes | The number of minutes remaining until the reservation ends. |
out string | resultXml | Specify the variable for the XML output. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
string reservationId = "af626b88-458b-4e7a-9054-c03d8cffa260";
string resultXml;
double reminingTime;
testShellAPI.ExtendReservation(reservationId, out reminingTime, out resultXml);
Output
26.4
<ResponseInfo RemainingTimeInMinutes="26.4"/>
GetResourceAvailabilityGet resource availability.
Syntax
GetResourceAvailability(resourcesNames,out resources,out reservations,out usageSummary,showAllDomains,out resultXml);
Parameters
Type | Name | Description |
---|---|---|
string[] | resourcesNames | Specify a list of resource names. You can also include the full path from the root to the resource before the resource name, separated by slashes. For example: FolderName/ResourceName |
out string[,] | resources | All resources that match the specified query conditions. |
out string[,] | reservations | All reservations for the resources that match the specified query conditions. |
out string[,] | usageSummary | Specify the number used connected resources, this data will be available only on top level resource |
YesNoOptions | showAllDomains | Show all domains associated with the logged in user. |
out string | resultXml | Specify the variable for the XML output. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
string[] resourcesNames = new[] { "Bridge6", "Bridge7" };
string[,] resources;
string[,] reservations;
string[,] usageSummary;
string xmlResult;
testShellAPI.GetResourceAvailability(resourcesNames, out resources, out reservations, out usageSummary, YesNoOptions.Yes, out xmlResult);
Output
{{Index, Name, Description, Address, FullName, FullAddress, ResourceFamilyName, ResourceModelName, ReservedStatus, Excluded, Permission, ConnectedTo, FullPath}
{1, Bridge6, , 5, Bridge6, 5, Bridge, Bridge Generic Model, Shared, False, ReadWrite, ,Bridge6}
{2, Bridge7, , NA, Bridge7, NA, Bridge, Bridge Generic Model, Shared, False, ReadWrite, ,Bridge7}
{3, port1, , u, Bridge7/port1, NA/u, Bridge Port, Bridge Port Generic Model, Reserved, False, ReadWrite, Patch6\\jack2, Bridge7/port1}
{4, port1, , u, Bridge6/port1, 5/u, Bridge Port, Bridge Port Generic Model, Reserved, False, ReadWrite, Patch6\\jack1, Bridge6/port1}
{5, port2, , NA, Bridge6/port2, 5/NA, Bridge Port, Bridge Port Generic Model, Reserved, False, ReadWrite, Patch6\\jack4, Bridge6/port2}
{6, port2, , NA, Bridge7/port2, NA/NA, Bridge Port, Bridge Port Generic Model, Reserved, False, ReadWrite, Patch6\\jack5, Bridge7/port2}}
{{ResourceIndex, ResourceName, ReservationId, ReservationName, Owner, StartTime, EndTime, Shared}
{1, Bridge6, 2002cfca-50d0-43c4-8dbb-d09e0434dbe7, Topology4, admin, 14/01/2014 08:28:00, 14/01/2014 10:28:00, True}
{2, Bridge7, 2002cfca-50d0-43c4-8dbb-d09e0434dbe7, Topology4, admin, 14/01/2014 08:28:00, 14/01/2014 10:28:00, True}
{3, Bridge7/port1, 2002cfca-50d0-43c4-8dbb-d09e0434dbe7, Topology4, admin, 14/01/2014 08:28:00, 14/01/2014 10:28:00, False}
{4, Bridge6/port1, 2002cfca-50d0-43c4-8dbb-d09e0434dbe7, Topology4, admin, 14/01/2014 08:28:00, 14/01/2014 10:28:00, False}
{5, Bridge6/port2, 2002cfca-50d0-43c4-8dbb-d09e0434dbe7, Topology4, admin, 14/01/2014 08:28:00, 14/01/2014 10:28:00, False}
{6, Bridge7/port2, 2002cfca-50d0-43c4-8dbb-d09e0434dbe7, Topology4, admin, 14/01/2014 08:28:00, 14/01/2014 10:28:00, False}}
{{ResourceIndex, ResourceName, NumOfReserved, NumOfShared, NumOfNotInReservation}
{1, Bridge6, 2, 0, 0}{2, Bridge7, 2, 0, 0}}
<ResponseInfo>
<Resources>
<Resource Name="Bridge6" Address="5" FullName="Bridge6" FullAddress="5" ResourceFamilyName="Bridge" ResourceModelName="Bridge Generic Model" ReservedStatus="Shared" Excluded="false" Permission="ReadWrite" FullPath="Bridge6" >
<Reservations>
<Reservation ReservationId="2002cfca-50d0-43c4-8dbb-d09e0434dbe7" ResourceFullName="Bridge6" ReservationName="Topology4" Owner="admin" StartTime="14/01/2014 08:28:00" EndTime="14/01/2014 10:28:00" Shared="true"></Reservation>
</Reservations>
<UsageSummary ResourceFullName="Bridge6" NumOfNotInReservation="0" NumOfReserved="2" NumOfShared="0"></UsageSummary>
</Resource>
<Resource Name="Bridge7" Address="NA" FullName="Bridge7" FullAddress="NA" ResourceFamilyName="Bridge" ResourceModelName="Bridge Generic Model" ReservedStatus="Shared" Excluded="false" Permission="ReadWrite" FullPath="Bridge7" >
<Reservations>
<Reservation ReservationId="2002cfca-50d0-43c4-8dbb-d09e0434dbe7" ResourceFullName="Bridge7" ReservationName="Topology4" Owner="admin" StartTime="14/01/2014 08:28:00" EndTime="14/01/2014 10:28:00" Shared="true"></Reservation>
</Reservations>
<UsageSummary ResourceFullName="Bridge7" NumOfNotInReservation="0" NumOfReserved="2" NumOfShared="0"></UsageSummary>
</Resource>
<Resource Name="port1" Address="u" FullName="Bridge7/port1" FullAddress="NA/u" ResourceFamilyName="Bridge Port" ResourceModelName="Bridge Port Generic Model" ReservedStatus="Reserved" Excluded="false" Permission="ReadWrite" ConnectedTo="Patch6\jack2" FullPath="Bridge7/port1" >
<Reservations>
<Reservation ReservationId="2002cfca-50d0-43c4-8dbb-d09e0434dbe7" ResourceFullName="Bridge7/port1" ReservationName="Topology4" Owner="admin" StartTime="14/01/2014 08:28:00" EndTime="14/01/2014 10:28:00" Shared="false"></Reservation>
</Reservations>
</Resource>
<Resource Name="port1" Address="u" FullName="Bridge6/port1" FullAddress="5/u" ResourceFamilyName="Bridge Port" ResourceModelName="Bridge Port Generic Model" ReservedStatus="Reserved" Excluded="false" Permission="ReadWrite" ConnectedTo="Patch6\jack1" FullPath="Bridge6/port1" >
<Reservations>
<Reservation ReservationId="2002cfca-50d0-43c4-8dbb-d09e0434dbe7" ResourceFullName="Bridge6/port1" ReservationName="Topology4" Owner="admin" StartTime="14/01/2014 08:28:00" EndTime="14/01/2014 10:28:00" Shared="false"></Reservation>
</Reservations>
</Resource>
<Resource Name="port2" Address="NA" FullName="Bridge6/port2" FullAddress="5/NA" ResourceFamilyName="Bridge Port" ResourceModelName="Bridge Port Generic Model" ReservedStatus="Reserved" Excluded="false" Permission="ReadWrite" ConnectedTo="Patch6\jack4" FullPath="Bridge6/port2" >
<Reservations>
<Reservation ReservationId="2002cfca-50d0-43c4-8dbb-d09e0434dbe7" ResourceFullName="Bridge6/port2" ReservationName="Topology4" Owner="admin" StartTime="14/01/2014 08:28:00" EndTime="14/01/2014 10:28:00" Shared="false"></Reservation>
</Reservations>
</Resource>
<Resource Name="port2" Address="NA" FullName="Bridge7/port2" FullAddress="NA/NA" ResourceFamilyName="Bridge Port" ResourceModelName="Bridge Port Generic Model" ReservedStatus="Reserved" Excluded="false" Permission="ReadWrite" ConnectedTo="Patch6\jack5" FullPath="Bridge7/port2" >
<Reservations>
<Reservation ReservationId="2002cfca-50d0-43c4-8dbb-d09e0434dbe7" ResourceFullName="Bridge7/port2" ReservationName="Topology4" Owner="admin" StartTime="14/01/2014 08:28:00" EndTime="14/01/2014 10:28:00" Shared="false"></Reservation>
</Reservations>
</Resource>
</Resources>
</ResponseInfo>
GetResourceAvailabilityInTimeRangeGet resource availability during a specific time range.
Syntax
GetResourceAvailabilityInTimeRange(resourcesNames,startTime,endTime,showAllDomains,out resources,out reservations,out usageSummary,out resultXml);
Parameters
Type | Name | Description |
---|---|---|
string[] | resourcesNames | Specify a list of resource names. You can also include the full path from the root to the resource before the resource name, separated by slashes. For example: FolderName/ResourceName |
DateTime | startTime | The start time of the reservation. |
DateTime | endTime | The end time of the reservation. |
YesNoOptions | showAllDomains | Show all domains associated with the logged in user. |
out string[,] | resources | All resources that match the specified query conditions. |
out string[,] | reservations | All reservations for the resources that match the specified query conditions. |
out string[,] | usageSummary | Specify the number used connected resources, this data will be available only on top level resource |
out string | resultXml | Specify the variable for the XML output. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
string[] resourcesNames = new[] { "Bridge6", "Bridge7" };
string[,] resources;
string[,] reservations;
string[,] usageSummary;
string xmlResult;
testShellAPI.GetResourceAvailabilityInTimeRange(resourcesNames, DateTime.Now, DateTime.Now.AddYears(1), YesNoOptions.Yes, out resources, out reservations, out usageSummary, out xmlResult);
Output
{{Index, Name, Description, Address, FullName, FullAddress, ResourceFamilyName, ResourceModelName, ReservedStatus, Excluded, Permission, ConnectedTo, FullPath}
{1, Bridge6, , 5, Bridge6, 5, Bridge, Bridge Generic Model, Shared, False, ReadWrite, , Bridge6}
{2, Bridge7, , NA, Bridge7, NA, Bridge, Bridge Generic Model, Shared, False, ReadWrite, ,Bridge7}
{3, port1, , u, Bridge7/port1, NA/u, Bridge Port, Bridge Port Generic Model, Reserved, False, ReadWrite, Patch6\\jack2,Bridge7/port1}
{4, port1, , u, Bridge6/port1, 5/u, Bridge Port, Bridge Port Generic Model, Reserved, False, ReadWrite, Patch6\\jack1,Bridge6/port1}
{5, port2, , NA, Bridge6/port2, 5/NA, Bridge Port, Bridge Port Generic Model, Reserved, False, ReadWrite, Patch6\\jack4,Bridge6/port2}
{6, port2, , NA, Bridge7/port2, NA/NA, Bridge Port, Bridge Port Generic Model, Reserved, False, ReadWrite, Patch6\\jack5,Bridge7/port2}}
{{ResourceIndex, ResourceName, ReservationId, ReservationName, Owner, StartTime, EndTime, Shared}
{1, Bridge6, 2002cfca-50d0-43c4-8dbb-d09e0434dbe7, Topology4, admin, 14/01/2014 08:28:00, 14/01/2014 10:28:00, True}
{2, Bridge7, 2002cfca-50d0-43c4-8dbb-d09e0434dbe7, Topology4, admin, 14/01/2014 08:28:00, 14/01/2014 10:28:00, True}
{3, Bridge7/port1, 2002cfca-50d0-43c4-8dbb-d09e0434dbe7, Topology4, admin, 14/01/2014 08:28:00, 14/01/2014 10:28:00, False}
{4, Bridge6/port1, 2002cfca-50d0-43c4-8dbb-d09e0434dbe7, Topology4, admin, 14/01/2014 08:28:00, 14/01/2014 10:28:00, False}
{5, Bridge6/port2, 2002cfca-50d0-43c4-8dbb-d09e0434dbe7, Topology4, admin, 14/01/2014 08:28:00, 14/01/2014 10:28:00, False}
{6, Bridge7/port2, 2002cfca-50d0-43c4-8dbb-d09e0434dbe7, Topology4, admin, 14/01/2014 08:28:00, 14/01/2014 10:28:00, False}}
{{ResourceIndex, ResourceName, NumOfReserved, NumOfShared, NumOfNotInReservation}
{1, Bridge6, 2, 0, 0}{2, Bridge7, 2, 0, 0}}
<ResponseInfo>
<Resources>
<Resource Name="Bridge6" Address="5" FullName="Bridge6" FullAddress="5" ResourceFamilyName="Bridge" ResourceModelName="Bridge Generic Model" ReservedStatus="Shared" Excluded="false" Permission="ReadWrite" FullPath="Bridge6" >
<Reservations>
<Reservation ReservationId="2002cfca-50d0-43c4-8dbb-d09e0434dbe7" ResourceFullName="Bridge6" ReservationName="Topology4" Owner="admin" StartTime="14/01/2014 08:28:00" EndTime="14/01/2014 10:28:00" Shared="true"></Reservation>
</Reservations>
<UsageSummary ResourceFullName="Bridge6" NumOfNotInReservation="0" NumOfReserved="2" NumOfShared="0"></UsageSummary>
</Resource>
<Resource Name="Bridge7" Address="NA" FullName="Bridge7" FullAddress="NA" ResourceFamilyName="Bridge" ResourceModelName="Bridge Generic Model" ReservedStatus="Shared" Excluded="false" Permission="ReadWrite" FullPath="Bridge7" >
<Reservations>
<Reservation ReservationId="2002cfca-50d0-43c4-8dbb-d09e0434dbe7" ResourceFullName="Bridge7" ReservationName="Topology4" Owner="admin" StartTime="14/01/2014 08:28:00" EndTime="14/01/2014 10:28:00" Shared="true"></Reservation>
</Reservations>
<UsageSummary ResourceFullName="Bridge7" NumOfNotInReservation="0" NumOfReserved="2" NumOfShared="0"></UsageSummary>
</Resource>
<Resource Name="port1" Address="u" FullName="Bridge7/port1" FullAddress="NA/u" ResourceFamilyName="Bridge Port" ResourceModelName="Bridge Port Generic Model" ReservedStatus="Reserved" Excluded="false" Permission="ReadWrite" ConnectedTo="Patch6\jack2" FullPath="Bridge7/port1" >
<Reservations>
<Reservation ReservationId="2002cfca-50d0-43c4-8dbb-d09e0434dbe7" ResourceFullName="Bridge7/port1" ReservationName="Topology4" Owner="admin" StartTime="14/01/2014 08:28:00" EndTime="14/01/2014 10:28:00" Shared="false"></Reservation>
</Reservations>
</Resource>
<Resource Name="port1" Address="u" FullName="Bridge6/port1" FullAddress="5/u" ResourceFamilyName="Bridge Port" ResourceModelName="Bridge Port Generic Model" ReservedStatus="Reserved" Excluded="false" Permission="ReadWrite" ConnectedTo="Patch6\jack1" FullPath="Bridge6/port1" >
<Reservations>
<Reservation ReservationId="2002cfca-50d0-43c4-8dbb-d09e0434dbe7" ResourceFullName="Bridge6/port1" ReservationName="Topology4" Owner="admin" StartTime="14/01/2014 08:28:00" EndTime="14/01/2014 10:28:00" Shared="false"></Reservation>
</Reservations>
</Resource>
<Resource Name="port2" Address="NA" FullName="Bridge6/port2" FullAddress="5/NA" ResourceFamilyName="Bridge Port" ResourceModelName="Bridge Port Generic Model" ReservedStatus="Reserved" Excluded="false" Permission="ReadWrite" ConnectedTo="Patch6\jack4" FullPath="Bridge6/port2" >
<Reservations>
<Reservation ReservationId="2002cfca-50d0-43c4-8dbb-d09e0434dbe7" ResourceFullName="Bridge6/port2" ReservationName="Topology4" Owner="admin" StartTime="14/01/2014 08:28:00" EndTime="14/01/2014 10:28:00" Shared="false"></Reservation>
</Reservations>
</Resource>
<Resource Name="port2" Address="NA" FullName="Bridge7/port2" FullAddress="NA/NA" ResourceFamilyName="Bridge Port" ResourceModelName="Bridge Port Generic Model" ReservedStatus="Reserved" Excluded="false" Permission="ReadWrite" ConnectedTo="Patch6\jack5" FullPath="Bridge7/port2" >
<Reservations>
<Reservation ReservationId="2002cfca-50d0-43c4-8dbb-d09e0434dbe7" ResourceFullName="Bridge7/port2" ReservationName="Topology4" Owner="admin" StartTime="14/01/2014 08:28:00" EndTime="14/01/2014 10:28:00" Shared="false"></Reservation>
</Reservations>
</Resource>
</Resources>
</ResponseInfo>
GetResourceCommandsRetrieve resource driver commands.
Syntax
GetResourceCommands(resourceFullPath,out commands,out parameters,out resultXml);
Parameters
Type | Name | Description |
---|---|---|
string | resourceFullPath | Specify the resource name. You can also include the full path from the root to the resource before the resource name, separated by slashes. For example: FolderName/RouterA/Port1. |
out string[,] | commands | All commands for drivers associated with the specified resource. |
out string[,] | parameters | Parameters associated with each command. |
out string | resultXml | Specify the variable for the XML output. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
string[,] commands, parameters;
testShellAPI.GetResourceCommands("Router 1234",out commands,out parameters,out resultXml);
Output
{{"Index","Name","Description","DisplayName"},
{"1","ExampleCommand","","Example Command"},
{"2","ResetDriver","","Reset Driver"}}
{{"CommandIndex","Name","Description","Type","Mandatory","DefaultValue","EnumValues"},
{"1","userParam1","","String","False","Hello",""},
{"1","userParam2","","Numeric","False","42",""}}
<ResponseInfo>
<Commands>
<Command Name="ExampleCommand" DisplayName="Example Command" >
<Parameters>
<Parameter Name="userParam1" Type="String" Mandatory="false" DefaultValue="Hello"/>
<Parameter Name="userParam2" Type="Numeric" Mandatory="false" DefaultValue="42"/>
</Parameters>
</Command>
<Command Name="ResetDriver" DisplayName="Reset Driver" >
<Parameters/>
</Command>
</Commands>
</ResponseInfo>
GetServiceCommandsRetrieve service driver commands.
Syntax
GetServiceCommands(serviceName,out commands,out parameters,out resultXml);
Parameters
Type | Name | Description |
---|---|---|
string | serviceName | Specify the service name. |
out string[,] | commands | All commands for drivers associated with the specified service. |
out string[,] | parameters | Parameters associated with each command. |
out string | resultXml | Specify the variable for the XML output. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
string[,] commands, parameters;
testShellAPI.GetServiceCommands("VLAN",out commands,out parameters,out resultXml);
Output
{{"Index","Name","Description","DisplayName"},
{"1","ExampleCommand","","Example Command"},
{"2","ResetDriver","","Reset Driver"}}
{{"CommandIndex","Name","Description","Type","Mandatory","DefaultValue","EnumValues"},
{"1","userParam1","","String","False","Hello",""},
{"1","userParam2","","Numeric","False","42",""}}
<ResponseInfo>
<Commands>
<Command Name="ExampleCommand" DisplayName="Example Command" >
<Parameters>
<Parameter Name="userParam1" Type="String" Mandatory="false" DefaultValue="Hello"/>
<Parameter Name="userParam2" Type="Numeric" Mandatory="false" DefaultValue="42"/>
</Parameters>
</Command>
<Command Name="ResetDriver" DisplayName="Reset Driver" >
<Parameters/>
</Command>
</Commands>
</ResponseInfo>
GetResourceConnectedCommandsRetrieve resource driver commands.
Syntax
GetResourceConnectedCommands(resourceFullPath,out commands,out parameters,out resultXml);
Parameters
Type | Name | Description |
---|---|---|
string | resourceFullPath | Specify the resource name. You can also include the full path from the root to the resource before the resource name, separated by slashes. For example: FolderName/RouterA/Port1. |
out string[,] | commands | All commands for drivers associated with the specified resource. |
out string[,] | parameters | Parameters associated with each command. |
out string | resultXml | Specify the variable for the XML output. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
string[,] commands, parameters;
testShellAPI.GetResourceConnectedCommands("Router 1234",out commands,out parameters,out resultXml);
Output
{{"Index","Name","Tag","Description","DisplayName"},
{"1","ExampleCommand", "virtualization", "","Example Command"},
{"2","PowerOn","power","","Power On"}}
{{"CommandIndex","Name","Description","Type","Mandatory","DefaultValue","EnumValues"},
{"1","userParam1","","String","False","Hello",""},
{"1","userParam2","","Numeric","False","42",""}}
<ResponseInfo>
<Commands>
<Command Name="SpinUp" Tag="virtualization" DisplayName="Example virtualiztion command" >
<Parameters>
<Parameter Name="userParam1" Type="String" Mandatory="false" DefaultValue="Hello"/>
<Parameter Name="userParam2" Type="Numeric" Mandatory="false" DefaultValue="42"/>
</Parameters>
</Command>
<Command Name="PowerOn" Tag="power" DisplayName="Example power command" >
<Parameters/>
</Command>
</Commands>
</ResponseInfo>
GetResourceDetailsRetrieve the resource parameters and attributes.
Syntax
GetResourceDetails(resourceFullPath, showAllDomains,out resource,out attributes,out resultXml);
Parameters
Type | Name | Description |
---|---|---|
string | resourceFullPath | Specify the resource name. You can also include the full path from the root to the resource before the resource name, separated by slashes. For example: FolderName/RouterA/Port1. |
YesNoOptions | showAllDomains | Show all domains associated with the logged in user. |
out string[,] | resource | Details associated with the specified resource. |
out string[,] | attributes | Attributes and attribute values for the specified resource. |
out string | resultXml | Specify the variable for the XML output. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
string[,] resource;
attributes[,] attributes;
string resultXml;
testShellAPI.GetResourceDetails("Lab Routers/Router 1234", false, out resource, out attributes, out resultXml);
Output
{{"Index","ParentIndex","Name","Address","FullAddress","RootAddress","ResourceFamilyName","ResourceModelName","FolderFullPath","Locked","LockInfo_ReservationName","LockInfo_Username","LockInfo_MachineName","LockInfo_Created","Excluded", "Permissions"},
{"1","-1","Router 1234","192.168.1.200","192.168.1.200","192.168.1.200","Generic Chassis","Generic Chassis Model","Lab Routers","False","","","","","False", "ReadOnly"},
{"2","1","Router 1234/Port 1","1","192.168.1.200/1","192.168.1.200","Generic Port","Generic Port Model","Lab Routers","False","","","","","False","ReadOnly"}}
{{"ResourceIndex","ResourceName","Name","Value","Type"},
{"1","Router 1234","SW_Version","","String"}}
<ResponseInfo Name="Router 1234" DriverName="Router Driver" 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" Permissions="ReadOnly" ResourceLiveStatusName="name1" ResourceLiveStatusDescription="description1">
<ResourceAttributes>
<ResourceAttribute Name="SW_Version" Value="" Type="String"></ResourceAttribute>
</ResourceAttributes>
<Domains></Domains>
<ChildResources>
<ResourceInfo Name="Router 1234/Port 1" FolderFullPath="Lab Routers" Address="1" FullAddress="192.168.1.200/1" RootAddress="192.168.1.200" ResourceFamilyName="Generic Port" ResourceModelName="Generic Port Model" Locked="false" Excluded="false" Description="a generic router port" Permissions="ReadOnly">
<ResourceAttributes></ResourceAttributes>
<Domains></Domains>
<LockInfo></LockInfo>
</ResourceInfo>
</ChildResources>
<LockInfo></LockInfo>
<CreatedInReservation></CreatedInReservation>
<CreatedByUser></CreatedByUser>
<CreatedInDomain></CreatedInDomain>
</ResponseInfo>
GetResourceListRetrieve a list of resources for a specified path.
Syntax
GetResourceList(folderFullPath,out resources,out resultXml);
Parameters
Type | Name | Description |
---|---|---|
string | folderFullPath | Specify the full folder name. Include the full path from the root to a specific folder, separated by slashes. For example: ResourceFamilyFolder/ResourceModelFolder. |
out string[,] | resources | Resources and resource values for the specified path. |
out string | resultXml | Specify the variable for the XML output. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
string[,] resources;
string resultXml;
testShellAPI.GetResourceList("Lab Routers", out resources, out resultXml);
Output
{{"Name","Address","FullAddress","RootAddress","ResourceFamilyName","ResourceModelName","FolderFullPath","Locked","LockInfo_ReservationName","LockInfo_Username","LockInfo_MachineName","LockInfo_Created","Excluded"},
{Router 1234","192.168.1.200","192.168.1.200","192.168.1.200","Generic Chassis","Generic Chassis Model","Lab Routers","False","","","","","False"},
{Router 4321","192.168.1.201","192.168.1.201","192.168.1.201","Generic Resource","Generic Resource Model","Lab Routers","False","","","","","False"}}
<ResponseInfo>
<Resources>
<Resource 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">
<LockInfo/>
</Resource>
<Resource Name="Router 4321" FolderFullPath="Lab Routers" Address="192.168.1.201" FullAddress="192.168.1.201" RootAddress="192.168.1.201" ResourceFamilyName="Generic Resource" ResourceModelName="Generic Resource Model" Locked="false" Excluded="false">
<LockInfo/>
</Resource>
</Resources>
</ResponseInfo>
GetResourceLiveStatusGets the live status of a resource.
Syntax
GetResourceLiveStatus(resourceFullPath,out liveStatusName,out additionalInfo,out resultXml);
Parameters
Type | Name | Description |
---|---|---|
string | resourceFullPath | Specify the resource name. You can also include the full path from the root to the resource before the resource name, separated by slashes. For example: FolderName/RouterA. |
out string | liveStatusName | Resource live status name |
out string | additionalInfo | Resource live status additional info |
out string | resultXml | Specify the variable for the XML output. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
string resultXml;
testShellAPI.GetResourceLiveStatus("myResourceName", out liveStatusName , out additionalInfo , out resultXml );
Output
Online
Resource was responding to pings at 12/12/2013 10:35 AM
GetReservationsLiveStatusGets the live status the reservations.
Syntax
GetReservationsLiveStatus(reservationsId,out statusesArray);
Parameters
Type | Name | Description |
---|---|---|
string[] | reservationsId | Specifies a string array that represents reservation unique identifiers. |
out string[,] | statusesArray | Returns an array with reservation's live status. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
string resultXml;
testShellAPI.GetReservationsLiveStatus("a2f1b35e-3deb-42ee-b70d-78189dd10d56", out statusesArray , out resultXml );
Output
{{"a2f1b35e-3deb-42ee-b70d-78189dd10d56","Pass","Description"}}
<ResponseInfo>
<ReservationLiveStatuses>
<ReservationLiveStatus ReservationId="a2f1b35e-3deb-42ee-b70d-78189dd10d56" ReservationLiveStatusName="Pass" ReservationLiveStatusDescription></ReservationLiveStatus>
</ReservationLiveStatuses>
</ResponseInfo>
GetResourceMappingsRetrieve current mappings for specified resources.
Syntax
GetResourceMappings(resources,out mappings,out resultXml);
Parameters
Type | Name | Description |
---|---|---|
string[] | resources | Specify a list of resources. |
out string[,] | mappings | All mappings associated with the listed resources. |
out string | resultXml | Specify the variable for the XML output. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
string resultXml;
testShellAPI.GetResourceMappings(new string[]{"L1 Switch 1234/Blade 1/Port 2"}, out mappings, out resultXml);
Output
{{"Source","Target","RouteType"},
{"L1 Switch 1234/Blade 1/Port 3","L1 Switch 1234/Blade 1/Port 2","uni"}}
<ResponseInfo>
<Mapping Source="L1 Switch 1234/Blade 1/Port 3" Target="L1 Switch 1234/Blade 1/Port 2" RouteType="uni"/>
</ResponseInfo>
GetRouteSegmentsRetrieves all the ports on the route.
Syntax
GetRouteSegments(resource,out segments,out resultXml);
Parameters
Type | Name | Description |
---|---|---|
string | resource | Specify the resource name. You can also include the full path from the root to the resource before the resource name, separated by slashes. For example: FolderName/RouterA/Port1. |
out string[,] | segments | The segments details for the specified route. |
out string | resultXml | Specify the variable for the XML output. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
string resultXml;
string[,] segments;
testShellAPI.GetRouteSegments("Router 1234/Port 1",out segments,out resultXml);
Output
{{"Router 1234/Port 1","L1 Switch 1234/Blade 1/Port 3","L1 Switch 1234/Blade 1/Port 1","GenericResource 1234/Port 1"}}
<ResponseInfo>
<Routes>
<Route Source="Router 1234/Port 1" Target="GenericResource 1234/Port 1" RouteType="bi" Shared="true">
<Segments>
<Segment Source="Router 1234/Port 1" Target="L1 Switch 1234/Blade 1/Port 3"/>
<Segment Source="L1 Switch 1234/Blade 1/Port 3" Target="L1 Switch 1234/Blade 1/Port 1"/>
<Segment Source="L1 Switch 1234/Blade 1/Port 1" Target="GenericResource 1234/Port 1"/>
</Segments>
</Route>
</Routes>
</ResponseInfo>
GetScheduledReservationsRetrieve scheduled reservations for a specified time range.
Syntax
GetScheduledReservations(fromTime,untilTime,out reservations,out permittedUsers,out resultXml);
Parameters
Type | Name | Description |
---|---|---|
DateTime | fromTime | Specify from which time and date to search. |
DateTime | untilTime | Specify until which time and date to search. |
string | ownerName | Specify reservation owner name |
out string[,] | reservations | Scheduled reservations for the provided time range. Reservations will be listed for the specified owner, or all current reservations (if no owner is specified). |
out string[,] | permittedUsers | Lists users with [active | full] access to the specified reservation. |
out string | resultXml | Specify the variable for the XML output. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
string[,] reservations;
string [,] permittedUsers;
string resultXml;
testShellAPI.GetScheduledReservations(new DateTime(2015, 1, 1, 8, 0, 0), new DateTime(2015, 1, 1, 12, 0, 0), out reservations, out resultXml);
Output
{{"Id","Name","Description","Start","End","Owner","Booked","Status","RecurrenceType","Topologies","ActualEndTime","CreateDate","ModificationDate","Provisioning Status","DomainName","ReservationsLiveStatus","ReservationsLiveStatusDescription"},
{af626b88-458b-4e7a-9054-c03d8cffa260","test reservation","","1/1/2015 10:00:00 AM","1/1/2015 12:00:00 PM","admin","True","Pending","None","","","6/20/2012 10:40:47 AM","6/20/2012 10:45:16 AM","Pending","Global","Pass","Reservation"}}
{{ReservationId, UserName}
{af626b88-458b-4e7a-9054-c03d8cffa260, admin}
{af626b88-458b-4e7a-9054-c03d8cffa260, user1}
{af626b88-458b-4e7a-9054-c03d8cffa260, user2}
<ResponseInfo>
<Reservations>
<Reservation Id="af626b88-458b-4e7a-9054-c03d8cffa260" Name="test reservation" StartTime="2015-01-01T10:00:00" EndTime="2015-01-01T12:00:00" RecurrenceType="None" Owner="admin" Booked="true" Status="Pending" ProvisioningStatus="Ready" ActualEndTime="" CreateDate="2012-06-20T10:40:47" ModificationDate="2012-06-20T10:45:16" DomainName="Global" ReservationLiveStatusName="Pass" ReservationLiveStatusDescription="Reservation" >
<Topologies/>
</Reservation>
</Reservations>
</ResponseInfo>
GetServerDateAndTimeRetrieve the server's date and time.
Syntax
GetServerDateAndTime(out serverDateTime,out resultXml);
Parameters
Type | Name | Description |
---|---|---|
out DateTime | serverDateTime | The server’s UTC date and time. |
out string | resultXml | Specify the variable for the XML output. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
DateTime serverDateTime;
string resultXml;
testShellAPI.GetServerDateAndTime(out serverDateTime,out resultXml);
Output
06/21/2012 10:52:43
<ResponseInfo ServerDateTime="2012-06-21T10:52:43.4464527Z" ServerDateTimeString="06/21/2012 10:52"/>
GetTopologyCommandsRetrieve available topology commands in a reservation.
Syntax
GetTopologyCommands(reservationId,out commands,out parameters,out resultXml);
Parameters
Type | Name | Description |
---|---|---|
string | reservationId | Specify the string that represents the reservation’s unique identifier. |
out string[,] | commands | All commands for driver associated with a topology in the specified reservation. |
out string[,] | parameters | Parameters associated with each command. |
out string | resultXml | Specify the variable for the XML output. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
string[,] commands, parameters;
string resultXml;
string reservationId = "af626b88-458b-4e7a-9054-c03d8cffa260";
testShellAPI.GetTopologyCommands(reservationId,out commands,out parameters,out resultXml);
Output
{{"Index","Name","Description"},
{"1","ExampleCommand",""},
{"2","Setup",""}}
{{"CommandIndex","Name","Description","Type","Mandatory","DefaultValue","EnumValues"},
{"1","userParam1","","String","False","Hello",""},
{"1","userParam2","","Numeric","False","42",""}}
<ResponseInfo>
<Commands>
<Command Name="ExampleCommand">
<Parameters>
<Parameter Name="userParam1" Type="String" Mandatory="false" DefaultValue="Hello"/>
<Parameter Name="userParam2" Type="Numeric" Mandatory="false" DefaultValue="42"/>
</Parameters>
</Command>
<Command Name="Setup">
<Parameters/>
</Command>
</Commands>
</ResponseInfo>
GetEnvironmentCommandsRetrieve available environment commands in a reservation.
Syntax
GetEnvironmentCommands(reservationId,out commands,out parameters,out resultXml);
Parameters
Type | Name | Description |
---|---|---|
string | reservationId | Specify the string that represents the reservation’s unique identifier. |
out string[,] | commands | All commands for driver associated with a topology in the specified reservation. |
out string[,] | parameters | Parameters associated with each command. |
out string | resultXml | Specify the variable for the XML output. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
string[,] commands, parameters;
string resultXml;
string reservationId = "af626b88-458b-4e7a-9054-c03d8cffa260";
testShellAPI.GetEnvironmentCommands(reservationId,out commands,out parameters,out resultXml);
Output
{{"Index","Name","Description"},
{"1","ExampleCommand",""},
{"2","Setup",""}}
{{"CommandIndex","Name","Description","Type","Mandatory","DefaultValue","EnumValues"},
{"1","userParam1","","String","False","Hello",""},
{"1","userParam2","","Numeric","False","42",""}}
<ResponseInfo>
<Commands>
<Command Name="ExampleCommand">
<Parameters>
<Parameter Name="userParam1" Type="String" Mandatory="false" DefaultValue="Hello"/>
<Parameter Name="userParam2" Type="Numeric" Mandatory="false" DefaultValue="42"/>
</Parameters>
</Command>
<Command Name="Setup">
<Parameters/>
</Command>
</Commands>
</ResponseInfo>
GetTopologyDetailsRetrieve the topology parameters and attributes.
Syntax
GetTopologyDetails(topologyFullPath,out owner,out instructions,out resources,out attributes,out abstractResources,out abstractResourcesAttributes,out abstractResourcesRequiredAttributes,out routes,out driver,out globalInputs,out requirementsInputs,out additionalInfoInputs,out connectors,out connectorAttributes,out alias,out type,out state,out parentTopology,out services,out serviceAttributes,out apps, out maxDuration, out resultXml);
Parameters
Type | Name | Description |
---|---|---|
string | topologyFullPath | 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. |
out string | owner | Owner of the topology. |
out string | instructions | Topology instructions. |
out string[,] | resources | Resources and resource values associated with the specified topology. |
out string[,] | attributes | Attributes and attribute values for resources associated with the specified topology. |
out string[,] | abstractResources | Abstract resources and their associated values for the specified topology. |
out string[,] | abstractResourcesAttributes | Attributes and attribute values for all abstract resources associated with the specified topology. |
out string[,] | abstractResourcesRequiredAttributes | Required attributes and attribute values for all abstract resources associated with the specified topology (multiple possible values for a single attribute are displayed in different rows). |
out string[,] | routes | Routes and route endpoints associated with the specified topology. |
out string | Driver | The name of the driver associated with this topology. |
out string[,] | globalInputs | Global inputs associated with the specified topology. |
out string[,] | requirementsInputs | Requirements inputs associated with the specified topology. |
out string[,] | additionalInfoInputs | Additional info inputs associated with the specified topology. |
out string[,] | connectors | Connectors associated with the specified topology. |
out string[,] | ConnectorAttributes | Visual connectors attributes associated with a specified connector. |
out string | type | The Type of the topology. |
out string | state | The State of the topology. |
out string[,] | parentTopology | The Topology from which this topology was created. |
out string[,] | permittedEditors | List of permitted editors names. |
out string[,] | services | Matrix of service instances. |
out string[,] | serviceAttributes | Matrix of attributes of the services. |
out string[,] | apps | Matrix of apps. |
out string | maxDuration | The maximun amount of time this topology can be reserved. |
out string | resultXml | Specify the variable for the XML output. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
testShellAPI.GetTopologyDetails("Temp Automation Resources/TP1");
Output
{{"Owner"}}
{{"Instructions"}}
{{"Index","Name","Address","FullAddress","RootAddress","ResourceFamilyName","ResourceModelName","FolderFullPath","Locked","LockInfo_ReservationName","LockInfo_Username","LockInfo_MachineName","LockInfo_Created","Excluded","Alias","WillBeLocked"},
{"1","Router 1234","192.168.1.201","192.168.1.201","192.168.1.201","Generic Chassis","Generic Chassis Model","Lab Routers","False","","","","","False","Router 1234","False"},
{"2","GenericResource 1234/ConsolePort 21","21","192.168.1.20/21","192.168.1.20","Generic Port","Generic Port Model","Temp Automation Resources","False","","","","","False","ConsolePort 21","True"},
{"3","GenericResource 1234/Port 2","2","192.168.1.20/2","192.168.1.20","Generic Port","Generic Port Model","Temp Automation Resources","False","","","","","False","Port 2","True"},
{"4","GenericResource 1234/PowerPort 12","12","192.168.1.20/12","192.168.1.20","Generic Port","Generic Port Model","Temp Automation Resources","False","","","","","False","PowerPort 12","True"},
{"5","Router 1234/Port 1","1","192.168.1.201/1","192.168.1.201","Generic Port","Generic Port Model","Lab Routers","False","","","","","False","Port 1","True"},
{"6","GenericResource 1234/PowerPort 11","11","192.168.1.20/11","192.168.1.20","Generic Port","Generic Port Model","Temp Automation Resources","False","","","","","False","PowerPort 11","True"},
{"7","GenericResource 1234","192.168.1.20","192.168.1.20","192.168.1.20","Generic Resource","Generic Resource Model","Temp Automation Resources","False","","","","","False","GenericResource 1234","True"},
{"8","GenericResource 1234/Port 1","1","192.168.1.20/1","192.168.1.20","Generic Port","Generic Port Model","Temp Automation Resources","False","","","","","False","Port 1","True"}}
{{"ResourceIndex","ResourceName","Name","Value","Type"},
{"1","Router 1234","SW_Version","","String"}}
{{"Index","ResourceFamilyName","ResourceModelName","Alias","WillBeLocked","Valid","Quantity"}}
{{"AbstractResourceIndex","AbstractResourceAlias","AttributeName","AttributeValue","AttributeType"}}
{{"AbstractResourceIndex","AbstractResourceAlias","AttributeName","AttributeValue","AttributeType"}}
{{"Index","Source","Target","RouteType","Alias","Shared"},
{"1","GenericResource 1234/Port 1","Router 1234/Port 1","bi","","true"},
{"2","Router 1234/Port 1","GenericResource 1234/Port 2","uni","","true"}}
{{"ExampleTopologyDriver"}}
{{"Param Name", "Default Value", "Possible Values", "Description"},
{"Some global input", "", "", ""}}
{{"Resource Name", "Param Name", "Default Value", "Possible Values", "Input Type", "Description"},
{"test*", "Model", "", "", "Models", ""},
{"test*", "Speed", "", "10 Mbps
100 Mbps
1 Gbps
10 Gbps", "Attributes", ""}}
{{"Resource Name", "Param Name", "Default Value", "Possible Values", "Description"},
{"test*", "Test", "", ""}}
{{"index","Source","Target","ResourceMappingType","Alias"},
{"1","b6/p7","b7/p5","bi","vc1"}}
{{"ConnectorIndex","Name","Value"},
{"1","Duplex", "Half"}}
"Build"
"Ready"
"02:00:00"
{{"Index","Name","Type","State"},
{"0","Topo1234","Build","Pending"}}
{"John Doe", "Smith Wilson", "Archie Goldman"}
{{"Index","ServiceName","Alias"},
{"1","Sql1","Sql64"}}
{{"ServiceInstanceIndex","Name","Value"},
{"1","Duplex","Half"}}
{{"Name","LogicalResourceFamily","LogicalResourceModel"},
{"App","General App Family","General App Model"}}
<ResponseInfo Name="TP1">
<Resources>
<ResourceInfo Name="Router 1234" FolderFullPath="Lab Routers" Address="192.168.1.201" FullAddress="192.168.1.201" RootAddress="192.168.1.201" ResourceFamilyName="Generic Chassis" ResourceModelName="Generic Chassis Model" Alias="Router 1234" Locked="false" Excluded="false" WillBeLocked="false">
<ResourceAttributes>
<ResourceAttribute Name="SW_Version" Value="" Type="String"/>
</ResourceAttributes>
<LockInfo/>
</ResourceInfo>
<ResourceInfo Name="GenericResource 1234/ConsolePort 21" FolderFullPath="Temp Automation Resources" Address="21" FullAddress="192.168.1.20/21" RootAddress="192.168.1.20" ResourceFamilyName="Generic Port" ResourceModelName="Generic Port Model" Alias="ConsolePort 21" Locked="false" Excluded="false" WillBeLocked="true">
<ResourceAttributes/>
<LockInfo/>
<Connections FullPath="Temp Automation Resources/ConsoleServer 1234/ConsolePort 1"/>
</ResourceInfo>
<ResourceInfo Name="GenericResource 1234/Port 2" FolderFullPath="Temp Automation Resources" Address="2" FullAddress="192.168.1.20/2" RootAddress="192.168.1.20" ResourceFamilyName="Generic Port" ResourceModelName="Generic Port Model" Alias="Port 2" Locked="false" Excluded="false" WillBeLocked="true">
<ResourceAttributes/>
<LockInfo/>
<Connections FullPath="Temp Automation Resources/L1 Switch 1234/Blade 1/Port 2"/>
</ResourceInfo>
<ResourceInfo Name="GenericResource 1234/PowerPort 12" FolderFullPath="Temp Automation Resources" Address="12" FullAddress="192.168.1.20/12" RootAddress="192.168.1.20" ResourceFamilyName="Generic Port" ResourceModelName="Generic Port Model" Alias="PowerPort 12" Locked="false" Excluded="false" WillBeLocked="true">
<ResourceAttributes/>
<LockInfo/>
<Connections FullPath="Temp Automation Resources/SmartPower2L 1234/PowerPort 2"/>
</ResourceInfo>
<ResourceInfo Name="Router 1234/Port 1" FolderFullPath="Lab Routers" Address="1" FullAddress="192.168.1.201/1" RootAddress="192.168.1.201" ResourceFamilyName="Generic Port" ResourceModelName="Generic Port Model" Alias="Port 1" Locked="false" Excluded="false" WillBeLocked="true">
<ResourceAttributes/>
<LockInfo/>
<Connections FullPath="Temp Automation Resources/L1 Switch 1234/Blade 1/Port 3"/>
</ResourceInfo>
<ResourceInfo Name="GenericResource 1234/PowerPort 11" FolderFullPath="Temp Automation Resources" Address="11" FullAddress="192.168.1.20/11" RootAddress="192.168.1.20" ResourceFamilyName="Generic Port" ResourceModelName="Generic Port Model" Alias="PowerPort 11" Locked="false" Excluded="false" WillBeLocked="true">
<ResourceAttributes/>
<LockInfo/>
<Connections FullPath="Temp Automation Resources/SmartPower2L 1234/PowerPort 1"/>
</ResourceInfo>
<ResourceInfo Name="GenericResource 1234" FolderFullPath="Temp Automation Resources" Address="192.168.1.20" FullAddress="192.168.1.20" RootAddress="192.168.1.20" ResourceFamilyName="Generic Resource" ResourceModelName="Generic Resource Model" Alias="GenericResource 1234" Locked="false" Excluded="false" WillBeLocked="true">
<ResourceAttributes/>
<LockInfo/>
</ResourceInfo>
<ResourceInfo Name="GenericResource 1234/Port 1" FolderFullPath="Temp Automation Resources" Address="1" FullAddress="192.168.1.20/1" RootAddress="192.168.1.20" ResourceFamilyName="Generic Port" ResourceModelName="Generic Port Model" Alias="Port 1" Locked="false" Excluded="false" WillBeLocked="true">
<ResourceAttributes/>
<LockInfo/>
<Connections FullPath="Temp Automation Resources/L1 Switch 1234/Blade 1/Port 1"/>
</ResourceInfo>
</Resources>
<AbstractResources/>
<Routes>
<Route Source="GenericResource 1234/Port 1" Target="Router 1234/Port 1" RouteType="bi" Shared="true">
<Segments>
<Segment Source="GenericResource 1234/Port 1" Target="Router 1234/Port 1"/>
</Segments>
</Route>
<Route Source="Router 1234/Port 1" Target="GenericResource 1234/Port 2" RouteType="uni" Shared="true">
<Segments>
<Segment Source="Router 1234/Port 1" Target="GenericResource 1234/Port 2"/>
</Segments>
</Route>
</Routes>
<Instructions>
Topology instructions.
</Instructions>
<Driver>
ExampleTopologyDriver
</Driver>
<GlobalInputs ParamName="Some global input"></GlobalInputs>
<RequirementsInputs ParamName="Model" ResourceName="test*" InputType="Models">
<PossibleValues>Test Model</PossibleValues>
</RequirementsInputs>
<RequirementsInputs ParamName="Speed" ResourceName="test*" InputType="Attributes">
<PossibleValues>10 Mbps</PossibleValues>
<PossibleValues>100 Mbps</PossibleValues>
<PossibleValues>1 Gbps</PossibleValues>
<PossibleValues>10 Gbps</PossibleValues>
</<RequirementsInputs>
<AdditionalInfoInputs ParamName="Test" ResourceName="test*"></AdditionalInfoInputs>
<Connectors>
<Connector Alias="connector1" Type="Default" ResourceMappingType="bi" Source="b6/p7" Target="b7/p5">
<Attributes>
<Attribute Name="Numeric" Value="2">
</Attributes>
</Connector>
<Connector Alias="vc444" Type="Default" ResourceMappingType="bi" Source="b6/p6" Target="b7/p4">
<Attributes>
<Attribute Name="Protocol" Value="Transparent">
</Attributes>
</Connector>
</Connectors>
<ParentTopology Name="Template01">
<Type>Build</Type>
<State>Ready</State>
</ParentTopology>
<PermittedEditors>
<string>John Doe<string>
<string>Smith Wilson<string>
<string>Archie Goldman<string>
</PermittedEditors>
<Services>
<Service ServiceName="service1 Instance" Alias="Sql Server">
<Attributes>
<Attribute Name="Numeric" Value="2">
</Attributes>
</Service>
</Services>
<Apps>
<App Name="App2222">
<LogicalResource Family="Generic App Family" Model="Generic App Model" Description="">
<Attributes>
<Attribute Name="Access Mode" Value="565"></Attribute>
</Attributes>
</LogicalResource>
<DeploymentPaths>
<DeploymentPath IsDefault="true">
<DeploymentService Name="vCenter VM From Template" Model="vCenter VM From Template" Driver="Deploy From Template Driver">
<Attributes>
<Attribute Name="Access Mode" Value=""></Attribute>
<Attribute Name="vCenter Name" Value="VMWare vCenter"></Attribute>
<Attribute Name="vCenter Template" Value=""></Attribute>
</Attributes>
</DeploymentService>
</DeploymentPath>
</DeploymentPaths>
</App>
</App>
</Apps>
<MaxDuration>02:00:00</MaxDuration>
</ResponseInfo>
GetResourcesLabelsInTopologyGet resources associated with labels in topology.
Syntax
GetResourcesLabelsInTopology(topologyName, out resultXml);
Parameters
Type | Name | Description |
---|---|---|
string | topologyName | Specify the topology name. |
out string | resultXml | Specify the variable for the XML output. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
string resultXml;
testShellAPI.GetResourcesLabelsInTopology(topo1, out resultXml);
Output
<ResponseInfo xsi:type="GetResourcesLabelsInTopologyResponseInfo">
<Resources>
<Resource Name="res" Type="Resource" LabelName="label1">
</Resource>
<Resources>
<Resource Name="res2" Type="Abstract Resource" LabelName="label2">
</Resource>
<Resources>
<Resource Name="service1" Type="Service" LabelName="label3">
</Resource>
<Resources>
<Resource Name="app1" Type="App" LabelName="label4">
</Resource>
</Resources>
</ResponseInfo>
GetTopologiesByCategoryRetrieves the full path of all topologies.
Syntax
GetTopologiesByCategory(categoryName, categoryValue, out categoriesFullPath, out resultXml);
Parameters
Type | Name | Description |
---|---|---|
string | categoryName | Specify the category's name, If category name is not provided will return all topologies in domain. |
string | categoryValue | Specify the category's value/sub category |
out string | topologiesFullPath | Specify full topology path for each topology that contains given category |
out string | resultXml | Specify the variable for the XML output. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
testShellAPI.GetTopologiesByCategory("lookUpCategory","bonjour");
Output
{{"dir1/myTopology","Root\otherTopology"}}
<ResponseInfo>
<Topologies>
<FullPath>
Root\otherTopology
</FullPath>
<FullPath>
dir1/myTopology
</FullPath>
</Topologies>
</ResponseInfo>
GetTopologyCategoriesRetrieves all topology categories.
Syntax
GetTopologyCategories(out categories, out resultXml);
Parameters
Type | Name | Description |
---|---|---|
out string[] | categories | List of categories. |
out string | resultXml | Specify the variable for the XML output. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
testShellAPI.GetTopologyCategories();
Output
{{"category1","otherCategory","lookUpCategory"}}
<ResponseInfo>
<Categories>
<Name>
category1
</Name>
<Name>
otherCategory
</Name>
<Name>
lookUpCategory
</Name>
</Name>
</ResponseInfo>
GetCategoriesRetrieves all the logged in user's root categories and sub categories
Syntax
GetCategories(type, out resultXml);
Parameters
Type | Name | Description |
---|---|---|
string | type | Specify the categoriy type: Services, Environment or empty for both. |
out string | resultXml | Specify the variable for the XML output. If a variable is not provided, the results will be sent to stdout. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
testShellAPI.GetCategories("");
Output
<ResponseInfo xsi:type="CategoryListBriefInfo">
<Categories>
<Category Name="root1/bpc1" Description="blueprint category" Type="blueprint"/>
<Category Name="root2/svcc1" Description="service category" Type="service"/>
</Categories>
</ResponseInfo>
GetUserDetailsRetrieve a user's settings.
Syntax
GetUserDetails(username,out userDetails,out resultXml);
Parameters
Type | Name | Description |
---|---|---|
string | username | Specify the name of the user. |
out string[,] | userDetails | User settings for the specified user. |
out string | resultXml | Specify the variable for the XML output. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
testShellAPI.GetUserDetails("User1234");
Output
{{"Name","Email","IsAdmin","IsActive","IsDomainAdmin","DomainName},{"User1234","user1234@work.com","True","True","False",""}}
<ResponseInfo Name="User1234" IsAdmin="false" IsActive="true" IsDomainAdmin="false" Email="user1234@work.com">
<Groups>
<Group Name="Everyone">
<TestShellDomains/>
</Group>
</Groups>
</ResponseInfo>
Exceptions
- UserValidation
- General
GetAbstractTemplateListRetrieve a list of abstract templates.
Syntax
GetAbstractTemplateList(out abstractTemplates,out resultXml);
Parameters
Type | Name | Description |
---|---|---|
out string[,] | abstractTemplates | Abstract templates details. |
out string | resultXml | Specify the variable for the XML output. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
string[,] abstractTemplates;
string resultXml;
testShellAPI.GetAbstractTemplateList(out abstractTemplates, out resultXml);
GetServicesRetrieve a list of services and their attributes.
Syntax
GetServices(categoryName,serviceName,out services,out serviceAttributes,out resultXml);
Parameters
Type | Name | Description |
---|---|---|
string | categoryName | The name of the category of the services you want to receive. |
string | serviceName | The name of the service you want to receive. |
out string[,] | services | Matrix of services. |
out string[,] | serviceAttributes | Matrix of attributes of the services. |
out string | resultXml | Specify the variable for the XML output. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
string[,] services;
string[,] serviceAttributes;
string resultXml;
testShellAPI.GetServices("CategoryName", "ServiceName", out services, out serviceAttributes, out resultXml);
GetReservationServicesPositionsGet service positions in a reservation.
Syntax
GetReservationServicesPositions(reservationId,out layout,out resultXml);
Parameters
Type | Name | Description |
---|---|---|
string | reservationId | Specify the string that represents the reservation’s unique identifier. |
out string[,] | layout | All the services and their positions in the diagram. |
out string | resultXml | Specify the variable for the XML output. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
string reservationId = "af626b88-458b-4e7a-9054-c03d8cffa260";
string[,] layout;
string resultXml;
testShellAPI.GetReservationServicesPositions(reservationId, out layout, out resultXml);
Output
<ResponseInfo>
<layout/>
</ResponseInfo>
IncludeResourceInclude a resource.
Syntax
IncludeResource(resourceFullPath);
Parameters
Type | Name | Description |
---|---|---|
string | resourceFullPath | Specify the resource name. You can also include the full path from the root to the resource before the resource name, separated by slashes. For example: FolderName/RouterA/Port1. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
testShellAPI.IncludeResource("L1 Switch 1234");
IncludeResourcesIncludes the specified resources.
Syntax
IncludeResources(resourcesFullPath);
Parameters
Type | Name | Description |
---|---|---|
string[] | resourcesFullPath | Specify a list of resource names. You can also include the full path from the root to the resource before the resource name, separated by slashes. For example: FolderName/ResourceName |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
testShellAPI.IncludeResources(new[] {"L1 Switch 1234"});
LockResourceLock a resource.
Syntax
LockResource(reservationId,resourceFullPath);
Parameters
Type | Name | Description |
---|---|---|
string | reservationId | Specify the string that represents the reservation’s unique identifier. |
string | resourceFullPath | Specify the resource name. You can also include the full path from the root to the resource before the resource name, separated by slashes. For example: FolderName/RouterA/Port1. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
string reservationId = "28cb2a71-c8fc-4f41-a22b-e65685ebed14";
testShellAPI.LockResource(reservationId, "GenericResource 1234/Port 1");
LockResourcesLock multiple resources.
Syntax
LockResources(reservationId,resourcesFullPath);
Parameters
Type | Name | Description |
---|---|---|
string | reservationId | Specify the string that represents the reservation’s unique identifier. |
string[] | resourcesFullPath | Specify a list of resource names. You can also include the full path from the root to the resource before the resource name, separated by slashes. For example: FolderName/ResourceName |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
string reservationId = "28cb2a71-c8fc-4f41-a22b-e65685ebed14";
testShellAPI.LockResources(reservationId,new string[]{"GenericResource 1234/Port 1" "GenericResource 1234/Port 2"});
LogoffLogoff from resource manager service.
Syntax
Logoff();
Parameters
Type | Name | Description |
---|
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
testShellAPI.Logoff();
LogonLog in to the TestShell service.
Syntax
Logon(username,password,domainName);
Parameters
Type | Name | Description |
---|---|---|
string | username | Username to logon with. |
string | password | Specify the user’s login password. |
string | domainName | Specify the name of the domain. If no domain is specified, it logs the user in to the global (default) domain. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
testShellAPI.Logon("admin","admin","Global");
LogoutTNSessionLogout from a console port TN session.
Syntax
LogoutTNSession(reservationId,resourceFullPath,consolePortsFullPath,baudRate,out output,out resultXml);
Parameters
Type | Name | Description |
---|---|---|
string | reservationId | Specify the string that represents the reservation’s unique identifier. |
string | resourceFullPath | Specify the resource name. You can also include the full path from the root to the resource before the resource name, separated by slashes. For example: FolderName/RouterA/Port1. |
string[] | consolePortsFullPath | Specify a list of console ports according to their location in the Resource Explorer. Include the full path from the root to each console port, separated by slashes. For example: Console/Ports/PortName. |
BaudRate | baudRate | Specify the baud rate to apply to the ports. |
out string | output | The command results. |
out string | resultXml | Specify the variable for the XML output. |
Example
TestShellAPI testShellAPI = new TestShellAPI();
string output;
string resultXml;
string reservationId = "28cb2a71-c8fc-4f41-a22b-e65685ebed14";
testShellAPI.LogoutTNSession(reservationId,"GenericResource 1234",new string[]{"GenericResource 1234/ConsolePort 21"},BaudRate.Baud9600,out output,out resultXml);
Output
<ResponseInfo Output=""/>
MapPortsMap ports on a L1 switch.
Syntax
MapPorts(sourcePort,destinationPort,mappingType);
Parameters
Type | Name | Description |
---|---|---|
string | sourcePort | Specify the source port. |
string | destinationPort | Specify the destination port. |
MappingType | mappingType | Specify bidirectional or unidirectional as the mapping type. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
testShellAPI.MapPorts("L1 Switch 1234/Blade 1/Port 1","L1 Switch 1234/Blade 1/Port 3",MappingType.Bidirectional);
PowerCycleResourceCycle power for resource power ports.
Syntax
PowerCycleResource(reservationId,resourceFullPath,powerPortsFullPath,delay,out output,out resultXml);
Parameters
Type | Name | Description |
---|---|---|
string | reservationId | Specify the reservation’s unique identifier. Admin users may leave this parameter blank to perform power operations on excluded resources. |
string | resourceFullPath | Specify the resource name. You can also include the full path from the root to the resource before the resource name, separated by slashes. For example: FolderName/RouterA/Port1. |
string[] | powerPortsFullPath | Specify the list of power ports to use in this operation. Include the full path from the root resource to each power port, separated by slashes. For example: Switch20/Blade5/PowerPort1. Leave blank to perform the power operation on all of the specified resource’s power ports. |
double | delay | Specify the number of seconds to delay between each power cycle. |
out string | output | The power cycle results. |
out string | resultXml | Specify the variable for the XML output. |
Example
TestShellAPI testShellAPI = new TestShellAPI();
string output;
string resultXml;
string reservationId = "28cb2a71-c8fc-4f41-a22b-e65685ebed14";
testShellAPI.PowerCycleResource(reservationId,"GenericResource 1234",new string[]{"GenericResource 1234/PowerPort 11"},2,out output,out resultXml);
Output
<ResponseInfo Output=""/>
PowerOffResourcePower off resource power ports.
Syntax
PowerOffResource(reservationId,resourceFullPath,powerPortsFullPath,out output,out resultXml);
Parameters
Type | Name | Description |
---|---|---|
string | reservationId | Specify the reservation’s unique identifier. Admin users may leave this parameter blank to perform power operations on excluded resources. |
string | resourceFullPath | Specify the resource name. You can also include the full path from the root to the resource before the resource name, separated by slashes. For example: FolderName/RouterA/Port1. |
string[] | powerPortsFullPath | Specify the list of power ports to use in this operation. Include the full path from the root resource to each power port, separated by slashes. For example: Switch20/Blade5/PowerPort1. Leave blank to perform the power operation on all of the specified resource’s power ports. |
out string | output | The power off results. |
out string | resultXml | Specify the variable for the XML output. |
Example
TestShellAPI testShellAPI = new TestShellAPI();
string output;
string resultXml;
string reservationId = "28cb2a71-c8fc-4f41-a22b-e65685ebed14";
testShellAPI.PowerOffResource(reservationId,"GenericResource 1234",new string[]{"GenericResource 1234/PowerPort 11"},out output,out resultXml);
Output
<ResponseInfo Output=""/>
PowerOnResourcePower on resource power ports.
Syntax
PowerOnResource(reservationId,resourceFullPath,powerPortsFullPath,out output,out resultXml);
Parameters
Type | Name | Description |
---|---|---|
string | reservationId | Specify the reservation’s unique identifier. Admin users may leave this parameter blank to perform power operations on excluded resources. |
string | resourceFullPath | Specify the resource name. You can also include the full path from the root to the resource before the resource name, separated by slashes. For example: FolderName/RouterA/Port1. |
string[] | powerPortsFullPath | Specify the list of power ports to use in this operation. Include the full path from the root resource to each power port, separated by slashes. For example: Switch20/Blade5/PowerPort1. Leave blank to perform the power operation on all of the specified resource’s power ports. |
out string | output | The power on results. |
out string | resultXml | Specify the variable for the XML output. |
Example
TestShellAPI testShellAPI = new TestShellAPI();
string output;
string resultXml;
string reservationId = "28cb2a71-c8fc-4f41-a22b-e65685ebed14";
testShellAPI.PowerOnResource(reservationId,"GenericResource 1234",new string[]{"GenericResource 1234/PowerPort 11"},out output,out resultXml);
Output
<ResponseInfo Output=""/>
RecheckConflictsView which resources are available for a reservation.
Syntax
RecheckConflicts(reservationId);
Parameters
Type | Name | Description |
---|---|---|
string | reservationId | Specify the string that represents the reservation’s unique identifier. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
string reservationId = "af626b88-458b-4e7a-9054-c03d8cffa260";
testShellAPI.RecheckConflicts(reservationId);
ReleaseResourcesFromReservationRelease occupied testing resources.
Syntax
ReleaseResourcesFromReservation(reservationId,resourcesFullPath);
Parameters
Type | Name | Description |
---|---|---|
string | reservationId | Specify the string that represents the reservation’s unique identifier. |
string[] | resourcesFullPath | Specify the resource name. You can also include the full path from the root to the resource before the resource name, separated by slashes. For example: FolderName/RouterA/Port1. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
string resultXml;
string reservationId = "28cb2a71-c8fc-4f41-a22b-e65685ebed14";
testShellAPI.ReleaseResourcesFromReservation(reservationId, new string[]{"GenericResource 1234","Router 1234/Port 1"});
ReleaseTopologyResourcesRelease resources used in topology.
Syntax
ReleaseTopologyResources(reservationId, topologyFullPath);
Parameters
Type | Name | Description |
---|---|---|
string | reservationId | Specify the string that represents the reservation’s unique identifier. |
string | topologyFullPath | 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. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
string reservationId = "28cb2a71-c8fc-4f41-a22b-e65685ebed14";
testShellAPI.ReleaseTopologyResources(reservationId, "Temp Automation Resources/TP1");
RemoveGroupsFromDomainRemove groups from a domain.
Syntax
RemoveGroupsFromDomain(domainName,groupNames);
Parameters
Type | Name | Description |
---|---|---|
string | domainName | Specify the name of the domain. |
string[] | groupNames | Specify an array of one or more groups. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
testShellAPI.RemoveGroupsFromDomain("Global", new string[] {"QA_Users"});
RemovePermittedUsersFromReservationRemove permitted users from a reservation.
Syntax
RemovePermittedUsersFromReservation(reservationId,usernames);
Parameters
Type | Name | Description |
---|---|---|
string | reservationId | Specify the string that represents the reservation’s unique identifier. |
string[] | usernames | List of permitted users to remove from the reservation. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
testShellAPI.RemovePermittedUsersFromReservation("2d2f7cde-20g3-4bac-80d2-e8cfhecef45b",new string[]{"name1","name2"});
RemoveResourcesFromDomainRemove resources from a domain.
Syntax
RemoveResourcesFromDomain(domainName,resourcesNames);
Parameters
Type | Name | Description |
---|---|---|
string | domainName | Specify the name of the domain. |
string[] | resourcesNames | Specify a list of resource names. You can also include the full path from the root to the resource before the resource name, separated by slashes. For example: FolderName/ResourceName |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
testShellAPI.RemoveResourcesFromDomain("Domain1", new string[]{"Router 1234","GenericResource 1234"});
RemoveResourcesFromReservationRemove resources from a reservation.
Syntax
RemoveResourcesFromReservation(reservationId,resourcesFullPath);
Parameters
Type | Name | Description |
---|---|---|
string | reservationId | Specify the string that represents the reservation’s unique identifier. |
string[] | resourcesFullPath | Specify a list of resource names. You can also include the full path from the root to the resource before the resource name, separated by slashes. For example: FolderName/ResourceName |
YesNoOptions | deleteDeployedApps | Specify false to block deletion of deployed apps when removing them from reservation - only applies to resources of that are deployed apps, when applied to other resources argument is ignored. Parameter is optional and can be left empty |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
string reservationId = "af626b88-458b-4e7a-9054-c03d8cffa260";
string resultXml;
testShellAPI.RemoveResourcesFromReservation(reservationId, new string[]{"Router 1234","GenericResource 1234"});
Output
<ResponseInfo>
<Conflicts/>
</ResponseInfo>
RemoveConnectorsFromReservationRemove connectors from a reservation.
Syntax
RemoveConnectorsFromReservation(reservationId,endpoints,out connectors,out resultXml);
Parameters
Type | Name | Description |
---|---|---|
string | reservationId | Specify the string that represents the reservation’s unique identifier. |
string[,] | endpoints | The list of removed endpoints. |
out string[,] | connectors | The list of removed connectors. |
out string | resultXml | Specify the variable for the XML output. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
string resultXml;
string reservationId = "28cb2a71-c8fc-4f41-a22b-e65685ebed14";
string[,] connectors;
testShellAPI.RemoveConnectorsFromReservation(reservationId,new string[]{"Router 1234/Port 1","Router 1234/Port 1"},new string[]{"GenericResource 1234/Port 1","GenericResource 1234/Port 2"},out connectors,out resultXml);
Output
{{"Index","Source","Target","Direction","Alias"},
{"1","Router 1234/Port 1","GenericResource 1234/Port 1","bi","a connector"},
{"2","Router 1234/Port 1","GenericResource 1234/Port 2","uni","uni connector"}}
<ResponseInfo>
<Connectors>
<Connector Alias="a connector" Type="Default" ResourceMappingType="bi" Source="Router 1234/Port 1" Target="GenericResource 1234/Port 1">
</Connector>
<Connector Alias="uni connector" Type="Default" ResourceMappingType="uni" Source="Router 1234/Port 1" Target="GenericResource 1234/Port 2">
</Connector>
</Connectors>
</ResponseInfo>
RemoveRoutesFromReservationRemove routes from a reservation.
Syntax
RemoveRoutesFromReservation(reservationId,endpoints,mappingType,out routes,out segments,out resultXml);
Parameters
Type | Name | Description |
---|---|---|
string | reservationId | Specify the string that represents the reservation’s unique identifier. |
string[,] | endpoints | The list of removed endpoints. |
MappingType | mappingType | Specify bidirectional or unidirectional as the mapping type. |
out string[,] | routes | The list of removed routes. |
out string[,] | segments | The list of removed segments. |
out string | resultXml | Specify the variable for the XML output. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
string resultXml;
string reservationId = "28cb2a71-c8fc-4f41-a22b-e65685ebed14";
string[,] routes,segments;
testShellAPI.RemoveRoutesFromReservation(reservationId,new string[]{"Router 1234/Port 1","Router 1234/Port 1"},new string[]{"GenericResource 1234/Port 1","GenericResource 1234/Port 2"},MappingType.Bidirectional,out routes,out segments,out resultXml);
Output
{{"Index","Source","Target","RouteType","Alias","Shared"},
{"1","Router 1234/Port 1","GenericResource 1234/Port 1","bi","a route","true"},
{"2","Router 1234/Port 1","GenericResource 1234/Port 2","uni","uni route","true"}}
{{"RouteIndex","Source","Target"},
{"1","Router 1234/Port 1","L1 Switch 1234/Blade 1/Port 3"},
{"1","L1 Switch 1234/Blade 1/Port 3","L1 Switch 1234/Blade 1/Port 1"},
{"1","L1 Switch 1234/Blade 1/Port 1","GenericResource 1234/Port 1"},
{"2","Router 1234/Port 1","L1 Switch 1234/Blade 1/Port 3"},
{"2","L1 Switch 1234/Blade 1/Port 3","L1 Switch 1234/Blade 1/Port 2"},
{"2","L1 Switch 1234/Blade 1/Port 2","GenericResource 1234/Port 2"}}
<ResponseInfo>
<Routes>
<Route Source="Router 1234/Port 1" Target="GenericResource 1234/Port 1" Alias="a route" RouteType="bi" Shared="true">
<Segments>
<Segment Source="Router 1234/Port 1" Target="L1 Switch 1234/Blade 1/Port 3"/>
<Segment Source="L1 Switch 1234/Blade 1/Port 3" Target="L1 Switch 1234/Blade 1/Port 1"/>
<Segment Source="L1 Switch 1234/Blade 1/Port 1" Target="GenericResource 1234/Port 1"/>
</Segments>
</Route>
<Route Source="Router 1234/Port 1" Target="GenericResource 1234/Port 2" Alias="uni route" RouteType="uni" Shared="true">
<Segments>
<Segment Source="Router 1234/Port 1" Target="L1 Switch 1234/Blade 1/Port 3"/>
<Segment Source="L1 Switch 1234/Blade 1/Port 3" Target="L1 Switch 1234/Blade 1/Port 2"/>
<Segment Source="L1 Switch 1234/Blade 1/Port 2" Target="GenericResource 1234/Port 2"/>
</Segments>
</Route>
</Routes>
</ResponseInfo>
RemoveTopologiesFromDomainRemoves a list of one or more topologies from a domain.
Syntax
RemoveTopologiesFromDomain(domainName,topologyNames);
Parameters
Type | Name | Description |
---|---|---|
string | domainName | Specify the name of the domain. |
string[] | topologyNames | Specify a list of topology names. Include the full path from the root to the topology, separated by slashes. For example: FolderName/Topologies/TopologyName. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
testShellAPI.RemoveTopologiesFromDomain("Domain1", new string[] { "Topology1" });
RemoveUsersFromGroupRemove users from a group.
Syntax
RemoveUsersFromGroup(usernames,groupName);
Parameters
Type | Name | Description |
---|---|---|
string[] | usernames | Specify an array of one or more users. |
string | groupName | Specify the name of the group. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
testShellAPI.RemoveUsersFromGroup(new string[] { "User1234", "User2345" }, "QA_Users");
RemoveTopologyCategoryRemoves a category from given topology.
Syntax
RemoveTopologyCategory(topologyFullPath, categoryName);
Parameters
Type | Name | Description |
---|---|---|
string | topologyFullPath | Specify the topology (name or full path), from which to remove the category. For full path, specify the full path from the root to the topology, separated by slashes. For example: FolderName/Topologies/TopologyName. |
string | categoryName | Specify the category's name which we want to remove. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
testShellAPI.RemoveTopologyCategory("myDir/myTopology","lookUpCategory");
MoveResourcesMove multiple resources.
Syntax
MoveResources(resourcesName,targetFolder);
Parameters
Type | Name | Description |
---|---|---|
string[] | resourcesName | Specify the name of the root resources to move to the new target folder. |
string | targetFolder | The path of the target folder. |
out string | resultXml | Specify the variable for the XML output. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
string[] resources = new string[]{"Bridge1","Bridge2"};
testShellAPI.MoveResources(resources, "MyBridges");
RenameResourceRename a resource.
Syntax
RenameResource(resourceFullPath,resourceName);
Parameters
Type | Name | Description |
---|---|---|
string | resourceFullPath | Specify the resource name. You can also include the full path from the root to the resource before the resource name, separated by slashes. For example: FolderName/RouterA/Port1. |
string | resourceName | Specify a new resource name. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
testShellAPI.RenameResource("Router 1234","Router 4321");
ResetResourceDriverReset a resource driver and cancel its commands.
Syntax
ResetResourceDriver(reservationId,resourceFullPath,out output,out resultXml);
Parameters
Type | Name | Description |
---|---|---|
string | reservationId | Specify the string that represents the reservation’s unique identifier. |
string | resourceFullPath | Specify the resource name. You can also include the full path from the root to the resource before the resource name, separated by slashes. For example: FolderName/RouterA/Port1. |
out string | output | The command results. |
out string | resultXml | Specify the variable for the XML output. |
Example
TestShellAPI testShellAPI = new TestShellAPI();
string output;
string resultXml;
string reservationId = "af626b88-458b-4e7a-9054-c03d8cffa260";
testShellAPI.ResetResourceDriver(reservationId, "Router 1234", out output, out resultXml);
Output
Reset completed
<ResponseInfo Output="Reset completed"/>
RemoveAppFromReservationRemove app resource from existing reservation.
Syntax
RemoveAppFromReservation(reservationId,appName);
Parameters
Type | Name | Description |
---|---|---|
string | reservationId | Specify the string that represents the reservation’s unique identifier. |
string | appName | Specify the name of the App. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
string reservationId;
string appName;
testShellAPI.RemoveAppFromReservation(reservationId, appName);
GetAppsDetailsInReservationRetrieves information on Apps in the reservation.
Syntax
GetAppsDetailsInReservation(reservationId,appNames,out resultXml);
Parameters
Type | Name | Description |
---|---|---|
string | reservationId | Specify the string that represents the reservation’s unique identifier. |
string[] | appNames | Specify the name of the Apps. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
string reservationId;
string appNames;
string resultXml;
testShellAPI.GetAppsDetailsInReservation(reservationId, appNames, out resultXml);
RemoveServicesFromReservationRemove services and apps from existing reservation.
Syntax
RemoveServicesFromReservation(reservationId,services);
Parameters
Type | Name | Description |
---|---|---|
string | reservationId | Specify the string that represents the reservation’s unique identifier. |
string[] | services | List of aliases. This list should contain the aliases for both the services and apps that should be removed. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
string[,] services;
testShellAPI.RemoveServicesFromReservation("b8ed1fb9-7903-40de-b5b4-f6cba31f6fa0", services);
SaveReservationAsTopologyCreate a topology from an existing active reservation.
Syntax
SaveReservationAsTopology(reservationId,folderFullPath,topologyName,includeInactiveRoutes,out resultXml);
Parameters
Type | Name | Description |
---|---|---|
string | reservationId | Specify the string that represents the reservation’s unique identifier. |
string | folderFullPath | Full container folder path where the new topology will be saved. leaving the folder path empty will try saving the topology under the root. For example: FolderName/FolderNameA. |
string | topologyName | Specify the new name for the new topology. |
YesNoOptions | includeInactiveRoutes | Include disconnected routes in the created topology |
out string | resultXml | Specify the variable for the XML output. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
string reservationId = "af626b88-458b-4e7a-9054-c03d8cffa260";
testShellAPI.SaveReservationAsTopology(reservationId,"Temp Automation Resources","TP1",YesNoOptions.Yes,out resultXml);
Output
<ResponseInfo Name="TP1">
<Resources>
<ResourceInfo Name="Router 1234/Port 1" FolderFullPath="Lab Routers" Address="1" FullAddress="192.168.1.201/1" RootAddress="192.168.1.201" ResourceFamilyName="Generic Port" ResourceModelName="Generic Port Model" Alias="Port 1" Locked="true" Excluded="false" WillBeLocked="true">
<ResourceAttributes/>
<LockInfo ReservationName="Immediate reservation" MachineName="PRODUCT-W7 - Studio" Username="admin" Created="2012-06-20T17:20:37"/>
<Connections FullPath="Temp Automation Resources/L1 Switch 1234/Blade 1/Port 3"/>
</ResourceInfo>
<ResourceInfo Name="GenericResource 1234/Port 1" FolderFullPath="Temp Automation Resources" Address="1" FullAddress="192.168.1.20/1" RootAddress="192.168.1.20" ResourceFamilyName="Generic Port" ResourceModelName="Generic Port Model" Alias="Port 1" Locked="true" Excluded="false" WillBeLocked="true">
<ResourceAttributes/>
<LockInfo ReservationName="Immediate reservation" MachineName="PRODUCT-W7 - Studio" Username="admin" Created="2012-06-20T17:20:37"/>
<Connections FullPath="Temp Automation Resources/L1 Switch 1234/Blade 1/Port 1"/>
</ResourceInfo>
<ResourceInfo Name="GenericResource 1234/Port 2" FolderFullPath="Temp Automation Resources" Address="2" FullAddress="192.168.1.20/2" RootAddress="192.168.1.20" ResourceFamilyName="Generic Port" ResourceModelName="Generic Port Model" Alias="Port 2" Locked="true" Excluded="false" WillBeLocked="true">
<ResourceAttributes/>
<LockInfo ReservationName="Immediate reservation" MachineName="PRODUCT-W7 - Tcl" Username="admin" Created="2012-06-20T17:20:37"/>
<Connections FullPath="Temp Automation Resources/L1 Switch 1234/Blade 1/Port 2"/>
</ResourceInfo>
<ResourceInfo Name="GenericResource 1234/PowerPort 11" FolderFullPath="Temp Automation Resources" Address="11" FullAddress="192.168.1.20/11" RootAddress="192.168.1.20" ResourceFamilyName="Generic Port" ResourceModelName="Generic Port Model" Alias="PowerPort 11" Locked="false" Excluded="false" WillBeLocked="true">
<ResourceAttributes/>
<LockInfo/>
<Connections FullPath="Temp Automation Resources/SmartPower2L 1234/PowerPort 1"/>
</ResourceInfo>
<ResourceInfo Name="GenericResource 1234/PowerPort 12" FolderFullPath="Temp Automation Resources" Address="12" FullAddress="192.168.1.20/12" RootAddress="192.168.1.20" ResourceFamilyName="Generic Port" ResourceModelName="Generic Port Model" Alias="PowerPort 12" Locked="false" Excluded="false" WillBeLocked="true">
<ResourceAttributes/>
<LockInfo/>
<Connections FullPath="Temp Automation Resources/SmartPower2L 1234/PowerPort 2"/>
</ResourceInfo>
<ResourceInfo Name="GenericResource 1234/ConsolePort 21" FolderFullPath="Temp Automation Resources" Address="21" FullAddress="192.168.1.20/21" RootAddress="192.168.1.20" ResourceFamilyName="Generic Port" ResourceModelName="Generic Port Model" Alias="ConsolePort 21" Locked="false" Excluded="false" WillBeLocked="true">
<ResourceAttributes/>
<LockInfo/>
<Connections FullPath="Temp Automation Resources/ConsoleServer 1234/ConsolePort 1"/>
</ResourceInfo>
<ResourceInfo Name="GenericResource 1234" FolderFullPath="Temp Automation Resources" Address="192.168.1.20" FullAddress="192.168.1.20" RootAddress="192.168.1.20" ResourceFamilyName="Generic Resource" ResourceModelName="Generic Resource Model" Alias="GenericResource 1234" Locked="false" Excluded="false" WillBeLocked="true">
<ResourceAttributes/>
<LockInfo/>
</ResourceInfo>
<ResourceInfo Name="Router 1234" FolderFullPath="Lab Routers" Address="192.168.1.201" FullAddress="192.168.1.201" RootAddress="192.168.1.201" ResourceFamilyName="Generic Chassis" ResourceModelName="Generic Chassis Model" Alias="Router 1234" Locked="false" Excluded="false" WillBeLocked="false">
<ResourceAttributes>
<ResourceAttribute Name="SW_Version" Value="" Type="String"/>
</ResourceAttributes>
<LockInfo/>
</ResourceInfo>
</Resources>
<AbstractResources/>
<Routes>
<Route Source="GenericResource 1234/Port 1" Target="Router 1234/Port 1" RouteType="bi" Shared="true">
<Segments>
<Segment Source="GenericResource 1234/Port 1" Target="Router 1234/Port 1"/>
</Segments>
</Route>
<Route Source="Router 1234/Port 1" Target="GenericResource 1234/Port 2" RouteType="uni" Shared="true">
<Segments>
<Segment Source="Router 1234/Port 1" Target="GenericResource 1234/Port 2"/>
</Segments>
</Route>
</Routes>
</ResponseInfo>
SecureLogonLog in to the TestShell service using the AuthToken.
Syntax
SecureLogon(token,domainName);
Parameters
Type | Name | Description |
---|---|---|
string | token | Token to logon with. |
string | domainName | Specify the name of the domain. If no domain is specified, it logs the user in to the global (default) domain. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
testShellAPI.SecureLogon("xoV3libZzEG/ii7ZQqAuqw==","Global");
SetAttributeValueSet an attribute value.
Syntax
SetAttributeValue(resourceFullPath,attributeName,attributeValue);
Parameters
Type | Name | Description |
---|---|---|
string | resourceFullPath | Specify the resource name. You can also include the full path from the root to the resource before the resource name, separated by slashes. For example: FolderName/RouterA/Port1. |
string | attributeName | Specify the attribute name. |
string | attributeValue | Specify the attribute’s value. |
Example
TestShellAPI testShellAPI = new TestShellAPI();
testShellAPI.SetAttributeValue("Router 1234", "SW_Version", "1.3");
SetAttributesValuesSets new attribute values for the specified resources.
Syntax
SetAttributesValues(resourcesAttributesUpdateRequests);
Parameters
Type | Name | Description |
---|---|---|
string[,] | resourcesAttributesUpdateRequests | Specify a list of resources, attribute names, and new attribute values (up to 10000 rows). For example: {['ResourceFullName', 'AttributeName','AttributeValue';'ResourceFullName2', 'AttributeName2','AttributeValue2']}. |
Example
TestShellAPI testShellAPI = new TestShellAPI();
testShellAPI.SetAttributesValues(new string[,] {{"resource","attribute","value"}});
SetBaudRateSet console port baud rate.
Syntax
SetBaudRate(reservationId,resourceFullPath,consolePortsFullPath,baudRate,out output,out resultXml);
Parameters
Type | Name | Description |
---|---|---|
string | reservationId | Specify the string that represents the reservation’s unique identifier. |
string | resourceFullPath | Specify the resource name. You can also include the full path from the root to the resource before the resource name, separated by slashes. For example: FolderName/RouterA/Port1. |
string[] | consolePortsFullPath | Specify a list of console ports according to their location in the Resource Explorer. Include the full path from the root to each console port, separated by slashes. For example: Console/Ports/PortName. |
BaudRate | baudRate | Specify the baud rate to apply to the ports. |
out string | output | The command results. |
out string | resultXml | Specify the variable for the XML output. |
Example
TestShellAPI testShellAPI = new TestShellAPI();
string output;
string resultXml;
string reservationId = "28cb2a71-c8fc-4f41-a22b-e65685ebed14";
testShellAPI.SetBaudRate(reservationId,"GenericResource 1234",new string[]{"GenericResource 1234/ConsolePort 21"},BaudRate.Baud9600,out output,out resultXml);
Output
<ResponseInfo Output=""/>
SetConsoleForXModemSet a console for Xmodem.
Syntax
SetConsoleForXModem(reservationId,resourceFullPath,consolePortsFullPath,baudRate,out output,out resultXml);
Parameters
Type | Name | Description |
---|---|---|
string | reservationId | Specify the string that represents the reservation’s unique identifier. |
string | resourceFullPath | Specify the resource name. You can also include the full path from the root to the resource before the resource name, separated by slashes. For example: FolderName/RouterA/Port1. |
string[] | consolePortsFullPath | Specify a list of console ports according to their location in the Resource Explorer. Include the full path from the root to each console port, separated by slashes. For example: Console/Ports/PortName. |
BaudRate | baudRate | Specify the baud rate to apply to the ports. |
out string | output | The command results. |
out string | resultXml | Specify the variable for the XML output. |
Example
TestShellAPI testShellAPI = new TestShellAPI();
string output;
string resultXml;
string reservationId = "28cb2a71-c8fc-4f41-a22b-e65685ebed14";
testShellAPI.SetConsoleForXModem(reservationId,"GenericResource 1234",new string[]{"GenericResource 1234/ConsolePort 21"},BaudRate.Baud9600,out output,out resultXml);
Output
<ResponseInfo Output=""/>
SetResourceLiveStatusSets the live status of a resource.
Syntax
SetResourceLiveStatus(resourceFullPath,liveStatusName,additionalInfo,out resultXml);
Parameters
Type | Name | Description |
---|---|---|
string | resourceFullName | Specify the resource name. You can also include the full path from the root to the resource before the resource name, separated by slashes. For example: FolderName/RouterA. |
string | liveStatusName | Resource live status name |
string | additionalInfo | Resource live status additional info |
out string | resultXml | Resource live status additional info |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
string resultXml;
testShellAPI.SetResourceLiveStatus("myResourceName", "Online" , "Resource was responding to pings at 12/12/2013 10:35 AM" , out resultXml );
Output
<ResponseInfo type="ResourceLiveStatusInfo" liveStatusName="name1" liveStatusDescription="description1"/>
</Response>
SetReservationLiveStatusSets the live status of the reservation.
Syntax
SetReservationLiveStatus(reservationId, liveStatusName, additionalInfo);
Parameters
Type | Name | Description |
---|---|---|
string | reservationId | Specifies the string that represents the reservation’s unique identifier. |
string | liveStatusName | Reservation live status name |
string | additionalInfo | Reservation live status additional info |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
testShellAPI.SetReservationLiveStatus("344c2d21-578c-4653-a826-54c2035ff998", "Pass" , "Reservation was responding to pings at 12/12/2013 10:35 AM");
SetResourceSharedStateSet the resource sharing state.
Syntax
SetResourceSharedState(reservationId,resourcesFullName,isShared);
Parameters
Type | Name | Description |
---|---|---|
string | reservationId | Specify the string that represents the reservation’s unique identifier. |
string[] | resourcesFullName | Specify a list of resource names. You can also include the full path from the root to the resource before the resource name, separated by slashes. For example: FolderName/ResourceName |
YesNoOptions | isShared | Specify whether to allow sharing of the resource. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
string reservationId = "af626b88-458b-4e7a-9054-c03d8cffa260";
string resultXml;
testShellAPI.SetResourceSharedState(reservationId,new string[]{"Router 1234"},YesNoOptions.Yes);
SetRouteAttributesSet a route's attributes.
Syntax
SetRouteAttributes(reservationId,sourceResourceFullPath,targetResourceFullPath,applyChangesTo,attributeRequests);
Parameters
Type | Name | Description |
---|---|---|
string | reservationId | Specify the string that represents the reservation’s unique identifier. |
string | sourceResourceFullPath | Specify the resource name. You can also include the full path from the root to the resource before the resource name, separated by slashes. For example: FolderName/RouterA/Port1. |
string | targetResourceFullPath | Specify the resource name. You can also include the full path from the root to the resource before the resource name, separated by slashes. For example: FolderName/RouterA/Port1. |
RouteAttributesChangeTarget | applyChangesTo | Specify on which resources to apply the attribute changes: Source/Target/All.Source refers to the resource connected to the source endpoint of the route. Target refers to the resource connected to the target endpoint of the route. All encompasses all route resources. |
string[] | attributeRequests | Specify an array of attributes and associated attribute values. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
string reservationId = "af626b88-458b-4e7a-9054-c03d8cffa260";
testShellAPI.SetRouteAttributes(reservationId,"Router 1234/Port 1","GenericResource 1234/Port 1",RouteAttributesChangeTarget.All,new string["SW_Version","1.3"]);
SetRouteAttributesViaAliasSet a route's attributes.
Syntax
SetRouteAttributesViaAlias(reservationId,routeAlias,applyChangesTo,attributeRequests);
Parameters
Type | Name | Description |
---|---|---|
string | reservationId | Specify the string that represents the reservation’s unique identifier. |
string | routeAlias | Specify the route’s alias. |
RouteAttributesChangeTarget | applyChangesTo | Specify on which resources to apply the attribute changes: Source/Target/All.Source refers to the resource connected to the source endpoint of the route. Target refers to the resource connected to the target endpoint of the route. All encompasses all route resources. |
string[] | attributeRequests | Specify an array of attributes and associated attribute values. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
string reservationId = "af626b88-458b-4e7a-9054-c03d8cffa260";
string resultXml;
testShellAPI.SetRouteAttributesViaAlias(reservationId,"route1",RouteAttributesChangeTarget.All,new string["SW_Version","1.3"]);
SetConnectorAttributesSet a connector's attributes.
Syntax
SetConnectorAttributes(reservationId,sourceResourceFullPath,targetResourceFullPath,attributeRequests);
Parameters
Type | Name | Description |
---|---|---|
string | reservationId | Specify the string that represents the reservation’s unique identifier. |
string | sourceResourceFullName | Specify the resource name. You can also include the full path from the root to the resource before the resource name, separated by slashes. For example: FolderName/RouterA/Port1. |
string | targetResourceFullName | Specify the resource name. You can also include the full path from the root to the resource before the resource name, separated by slashes. For example: FolderName/RouterA/Port1. |
string[,] | attributeRequests | Specify a matrix of attributes and associated attribute values. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
string reservationId = "af626b88-458b-4e7a-9054-c03d8cffa260";
testShellAPI.SetConnectorAttributes(reservationId,"Router 1234/Port 1","GenericResource 1234/Port 1", new string[,]{{"SW_Version","1.3"}});
SetConnectorAttributesViaAliasSet a connector's attributes.
Syntax
SetConnectorAttributesViaAlias(reservationId,connectorAlias,attributeRequests);
Parameters
Type | Name | Description |
---|---|---|
string | reservationId | Specify the string that represents the reservation’s unique identifier. |
string | connectorAlias | Specify the connector’s alias. |
string[,] | attributeRequests | Specify a matrix of attributes and associated attribute values. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
string reservationId = "af626b88-458b-4e7a-9054-c03d8cffa260";
string resultXml;
testShellAPI.SetConnectorAttributesViaAlias(reservationId,"connector1", new string[,]{{"SW_Version","1.3"}});
SetGroupDomainPermissionsSet the permission level of a group in domain.
Syntax
SetGroupDomainPermission(domainName,groupName,viewOnly);
Parameters
Type | Name | Description |
---|---|---|
string | domainName | Specify the name of the domain. |
string | groupName | Specify the group name. |
YesNoOptions | viewOnly | Specify if the group should be have view only permissions. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
testShellAPI.SetGroupDomainPermissions("Global", "RND_Users", YesNoOptions.Yes);
SetConnectorsInReservationReserve specified connectors.
Syntax
SetConnectorsInReservation(reservationId, connectors, out setConnectors);
Parameters
Type | Name | Description |
---|---|---|
string | reservationId | Specify the string that represents the reservation’s unique identifier. |
string[,] | connectors | List of connectors to set in the reservation. For example: {['SourceResourceFullPath', 'TargetResourceFullPath', 'Direction', 'Alias';]}. |
out string[,] | setConnectors | Visual connectors associated with the specified reservation. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
string resultXml;
string reservationId = "28cb2a71-c8fc-4f41-a22b-e65685ebed14";
string[,] connectors = {{"bridge1/port1", "bridge2/port1", "bi", "some alias"}};
string[,] setConnectors;
testShellAPI.SetConnectorsInReservation(reservationId, connectors, out setConnectors);
Output
{{"bridge1/port1", "bridge2/port1", "bi", "some alias"}}
SetTopologyCategorySets a category to a topology.
Syntax
SetTopologyCategory(topologyFullPath, categoryName, categoryValue);
Parameters
Type | Name | Description |
---|---|---|
string | topologyFullPath | Specify the topology (name or full path), to associate the category to. For full path, specify the full path from the root to the topology, separated by slashes. For example: FolderName/Topologies/TopologyName. |
string | categoryName | Specify the category's name which we want to set |
string | categoryValue | Specify the category's value |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
testShellAPI.SetTopologyCategory("dir1/myTopology","lookUpCategory","bonjour");
SyncResourceFromDeviceUpdate a resource with current device settings and mappings.
Syntax
SyncResourceFromDevice(resourceFullPath,out errorMessage,out resultXml);
Parameters
Type | Name | Description |
---|---|---|
string | resourceFullPath | Specify the resource name. You can also include the full path from the root to the resource before the resource name, separated by slashes. For example: FolderName/RouterA/Port1. |
out string | errorMessage | Returns any error messages from the resource synchronization. |
out string | resultXml | Specify the variable for the XML output. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
string resultXml, errorMessage;
testShellAPI.SyncResourceFromDevice("L1 Switch 1234",out errorMessage,out resultXml);
SyncResourceToDeviceUpdate device settings and mappings from the resource.
Syntax
SyncResourceToDevice(resourceFullPath,out errorMessage,out resultXml);
Parameters
Type | Name | Description |
---|---|---|
string | resourceFullPath | Specify the resource name. You can also include the full path from the root to the resource before the resource name, separated by slashes. For example: FolderName/RouterA/Port1. |
out string | errorMessage | Returns any error messages from the resource synchronization. |
out string | resultXml | Specify the variable for the XML output. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
string resultXml, errorMessage;
testShellAPI.SyncResourceToDevice("L1 Switch 1234",out errorMessage,out resultXml);
SetReservationResourcePositionSet resource position in a reservation.
Syntax
SetReservationResourcePosition(reservationId,resourceFullPath,x,y);
Parameters
Type | Name | Description |
---|---|---|
string | reservationId | Specify the string that represents the reservation’s unique identifier. |
string | resourceFullName | Specify the resource name. You can also include the full path from the root to the resource before the resource name, separated by slashes. For example: FolderName/ResourceName. |
double | x | Specify the x coordinate of the resource's top left corner. |
double | y | Specify the y coordinate of the resource's top left corner. |
out string | resultXml | Specify the variable for the XML output. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
string reservationId = "af626b88-458b-4e7a-9054-c03d8cffa260";
string resourceFullName = "bridge";
double x = 100, y = 100;
string resultXml;
testShellAPI.SetReservationResourcePosition(reservationId, resourceFullName, x, y, out resultXml);
Output
<ResponseInfo>
</ResponseInfo>
SetServiceDriverSets a service model driver.
Syntax
SetServiceDriver(serviceName,driverName);
Parameters
Type | Name | Description |
---|---|---|
string | serviceName | Specify the name of the service model. |
string | driverName | Specify the name of the driver. |
out string | resultXml | Specify the variable for the XML output. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
testShellAPI.SetServiceDriver("Example_service_model","NewDriver");
SetServiceLiveStatusSets the live status of a service.
Syntax
SetServiceLiveStatus(reservationId, serviceAlias, liveStatusName, additionalInfo);
Parameters
Type | Name | Description |
---|---|---|
string | reservationId | Specify the string that represents the reservation's unique identifier. |
string | serviceAlias | Specify the string that represents the service's alias. |
string | liveStatusName | Resource live status name |
string | additionalInfo | Resource live status additional info |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
testShellAPI.SetServiceLiveStatus("0e937c16-2865-4ad1-b843-aa7608282e56", "My Service", "Online" , "Resource was responding to pings at 12/12/2013 10:35 AM");
SetReservationServicePositionSet service position in a reservation.
Syntax
SetReservationServicePosition(reservationId,serviceAlias,x,y);
Parameters
Type | Name | Description |
---|---|---|
string | reservationId | Specify the string that represents the reservation’s unique identifier. |
string | serviceAlias | Specify the alias of the service. |
double | x | Specify the x coordinate of the resource's top left corner. |
double | y | Specify the y coordinate of the resource's top left corner. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
string reservationId = "af626b88-458b-4e7a-9054-c03d8cffa260";
string serviceAlias = "service";
double x = 100, y = 100;
testShellAPI.SetReservationServicePosition(reservationId, serviceAlias, x, y);
SetServiceAttributesValuesSet a resource's attributes.
Syntax
SetServiceAttributesValues(reservationId,serviceAlias,attributeRequests);
Parameters
Type | Name | Description |
---|---|---|
string | reservationId | Specify the string that represents the reservation’s unique identifier. |
string | serviceAlias | Specify the service name. |
string[,] | attributeRequests | Specify a matrix of attributes and associated attribute values. |
out string | resultXml | Specify the variable for the XML output. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
string reservationId = "af626b88-458b-4e7a-9054-c03d8cffa260";
testShellAPI.SetServiceAttributesValues(reservationId,"Service1", new string[,]{{"SW_Version","1.3"}});
TerminateReservationTerminate a reservation.
Syntax
TerminateReservation(reservationId);
Parameters
Type | Name | Description |
---|---|---|
string | reservationId | Specify the string that represents the reservation’s unique identifier. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
string reservationId = "af626b88-458b-4e7a-9054-c03d8cffa260";
testShellAPI.TerminateReservation(reservationId);
UnlockResourceUnlock a resource.
Syntax
UnlockResource(reservationId,resourceFullPath);
Parameters
Type | Name | Description |
---|---|---|
string | reservationId | Specify the string that represents the reservation’s unique identifier. |
string | resourceFullPath | Specify the resource name. You can also include the full path from the root to the resource before the resource name, separated by slashes. For example: FolderName/RouterA/Port1. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
string reservationId = "28cb2a71-c8fc-4f41-a22b-e65685ebed14";
testShellAPI.UnlockResource(reservationId,"GenericResource 1234/Port 1");
UnlockResourcesUnlock multiple resources.
Syntax
UnlockResources(reservationId,resourcesFullPath);
Parameters
Type | Name | Description |
---|---|---|
string | reservationId | Specify the string that represents the reservation’s unique identifier. |
string[] | resourcesFullPath | Specify a list of resource names. You can also include the full path from the root to the resource before the resource name, separated by slashes. For example: FolderName/ResourceName |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
string reservationId = "28cb2a71-c8fc-4f41-a22b-e65685ebed14";
testShellAPI.UnlockResources(new string[]{"GenericResource 1234/Port 1" "GenericResource 1234/Port 2"});
UnMapPortsRemove mapping for a pair of mapped ports.
Syntax
UnMapPorts(portA,portB);
Parameters
Type | Name | Description |
---|---|---|
string | portA | Specify the source port. (i.e. Folder1/Chassis1/Blade1/Port1). |
string | portB | Specify the destination port. (i.e. Folder1/Chassis1/Blade1/Port1). |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
testShellAPI.UnMapPorts("L1 Switch 1234/Blade 1/Port 1","L1 Switch 1234/Blade 1/Port 3");
UpdateConnectorAliasInReservationUpdate connector alias in reservation.
Syntax
UpdateConnectorAliasInReservation(reservationId,sourceResourceFullName,targetResourceFullName,direction,alias);
Parameters
Type | Name | Description |
---|---|---|
string | reservationId | Specify the string that represents the reservation’s unique identifier. |
string | sourceResourceFullName | Specify the resource name. You can also include the full path from the root to the resource before the resource name, separated by slashes. For example: FolderName/RouterA/Port1. |
string | targetResourceFullName | Specify the resource name. You can also include the full path from the root to the resource before the resource name, separated by slashes. For example: FolderName/RouterA/Port1. |
MappingType | direction | Specify bidirectional or unidirectional as the connector direction. |
string | alias | Specify the connector’s alias. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
testShellAPI.UpdateConnectorAliasInReservation("2623d08d-9d19-4b95-a8dc-d7cca5ea05fb","Router 1234/Port 1","GenericResource 1234/Port 1", MappingType.Bidirectional, "some alias");
UpdateConnectionWeightUpdate the connection weight between two resources.
Syntax
UpdateConnectionWeight(resourceAFullPath,resourceBFullPath,weight);
Parameters
Type | Name | Description |
---|---|---|
string | resourceAFullPath | Specify the resource name. You can also include the full path from the root to the resource before the resource name, separated by slashes. For example: FolderName/RouterA/Port1. |
string | resourceBFullPath | Specify the resource name. You can also include the full path from the root to the resource before the resource name, separated by slashes. For example: FolderName/RouterA/Port1. |
int | weight | Specify a number to represent the connection weight between the specified resources. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
testShellAPI.UpdateConnectionWeight("Router 1234/Port 1","L1 Switch 1234/Blade 1/Port 3", 5);
UpdateDomainTopologiesFolderUpdate the domain’s topologies folder.
Syntax
UpdateDomainTopologiesFolder(domainName,topologiesFolder);
Parameters
Type | Name | Description |
---|---|---|
string | domainName | Specify the name of the domain. |
string | topologiesFolder | Specify the topology name. Include the full path from the root to the topology, separated by slashes. For example: FolderName/Topologies/TopologyName. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
testShellAPI.UpdateDomainTopologiesFolder("Domain1","Domain Topologies");
UnarchiveDomainUn archive the domain
Syntax
UnarchiveDomain(domainName,out resultXml);
Parameters
Type | Name | Description |
---|---|---|
string | domainName | Specify the name of the domain. |
out string | resultXml | Specify the variable for the XML output. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
string resultXml;
testShellAPI.UnarchiveDomain("Domain1", out resultXml);
UpdateGroup
Syntax
UpdateGroup(groupName,newName,description,groupRole);
Parameters
Type | Name | Description |
---|---|---|
string | groupName | Specify the name of the group. |
string | newName | Specify the new group name. |
string | description | Provide a short description of the group. |
UpdateRoleOptions | groupRole | Specify the role of the group, possible values: External, Regular, DomainAdmin or Ignore (to keep the current role). |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
testShellAPI.UpdateGroup("QA_Users","QAUsers","QA users group",GroupRole.Regular);
UpdatePhysicalConnectionDefine the physical connection between two resources.
Syntax
UpdatePhysicalConnection(resourceAFullPath,resourceBFullPath,overrideExistingConnections);
Parameters
Type | Name | Description |
---|---|---|
string | resourceAFullPath | Specify the resource name. You can also include the full path from the root to the resource before the resource name, separated by slashes. For example: FolderName/RouterA/Port1. |
string | resourceBFullPath | Specify the resource name. You can also include the full path from the root to the resource before the resource name, separated by slashes. For example: FolderName/RouterA/Port1. You may leave this parameter blank if you wish to disconnect the existing source resource connection. |
YesNoOptions | overrideExistingConnections | Overriding existing connections will automatically remove existing physical connection if they conflict with the requested new connections. If set to 'No', an error message will be displayed if any port is already connected and the operation will be cancelled. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
testShellAPI.UpdatePhysicalConnection("Router 1234/Port 1","L1 Switch 1234/Blade 1/Port 3",YesNoOptions.Yes);
UpdatePhysicalConnectionsDefine physical connections between resources.
Syntax
UpdatePhysicalConnections(physicalConnectionsUpdateRequests,overrideExistingConnections);
Parameters
Type | Name | Description |
---|---|---|
string[,] | physicalConnectionUpdateRequest | Specify a list of physical connections to update. For example: {['ResourceA','ResourceB';'ResourceC',ResourceD']} |
YesNoOptions | overrideExistingConnections | Overriding existing connections will automatically remove existing physical connection if they conflict with the requested new connections. If set to 'No', an error message will be displayed if any port is already connected and the operation will be cancelled. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
testShellAPI.UpdatePhysicalConnections(new[,] {{"Router 1234/Port 1","L1 Switch 1234/Blade 1/Port 3"}},YesNoOptions.Yes);
UpdateReservationDescriptionChange a reservation description.
Syntax
UpdateReservationDescription(reservationId,description);
Parameters
Type | Name | Description |
---|---|---|
string | reservationId | Specify the reservation ID. |
string | description | Provide an updated description of the reservation. This text will replace the current description. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
string reservationId = "af626b88-458b-4e7a-9054-c03d8cffa260";
testShellAPI.UpdateReservationDescription(reservationId,"New Description");
UpdateReservationNameChange a reservation name.
Syntax
UpdateReservationName(reservationId,name);
Parameters
Type | Name | Description |
---|---|---|
string | reservationId | Specify the reservation ID. |
string | name | Provide an updated name of the reservation. This text will replace the current name. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
string reservationId = "af626b88-458b-4e7a-9054-c03d8cffa260";
testShellAPI.UpdateReservationName(reservationId,"New Name");
UpdateReservationGlobalInputsUpdates the unlinked global inputs in a specified reservation.
Syntax
UpdateReservationGlobalInputs(reservationId, globalInputs,out resultXml);
Parameters
Type | Name | Description |
---|---|---|
string | reservationId | Specify the reservation ID. |
string[,] | globalInputs | Global inputs associated with the specified reservation. For example: {['Input Name', 'Value';]}. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
string reservationId = "af626b88-458b-4e7a-9054-c03d8cffa260";
string[,] globalInputs = {{"input1", "new value"}};
testShellAPI.UpdateReservationGlobalInputs(reservationId, globalInputs);
ChangeReservationOwnerUpdates the owner in a specified reservation.
Syntax
ChangeReservationOwner(reservationId, ownerName, out resultXml);
Parameters
Type | Name | Description |
---|---|---|
string | reservationId | Specify the reservation ID. |
string | ownerName | New owner for the reservation. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
string reservationId = "af626b88-458b-4e7a-9054-c03d8cffa260";
string onerName = "admin";
testShellAPI.ChangeReservationOwner(reservationId, ownerName);
UpdateResourceAddressUpdate a resource address.
Syntax
UpdateResourceAddress(resourceFullPath,resourceAddress);
Parameters
Type | Name | Description |
---|---|---|
string | resourceFullPath | Specify the resource name. You can also include the full path from the root to the resource before the resource name, separated by slashes. For example: FolderName/RouterA/Port1. |
string | resourceAddress | Specify the resource’s new address. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
testShellAPI.UpdateResourceAddress("Router 1234","192.168.1.201");
UpdateResourceDescriptionChange a resource description.
Syntax
UpdateResourceDescription(resourceFullPath,resourceDescription);
Parameters
Type | Name | Description |
---|---|---|
string | resourceFullPath | Specify the resource name. You can also include the full path from the root to the resource before the resource name, separated by slashes. For example: FolderName/RouterA/Port1. |
string | resourceDescription | Provide an updated description of the resource. This text will replace the current description. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
testShellAPI.UpdateResourceDescription("Router 1234","a new description for the resource");
UpdateResourceDriverUpdate a resource driver.
Syntax
UpdateResourceDriver(resourceFullPath,driverName);
Parameters
Type | Name | Description |
---|---|---|
string | resourceFullPath | Specify the resource name. You can also include the full path from the root to the resource before the resource name, separated by slashes. For example: FolderName/RouterA/Port1. |
string | driverName | Specify the name of the driver. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
testShellAPI.UpdateResourceDriver("Router 1234","NewDriver");
UpdateTopologyOwnerUpdate the topology owner.
Syntax
UpdateTopologyOwner(topologyName,ownerName);
Parameters
Type | Name | Description |
---|---|---|
string | topologyName | Specify the topology name. Include the full path from the root to the topology, separated by slashes. For example: FolderName/Topologies/TopologyName. |
string | ownerName | Specify the topology owner. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
testShellAPI.UpdateTopologyOwner("Temp Automation Resources/TP1","admin");
AddPermittedEditorsToTopologyAdd permitted editors to a topology.
Syntax
AddPermittedEditorsToTopology(topologyName, editorNames);
Parameters
Type | Name | Description |
---|---|---|
string | topologyName | Specify the topology name. Include the full path from the root to the topology, separated by slashes. For example: FolderName/Topologies/TopologyName. |
string[,] | editorNames | A list of user names to be added as permitted editors to a topology. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
testShellAPI.AddPermittedEditorsToTopology("Temp Automation Resources/TP1", new string[] {"admin", "John Doe"});
RemovePermittedEditorsFromTopologyRemove permitted editors from a topology.
Syntax
RemovePermittedEditorsFromTopology(topologyName, editorNames);
Parameters
Type | Name | Description |
---|---|---|
string | topologyName | Specify the topology name. Include the full path from the root to the topology, separated by slashes. For example: FolderName/Topologies/TopologyName. |
string[,] | editorNames | A list of user names to be removed as permitted editors from a topology. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
testShellAPI.RemovePermittedEditorsFromTopology("Temp Automation Resources/TP1", new string[] {"admin", "John Doe"});
UpdateTopologyDriverUpdate the topology driver.
Syntax
UpdateTopologyDriver(topologyFullPath,driverName);
Parameters
Type | Name | Description |
---|---|---|
string | topologyFullPath | 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. |
string | driverName | Specify the name of the driver. Leave empty to remove associated driver. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
testShellAPI.UpdateTopologyDriver("Topologies/Topology1", "Topology Driver");
UpdateUser
Syntax
UpdateUser(username,email,isActive);
Parameters
Type | Name | Description |
---|---|---|
string | username | The username of the user you want to update. |
string | The new email address to update to. | |
YesNoOptions | isActive | Grant or deny active access to the application. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
testShellAPI.UpdateUser("User1234","user1234@work.com",YesNoOptions.Yes);
UpdateUsersLimitations
Syntax
UpdateUsersLimitations(userUpdateRequests);
Parameters
Type | Name | Description |
---|---|---|
string[,] | userUpdateRequests | List of Username, MaxConcurrentReservations, MaxReservationDuration, MaxSavedSandboxes, MaxScheduledSandboxes, and MaxOwnedBlueprints of the users you wish to update. For example: {['Username1','1','1','17','10';'Username2','12','10','22','10','10']} Please note that when modifying MaxScheduledSandboxes attribute, *MaxSavedSandboxes* attribute must be updated. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
testShellAPI.UpdateUsersLimitations(new string[,] {{"username1", "1", "", "", "", ""},{"username2", "100", "50", "20", "10", "10"}});
UpdateUserGroupsModify a user's group memberships.
Syntax
UpdateUserGroups(username,groupsNames);
Parameters
Type | Name | Description |
---|---|---|
string | username | Specify the name of the user. |
string[] | groupsNames | Use this method to update a user's group memberships. Activating this method will replace the user's memberships with the specified list of groups. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
testShellAPI.UpdateUserGroups("User1234", new string[] {"QA_Users", "Testers_Users"});
UpdateUserPasswordModify a user's password.
Syntax
UpdateUserPassword(username,newPassword);
Parameters
Type | Name | Description |
---|---|---|
string | username | Specify the name of the user. |
string | password | Specify the user's new login password. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
testShellAPI.UpdateUserPassword("User1234","Pass1234");
UpdateRouteAliasesInReservationUpdate route aliases in a reservation
Syntax
UpdateRouteAliasesInReservation(reservationId,routeAliases,out resultXml);
Parameters
Type | Name | Description |
---|---|---|
string | reservationId | Specifies the string that represents the reservation’s unique identifier. |
string[,] | routeAliases | Specify a matrix of route source, route target and alias. For example: {['SourceResourceFullName', 'TargetFullName','Alias';'SourceResourceFullName2', 'TargetFullName2','Alias2']}. |
out string | resultXml | Specify the variable for the XML output. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
string resultXml;
string reservationId = "28cb2a71-c8fc-4f41-a22b-e65685ebed14";
string[,] routes;
testShellAPI.UpdateRouteAliasesInReservation(reservationId,new string[,]{"Router 1234/Port 1","GenericResource 1234/Port 2","a route"},out resultXml);
Output
<ResponseInfo>
<Routes>
<Route Source="Router 1234/Port 1" Target="GenericResource 1234/Port 2" RouteType="uni" Shared="true">
<Segments>
<Segment Source="Router 1234/Port 1" Target="L1 Switch 1234/Blade 1/Port 3"/>
<Segment Source="L1 Switch 1234/Blade 1/Port 3" Target="L1 Switch 1234/Blade 1/Port 2"/>
<Segment Source="L1 Switch 1234/Blade 1/Port 2" Target="GenericResource 1234/Port 2"/>
</Segments>
</Route>
</Routes>
</ResponseInfo>
UpdateDriverUpdate Driver
Syntax
UpdateDriver(driverName, pathToDriver);
Parameters
Type | Name | Description |
---|---|---|
string | driverName | Specify the driver name. |
string | driverFileName | Specify the driver file name/full path. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
testShellAPI.UpdateDriver("TestDriver", "c:\file.zip");
UpdateScriptUpdate Script
Syntax
UpdateScript(scriptName, pathToScript);
Parameters
Type | Name | Description |
---|---|---|
string | scriptName | Specify the script name. |
string | scriptFile | Specify the script file data (base64 file representation). |
string | scriptFileName | Specify the script file name(optional). |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
testShellAPI.UpdateScript("TestScript", "c:\TestScript_Update.zip");
WriteMessageToReservationOutputAllows sending output to the command output window in a reservation.
Syntax
WriteMessageToReservationOutput(reservationId, message);
Parameters
Type | Name | Description |
---|---|---|
string | reservationId | Specify the string that represents the reservation’s unique identifier. |
string | message | Output message to the command output window. |
out string | resultXml | Specify the variable for the XML output. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
string reservationId = "af626b88-458b-4e7a-9054-c03d8cffa260";
string message = "this is an output from API";
testShellAPI.WriteMessageToReservationOutput(reservationId, message);
GetAllApprovalRequestsGet all approval requests.
Syntax
GetAllApprovalRequests(out resultXml);
Parameters
Type | Name | Description |
---|---|---|
out string | resultXml | Specify the variable for the XML output. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
testShellAPI.GetAllApprovalRequests();
Output
<ResponseInfo>
<ApprovalRequestResponseInfos xsi:type="GetAllApprovalRequestsResponseInfo">
<ApprovalRequest Id="1" RequestedEntityId="de6f5e37-e3e3-46d0-b915-07a1f30c07d4" RequestedEntityType="Blueprint" UserInfoId="3" StartTime="01/02/2023" EndTime="02/02/2023 14:00:00" State="Pending" CreationDate="30/01/2023 13:18:42" ModifiedDate="30/01/2023 13:18:42" EntityName="BlueprintName" IsApprover="true" RequesterName="userA">
<Duration>60</Duration>
</ApprovalRequest>
</ApprovalRequestResponseInfos>
</ResponseInfo>
GetApprovalRequestGet Approval request.
Syntax
GetApprovalRequest(id, out resultXml);
Parameters
Type | Name | Description |
---|---|---|
int | id | Specify the number that represents the request’s unique identifier. |
out string | resultXml | Specify the variable for the XML output. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
testShellAPI.GetApprovalRequest(id);
Output
<ResponseInfo xsi:type="GetApprovalRequestResponseInfo" Id="1" RequestedEntityId="de6f5e37-e3e3-46d0-b915-07a1f30c07d4" RequestedEntityType="Blueprint" UserInfoId="3" StartTime="01/02/2023" EndTime="02/02/2023 14:00:00" State="Pending" CreationDate="30/01/2023 13:18:42" ModifiedDate="30/01/2023 13:18:42" EntityName="BlueprintName" IsApprover="true" RequesterName="userA">
<Duration>60</Duration>
</ResponseInfo>
CreateBlueprintApprovalRequestCreate a new blueprint approval request.
Syntax
CreateBlueprintApprovalRequest(entityId, requestNotes, globalInputs, requirementsInputs, additionalInfoInputs, startTime, endTime, duration, out resultXml);
Parameters
Type | Name | Description |
---|---|---|
string | entityId | Unique identifier of the entity (Blueprint id). |
string | requestNotes | Request description (optional). |
string[,] | globalInputs | Global inputs associated with the specified topology. For example: {['Input Name', 'Value';]}. |
string[,] | requirementsInputs | Requirements inputs associated with the specified topology. For example: {['Resource Name', 'Input Name', 'Value', 'AttributeType';]}, AttributeType can be one of the following: Attributes/Models/Quantity. |
string[,] | additionalInfoInputs | Additional info inputs associated with the specified topology. For example: {['Resource Name', 'Input Name', 'Value';]}. |
DateTime | startTime | Start time of the request (leave empty to immediately request approval). |
DateTime | endTime | End time of the request, after which the request will be invalid (leave empty for unlimited request time). |
string | duration | Time in minutes to consume the entity. For example, sandbox duration (leave empty for unlimited consumption time). |
out string | resultXml | Specify the variable for the XML output. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
string[,] globalInputs = {{"input1", "value1"}, {"input2", "value2"}};
string[,] requirementsInputs = {{"resource", "attribute", "value", "Attributes"}};
string[,] additionalInfoInputs = {{"resource", "attribute", "value"}};
testShellAPI.CreateBlueprintApprovalRequest("de6f5e37-e3e3-46d0-b915-07a1f30c07d4", "Request notes", globalInputs, requirementsInputs, additionalInfoInputs, new DateTime(2023, 1, 1, 12, 0, 0), new DateTime(2023, 2, 2, 12, 0, 0), "60");
DeleteApprovalRequestDelete an approval request.
Syntax
DeleteApprovalRequest(id);
Parameters
Type | Name | Description |
---|---|---|
int | id | Unique id of the request. |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
testShellAPI.DeleteApprovalRequest(3);
ApproveApprovalRequestApprove an approval request.
Syntax
ApproveApprovalRequest(id, message);
Parameters
Type | Name | Description |
---|---|---|
int | id | Unique id of the request. |
string | message | message (optional). |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
testShellAPI.ApproveApprovalRequest(3, "approve message");
RejectApprovalRequestReject an approval request.
Syntax
RejectApprovalRequest(id, message);
Parameters
Type | Name | Description |
---|---|---|
int | id | Unique id of the request. |
string | message | message (optional). |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
testShellAPI.RejectApprovalRequest(3, message);
ConsumeApprovalRequestConsume an approval request.
Syntax
ConsumeApprovalRequest(id, name, startTime, endTime);
Parameters
Type | Name | Description |
---|---|---|
int | id | Unique id of the request. |
string | name | Name for the consumed entity (Sandbox name). |
DateTime | startTime | Start time of the request (leave empty for immediate use). |
DateTime | endTime | End time of the request (leave empty for unlimited duration). |
Example
TestShellAPI.TestShellAPI testShellAPI = new TestShellAPI.TestShellAPI();
testShellAPI.ConsumeApprovalRequest(3, "NewReservation", new DateTime(2023, 1, 1, 14, 0, 0), new DateTime(2023, 1, 1, 14, 30, 0));