- if args.verbosity >= 1:
- print_to_stderr("DEBUG: Uprading VPP")
-
- for key1 in nodeaddrs:
- if not key1 == 'tg':
- for key2 in nodeaddrs[key1]:
- ipaddr = nodeaddrs[key1][key2]
- if args.verbosity >= 2:
- print_to_stderr("DEBUG: Upgrading VPP on node {}"
- .format(ipaddr))
- paramiko.util.log_to_file(os.path.join(scratch_directory,
- "ssh.log"))
- client = paramiko.SSHClient()
- client.load_system_host_keys()
- client.load_host_keys("/dev/null")
- client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
- client.connect(ipaddr, username=args.ssh_user,
- key_filename=args.ssh_privkey)
- if 'centos' in args.topology:
- if args.verbosity >= 1:
- print_to_stderr("DEBUG: Installing RPM packages")
- vpp_install_command = 'sudo rpm -ivh /scratch/vpp/*.rpm'
- elif 'trusty' in args.topology or 'xenial' in args.topology:
- if args.verbosity >= 1:
- print_to_stderr("DEBUG: Installing DEB packages")
- vpp_install_command = 'sudo dpkg -i --force-all ' \
- '/scratch/vpp/*.deb'
- else:
- print_to_stderr("ERROR: Unsupported OS requested: {}"
- .format(args.topology))
- vpp_install_command = ''
- _, stdout, stderr = \
- client.exec_command(vpp_install_command)
- c_stdout = stdout.read()
- c_stderr = stderr.read()
- if args.verbosity >= 2:
- print_to_stderr("DEBUG: Command output was:")
- print_to_stderr(c_stdout)
- print_to_stderr("DEBUG: Command stderr was:")
- print_to_stderr(c_stderr)
+ if not args.skip_install:
+ if args.verbosity >= 1:
+ print_to_stderr("DEBUG: Uprading VPP")
+
+ for key1 in nodeaddrs:
+ if not key1 == 'tg':
+ for key2 in nodeaddrs[key1]:
+ ipaddr = nodeaddrs[key1][key2]
+ if args.verbosity >= 2:
+ print_to_stderr("DEBUG: Upgrading VPP on node {}"
+ .format(ipaddr))
+ paramiko.util.log_to_file(os.path.join(scratch_directory,
+ "ssh.log"))
+ client = paramiko.SSHClient()
+ client.load_system_host_keys()
+ client.load_host_keys("/dev/null")
+ client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
+ client.connect(ipaddr, username=args.ssh_user,
+ key_filename=args.ssh_privkey)
+ if 'centos' in args.topology:
+ if args.verbosity >= 1:
+ print_to_stderr("DEBUG: Installing RPM packages")
+ vpp_install_command = 'sudo rpm -ivh /scratch/vpp/*.rpm'
+ elif 'trusty' in args.topology or 'xenial' in args.topology:
+ if args.verbosity >= 1:
+ print_to_stderr("DEBUG: Installing DEB packages")
+ vpp_install_command = 'sudo dpkg -i --force-all ' \
+ '/scratch/vpp/*.deb'
+ else:
+ print_to_stderr("ERROR: Unsupported OS requested: {}"
+ .format(args.topology))
+ vpp_install_command = ''
+ _, stdout, stderr = \
+ client.exec_command(vpp_install_command)
+ c_stdout = stdout.read()
+ c_stderr = stderr.read()
+ if args.verbosity >= 2:
+ print_to_stderr("DEBUG: Command output was:")
+ print_to_stderr(c_stdout)
+ print_to_stderr("DEBUG: Command stderr was:")
+ print_to_stderr(c_stderr)