-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathplay.py
More file actions
40 lines (27 loc) · 1.07 KB
/
play.py
File metadata and controls
40 lines (27 loc) · 1.07 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
40
import pprint
import dativetop.client as client
import dativetop.constants as c
import dtaoldm.domain as domain
import dativetop.getsettings as getsettings
import dativetop.introspect as di
#DATIVETOP_URL = 'http://127.0.0.1:6543/'
DATIVETOP_URL = 'http://127.0.0.1:5676/'
DATIVE_URL = 'http://127.0.0.1:5678/'
OLD_URL = 'http://127.0.0.1:5679/'
dativetop_service = client.DativeTopService(url=DATIVETOP_URL)
aol = client.get(dativetop_service)
print(aol) # should be empty
declared_old_service, err1 = domain.construct_old_service(url=OLD_URL)
declared_dative_app, err2 = domain.construct_dative_app(url=DATIVE_URL)
print(declared_old_service)
print(declared_dative_app)
dativetop_settings = getsettings.get_settings(config_path=c.CONFIG_PATH)
print(dativetop_settings)
old_instances = []
for oi_dict in di.introspect_old_instances(dativetop_settings):
pprint.pprint(oi_dict)
slug = oi_dict['db_file_name']
old_instance = domain.construct_old_instance(
slug=slug, url=f'{OLD_URL}{slug}/',)
pprint.pprint(old_instance)
# aol = client.get(dativetop_service)