From 1c9383bf85ce17e541fc1498a41a69568292b004 Mon Sep 17 00:00:00 2001 From: sarada prasad sahoo Date: Fri, 5 Apr 2019 16:11:50 +0530 Subject: updating the VNFD (SOL001) type based on SOL001 v2.5.1 updated VNFD types (tosca*.*nfv.) based on latest v2.5.1 version, not supported backward compatibility of SOL draft version, will be documented as limitation while upgrading from SOL draft version, updated importscript for new nodes, Also fixed java files for policyType having groupType reference Change-Id: I8b8175ec908809608e6bdac990052d909792a2ba Issue-ID: SDC-2170 Signed-off-by: sarada prasad sahoo --- .../scripts/import/tosca/importNfvTypes.py | 40 ++++++++++++---------- 1 file changed, 22 insertions(+), 18 deletions(-) (limited to 'catalog-be/src/main/resources/scripts/import/tosca') diff --git a/catalog-be/src/main/resources/scripts/import/tosca/importNfvTypes.py b/catalog-be/src/main/resources/scripts/import/tosca/importNfvTypes.py index 3de471935e..7c7ed410ec 100644 --- a/catalog-be/src/main/resources/scripts/import/tosca/importNfvTypes.py +++ b/catalog-be/src/main/resources/scripts/import/tosca/importNfvTypes.py @@ -8,19 +8,19 @@ from importNormativeTypes import * import importCommon ##################################################################################################################################################################################################### -# # +# # # Import Nfv Types from a given file # -# # +# # # activation : # # python importNfvTypes.py [optional -s | --scheme=, default http] [-i | --ip=] [-p | --port= ] [-f | --ifile= ] # -# # +# # # shortest activation (be host = localhost, be port = 8080): # # python importUsers.py [-f | --ifile= ] # -# # +# # ##################################################################################################################################################################################################### def importNfvTypes(scheme, beHost, bePort, adminUser, fileDir, updateversion): - + nfvTypes = [ "underlayVpn", "overlayTunnel", "genericNeutronNet", @@ -35,45 +35,49 @@ def importNfvTypes(scheme, beHost, bePort, adminUser, fileDir, updateversion): "vduCompute", "Cp", "vduVirtualStorage", - "vnfVirtualLinkDesc", + "vduVirtualBlockStorage", + "vduVirtualFileStorage", + "vduVirtualObjectStorage", + "vduVirtualStorage", "vnfVirtualLink", + "vnfExtCp", "vduCp", "VNF" ] - + responseCodes = [200, 201] - + if(updateversion == 'false'): responseCodes = [200, 201, 409] - + results = [] for nfvType in nfvTypes: result = createNormativeType(scheme, beHost, bePort, adminUser, fileDir, nfvType, updateversion) results.append(result) if ( result[1] == None or result[1] not in responseCodes) : print "Failed creating heat type " + nfvType + ". " + str(result[1]) - return results + return results def main(argv): print 'Number of arguments:', len(sys.argv), 'arguments.' - beHost = 'localhost' + beHost = 'localhost' bePort = '8080' adminUser = 'jh0003' updateversion = 'true' scheme = 'http' - + try: opts, args = getopt.getopt(argv,"i:p:u:v:h:",["ip=","port=","user=","updateversion="]) except getopt.GetoptError: usage() error_and_exit(2, 'Invalid input') - + for opt, arg in opts: #print opt, arg if opt == '-h': - usage() + usage() sys.exit(3) elif opt in ("-i", "--ip"): beHost = arg @@ -88,7 +92,7 @@ def main(argv): updateversion = 'false' print 'scheme =',scheme,',be host =',beHost,', be port =', bePort,', user =', adminUser - + if ( beHost == None ): usage() sys.exit(3) @@ -99,12 +103,12 @@ def main(argv): for result in results: print "{0:20} | {1:6}".format(result[0], result[1]) print "-----------------------------" - + responseCodes = [200, 201] - + if(updateversion == 'false'): responseCodes = [200, 201, 409] - + failedNormatives = filter(lambda x: x[1] == None or x[1] not in responseCodes, results) if (len(failedNormatives) > 0): error_and_exit(1, None) -- cgit 1.2.3-korg