self._account = None
self._ip = args.so_ip
+ self._api_server_ip = "localhost"
self._uport = args.upload_port
+ self._onboard_port = args.onboard_port
+ self._rport = args.restconf_port
+ self._user = args.restconf_user
+ self._password = args.restconf_password
+ self._onboard_url = "curl -k --user \"{user}:{passwd}\" \"https://{ip}:{port}/composer/upload?api_server=https://{api_server_ip}&upload_server=https://{ip}\"". \
+ format(ip=self._ip,
+ port=self._onboard_port,
+ user=self._user,
+ passwd=self._password,
+ api_server_ip=self._api_server_ip)
self._upload_url = "curl -k https://{ip}:{port}/api/upload". \
format(ip=self._ip,
port=self._uport)
- self._rport = args.restconf_port
- self._user = args.restconf_user
- self._password = args.restconf_password
self._headers = '-H "accept: application/json"' + \
' -H "content-type: application/json"'
self._conf_url = "curl -k {header} --user \"{user}:{passwd}\" https://{ip}:{port}/api/config". \
def _upload_package(self, pkg):
- upload_cmd = "{url} -F \"descriptor=@{pkg}\" ". \
- format(url=self._upload_url,
+ upload_cmd = "{url} -F \"package=@{pkg}\" ". \
+ format(url=self._onboard_url,
pkg=pkg)
self.log.debug("Upload pkg {} cmd: {}".format(pkg, upload_cmd))
parser.add_argument("-c", "--vim-account",
help="Cloud/VIM account to instantiate on")
+ parser.add_argument("-o", "--onboard-port", default=8443, type=int,
+ help="Onboarding port number - node port number, default 8443")
parser.add_argument("-p", "--upload-port", default=4567, type=int,
help="Upload port number, default 4567")
parser.add_argument("-P", "--restconf-port", default=8008, type=int,