Merge branch 'pm_phase2' into v2.0. Amend change for NSD based on package_type rpc...
authorsinhan <nandan.sinha@riftio.com>
Wed, 26 Apr 2017 18:42:43 +0000 (18:42 +0000)
committersinhan <nandan.sinha@riftio.com>
Thu, 27 Apr 2017 20:09:45 +0000 (20:09 +0000)
Signed-off-by: sinhan <nandan.sinha@riftio.com>
1  2 
rwlaunchpad/plugins/rwpkgmgr/rift/tasklets/rwpkgmgr/downloader/url.py
rwlaunchpad/plugins/rwpkgmgr/rift/tasklets/rwpkgmgr/rpc.py

@@@ -67,6 -71,7 +71,8 @@@ class PackageFileDownloader(downloader.
          self.package_id = package_id
          self.package_type = package_type
          self.package_path = package_path
 -        self.package_file_type = vnfd_file_type.lower() if vnfd_file_type else nsd_file_type.lower()
++        self.package_file_type = vnfd_file_type.lower() \
++                if package_type == 'VNFD' else nsd_file_type.lower()
          self.proxy = proxy
  
      def convert_to_yang(self):
@@@ -192,6 -192,8 +192,8 @@@ class PackageDeleteOperationsRpcHandler
          rpc_op = RPC_PACKAGE_DELETE_ENDPOINT.from_dict({"status": str(True)})
  
          try:
 -                    if msg.vnfd_file_type else msg.nsd_file_type.lower()
+             package_file_type = msg.vnfd_file_type.lower() \
++                    if msg.package_type == 'VNFD' else msg.nsd_file_type.lower()
              self.proxy.package_file_delete(
                  msg.package_type,
                  msg.package_id,