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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
#!/usr/bin/env python3
import sys
from sdcBePy.common.normative.toscaTypes import process_and_create_normative_types
from sdcBePy.tosca.main import get_args, usage
from sdcBePy.tosca.models.normativeTypesList import get_normative, get_heat, get_nfv, get_nfv_2_7_1, get_nfv_3_3_1, get_nfv_4_1_1, get_onap, get_sol
def run(candidate, exit_on_success=True):
scheme, be_host, be_port, admin_user, update_version, debug = get_args()
try:
process_and_create_normative_types(candidate,
scheme,
be_host,
be_port,
admin_user,
update_version=update_version,
debug=debug,
exit_on_success=exit_on_success)
except AttributeError:
usage()
sys.exit(3)
def run_import_normative():
normative_candidate = get_normative()
run(normative_candidate)
def run_import_heat():
heat_candidate = get_heat()
run(heat_candidate)
def run_import_nfv():
nfv_candidate = get_nfv()
run(nfv_candidate)
def run_import_nfv_2_7_1():
nfv_candidate = get_nfv_3_3_1()
run(nfv_candidate)
def run_import_nfv_3_3_1():
nfv_candidate = get_nfv_3_3_1()
run(nfv_candidate)
def run_import_nfv_4_1_1():
nfv_candidate = get_nfv_3_3_1()
run(nfv_candidate)
def run_import_onap():
onap_candidate = get_onap()
run(onap_candidate)
def run_import_sol():
sol_candidate = get_sol()
run(sol_candidate)
if __name__ == '__main__':
run_import_normative()
# run_import_heat()
# run_import_nfv()
# run_import_onap()
# run_import_sol()
|