RIFT 16501 get-package-endpoint now requires a valid package-type.
authorsinhan <nandan.sinha@riftio.com>
Mon, 15 May 2017 15:48:11 +0000 (15:48 +0000)
committersinhan <nandan.sinha@riftio.com>
Mon, 15 May 2017 16:22:25 +0000 (16:22 +0000)
Signed-off-by: sinhan <nandan.sinha@riftio.com>
rwlaunchpad/plugins/rwpkgmgr/rift/tasklets/rwpkgmgr/rpc.py

index 56dd404..5c3303f 100644 (file)
@@ -56,8 +56,9 @@ class EndpointDiscoveryRpcHandler(mano_dts.AbstractRpcHandler):
     def callback(self, ks_path, msg):
         """Forwards the request to proxy.
         """
+        
         url = yield from self.proxy.endpoint(
-                msg.package_type,
+                msg.package_type if msg.has_field('package_type') else "",
                 msg.package_id)
 
         rpc_op = RPC_PKG_ENDPOINT.from_dict({"endpoint": url})