diff --git a/src/doc2tosca.py b/src/doc2tosca.py index cd061f2144221bd992050b4eca0d7198303b4af5..922ba5534f7704f07d23dda87eba2051c1e78a91 100644 --- a/src/doc2tosca.py +++ b/src/doc2tosca.py @@ -199,7 +199,9 @@ def generate_templates(filename, spec_version=SPEC_VERSION): sect_8_id = find_sect("8\tPNFD TOSCA model", sect_7_id + 1, CONTENT) - annex_a_id = find_sect("Annex A (informative):", sect_7_id + 1, CONTENT) + sect_9_id = find_sect("9\tCommon Definitions", sect_8_id + 1, CONTENT) + + annex_a_id = find_sect("Annex A (informative):", sect_9_id + 1, CONTENT) count = generate_tables_between(sect_6_id, sect_7_id, CONTENT, MODELS['vnfd']['buf']) print("Printed " + str(count) + " types to " + "VNFD\n\n\n") @@ -207,9 +209,12 @@ def generate_templates(filename, spec_version=SPEC_VERSION): count = generate_tables_between(sect_7_id, sect_8_id, CONTENT, MODELS['nsd']['buf']) print("Printed " + str(count) + " types to " + "NSD\n\n\n") - count = generate_tables_between(sect_8_id, annex_a_id, CONTENT, MODELS['pnfd']['buf']) + count = generate_tables_between(sect_8_id, sect_9_id, CONTENT, MODELS['pnfd']['buf']) print("Printed " + str(count) + " types to " + "PNFD\n\n\n") + count = generate_tables_between(sect_9_id, annex_a_id, CONTENT, MODELS['pnfd']['buf']) + print("Printed " + str(count) + " types to " + "Common\n\n\n") + def print_to_files(prefix=None): '''