-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscratch.py
More file actions
39 lines (28 loc) · 1.38 KB
/
scratch.py
File metadata and controls
39 lines (28 loc) · 1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
from cloudshell.api.cloudshell_api import CloudShellAPISession
############### user tests ####################
'''
session = CloudShellAPISession(host='localhost',
username='user',
password='user',
domain='Global')
# reserve API
r = session.CreateImmediateTopologyReservation(reservationName='myReservation',
durationInMinutes=100,
topologyFullPath='CloudShell Sandbox Template',
owner='user')
t = session.RestoreSavedSandbox('whatever',
savedSandboxId='450bb681-e442-4cf2-2552-3cd70fb1d608',
durationInMinutes=10,
owner='user')
'''
############### admin tests ####################
session = CloudShellAPISession(host='localhost',
username='admin',
password='admin',
domain='Global')
# restore API
t = session.RestoreSavedSandbox('whatever',
savedSandboxId='450bb681-e442-4cf2-2552-3cd70fb1d608',
durationInMinutes=10,
owner='admin')
print t