From f141c55066c32d1699debebb56394c04d32e69b2 Mon Sep 17 00:00:00 2001 From: Harry Huang Date: Thu, 16 Mar 2017 18:38:19 +0800 Subject: Add upload packages retry 1. retry 5 times if csar package uploads fail 2. clearwater service name varies over the time 3. use the word vnf instead of app Change-Id: Id85c7f467cbefbc46fd1f1daf6202d89ef3ac898 Signed-off-by: Harry Huang (cherry picked from commit 8a07bcd6b75f62c7c79504f8a3c020a2d635156e) --- opera/deploy_vnf.py | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 opera/deploy_vnf.py (limited to 'opera/deploy_vnf.py') diff --git a/opera/deploy_vnf.py b/opera/deploy_vnf.py new file mode 100644 index 0000000..b9703a0 --- /dev/null +++ b/opera/deploy_vnf.py @@ -0,0 +1,28 @@ +#!/usr/bin/env python +############################################################################## +# Copyright (c) 2016-2017 HUAWEI TECHNOLOGIES CO.,LTD and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## + +import argparse +from openo_connect import create_service + + +if __name__ == "__main__": + + parser = argparse.ArgumentParser() + parser.add_argument("--msb_ip", action='store', help="common_services_msb ip") + parser.add_argument("--vnf", action='store', default='', help="vnf type") + parser.add_argument("--nsdId", action='store', default='', help="vnf nsdId") + + args = parser.parse_args() + msb_ip = args.msb_ip + vnf = args.vnf + nsdId = args.nsdId + + if vnf == 'clearwater': + create_service(msb_ip, vnf, vnf, nsdId) -- cgit 1.2.3-korg