-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfastsnap.py
34 lines (27 loc) · 831 Bytes
/
fastsnap.py
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
import configparser
import os
from obtentoken import *
from snapshots import *
config = configparser.ConfigParser()
a = config.read("config.ini")
#for i in os.environ:
# print (i,os.environ[i])
if "APPID" in os.environ:
APP_ID = os.environ['APPID']
print ("APP_ID:Ok")
if "SECRET" in os.environ:
SECRET = os.environ['SECRET']
print("SECRET:Ok" )
APP_ID = config.get("ACCESS", "APP_ID")
SECRET = config.get("ACCESS", "Secret")
IYO_URL = config.get("ACCESS", "IYO_URL")
#URL = config.get("LOCATIONS", "URL")
URL2 = config.get("LOCATIONS", "URL2")
#URL3 = config.get("LOCATIONS", "URL3")
token = get_token(APP_ID, SECRET, IYO_URL)
jH = get_headers_js(token)
oH = get_headers_os(token)
#print(snapshotcloudspaces(jH,URL))
print (token)
print(snapshotcloudspaces(jH,URL2))
#print(snapshotcloudspaces(jH,URL3))