Skip to content

Commit c5284e6

Browse files
committed
added timer
1 parent 2cfec98 commit c5284e6

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

automation_api_scripts/get_folder_resource_details.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
iterate over a target folder and print out reserved resources
33
"""
44
from cloudshell.api.cloudshell_api import CloudShellAPISession
5-
import json
5+
from timeit import default_timer
66

77
# add credentials for session
88
user = "admin"
@@ -11,6 +11,9 @@
1111
domain = "Global"
1212

1313
TARGET_FOLDER = "mocks/DUT"
14+
15+
start = default_timer()
16+
1417
# start session
1518
api = CloudShellAPISession(host=server, username=user, password=password, domain=domain)
1619
# resources = api.GetFolderContent(fullPath="mocks/DUT", showAllDomains=True)
@@ -26,3 +29,5 @@
2629
for resource in availability_resources:
2730
print(f"Resource: {resource.FullName}, Status: {resource.ReservedStatus}")
2831
print("===========")
32+
33+
print(f"Script done after {default_timer() - start} seconds")

0 commit comments

Comments
 (0)