diff options
author | Tal Gitelman <tg851x@intl.att.com> | 2018-07-19 18:25:12 +0300 |
---|---|---|
committer | Tal Gitelman <tg851x@intl.att.com> | 2018-07-25 15:03:36 +0000 |
commit | 924b33856a717a70570e9108596716a781e39ec0 (patch) | |
tree | 27951fd24b1d5e6217580254c49d6f02efc3185a /catalog-be/src/main/resources/scripts/import/tosca/importAnnotationTypes.py | |
parent | 6c3541e2f1a64a7140b7bb54ff5aa546facbb14f (diff) |
Align normatives and scripts
Change-Id: I5e15e3c5adaf13a5b785613d20411f5d0e42e264
Issue-ID: SDC-1544
Signed-off-by: Tal Gitelman <tg851x@intl.att.com>
Diffstat (limited to 'catalog-be/src/main/resources/scripts/import/tosca/importAnnotationTypes.py')
-rw-r--r-- | catalog-be/src/main/resources/scripts/import/tosca/importAnnotationTypes.py | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/catalog-be/src/main/resources/scripts/import/tosca/importAnnotationTypes.py b/catalog-be/src/main/resources/scripts/import/tosca/importAnnotationTypes.py new file mode 100644 index 0000000000..5f0d4ad421 --- /dev/null +++ b/catalog-be/src/main/resources/scripts/import/tosca/importAnnotationTypes.py @@ -0,0 +1,35 @@ +import sys + +from importCommon import parse_cmd_line_params +from importNormativeElements import import_element + +IMPORT_ANNOTATION_URL = "/sdc2/rest/v1/catalog/uploadType/annotationtypes" +ANNOTATION_FILE_PATH = "../../../import/tosca/annotation-types/" +ANNOTATION_ZIP_FILE = "annotationTypesZip" +ANNOTATION_ELEMENT_NAME = "annotationTypes" + +##################################################################################################################################################################################### +# # +# Import tosca data types # +# # +# activation : # +# python importAnnotaionTypes.py [-s <scheme> | --scheme=<scheme> ] [-i <be host> | --ip=<be host>] [-p <be port> | --port=<be port> ] [-f <input file> | --ifile=<input file> ] # +# # +# shortest activation (be host = localhost, be port = 8080): # +# python importAnnotaionTypes.py [-f <input file> | --ifile=<input file> ] # +# # +##################################################################################################################################################################################### + + +def import_annotation_types(scheme, be_host, be_port, admin_user, exit_on_success): + import_element(scheme, be_host, be_port, admin_user, exit_on_success, ANNOTATION_FILE_PATH, IMPORT_ANNOTATION_URL, + ANNOTATION_ELEMENT_NAME, ANNOTATION_ZIP_FILE) + + +def main(argv): + scheme, be_host, be_port, admin_user = parse_cmd_line_params(argv) + import_annotation_types(scheme, be_host, be_port, admin_user, True) + + +if __name__ == "__main__": + main(sys.argv[1:]) |