diff options
author | sarada prasad sahoo <sarada.prasad.sahoo@huawei.com> | 2019-04-05 16:11:50 +0530 |
---|---|---|
committer | Ofir Sonsino <ofir.sonsino@intl.att.com> | 2019-04-08 08:46:05 +0000 |
commit | 1c9383bf85ce17e541fc1498a41a69568292b004 (patch) | |
tree | a1f77c750903a34fa2d34c6771b1479d64a5e513 /catalog-be/src/main/resources/scripts | |
parent | 67437109d8df88ff494f8bd14faef44b7f5a2dee (diff) |
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 <sarada.prasad.sahoo@huawei.com>
Diffstat (limited to 'catalog-be/src/main/resources/scripts')
-rw-r--r-- | catalog-be/src/main/resources/scripts/import/tosca/importNfvTypes.py | 40 |
1 files changed, 22 insertions, 18 deletions
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> | --scheme=<scheme>, default http] [-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 importUsers.py [-f <input file> | --ifile=<input file> ] # -# # +# # ##################################################################################################################################################################################################### 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) |