- ['Accept: application/vnd.yand.data+json',
- 'Content-Type: application/json'])
-
- upload_client = http.Http(
- 'https://{}:{}/composer/upload?api_server={}{}'.format(
- self._host,
- upload_port,
- 'https://localhost&upload_server=https://',
- self._host))
-
- self.vnf = vnf.Vnf(http_client, **kwargs)
- self.vnfd = vnfd.Vnfd(http_client, **kwargs)
+ ["Accept: application/vnd.yand.data+json", "Content-Type: application/json"]
+ )
+
+ upload_client_url = "https://{}:{}/composer/upload?api_server={}{}".format(
+ self._host,
+ upload_port,
+ "https://localhost&upload_server=https://",
+ self._host,
+ )
+
+ if self._so_version == "v3":
+ upload_client_url = (
+ "https://{}:{}/composer/upload?api_server={}{}&project_name={}".format(
+ self._host,
+ upload_port,
+ "https://localhost&upload_server=https://",
+ self._host,
+ self._so_project,
+ )
+ )
+
+ upload_client = http.Http(upload_client_url)
+
+ self.vnf = vnf.Vnf(http_client, client=self, **kwargs)
+ self.vnfd = vnfd.Vnfd(http_client, client=self, **kwargs)