]> xenbits.xensource.com Git - xenrt-citrix/xenrt.git/commitdiff
Fix version lookup
authorAlex Brett <alex.brett@citrix.com>
Wed, 18 Nov 2015 13:53:42 +0000 (13:53 +0000)
committerAlex Brett <alex.brett@citrix.com>
Wed, 18 Nov 2015 13:53:42 +0000 (13:53 +0000)
exec/xenrt/lib/scalextreme/sxprocess.py

index 31cdf3f987552b469fb75ad40093d6cce5da4eb9..6287c4967cd0b6210fc8f6a6bcd334f3010ba4d0 100644 (file)
@@ -31,11 +31,11 @@ class SXProcess(object):
         p.__processId = b['processId']
         if not version:
             # Find the latest version
-            versions = api.execute(category="process", command="versions", method="GET")
+            versions = api.execute(category="process", sid=p['processId'], command="versions", method="GET")
             p.__processVersion = max(map(lambda v: int(v['version']), versions))
         if templateDeploymentProfile:
             # Find the id of this profile
-            profiles = api.execute(category="deploymentprofile", command="list", method="POST", params={"processId": b['processId'], "processVersion": b['processVersion']})
+            profiles = api.execute(category="deploymentprofile", command="list", method="POST", params={"processId": p['processId'], "processVersion": p['processVersion']})
             matchedProfiles = filter(lambda dp: dp['deploymentProfileName'] == templateDeploymentProfile, profiles)
             if len(matchedProfiles) != 1:
                 raise xenrt.XRTError("Found %d matching deployment profiles (expected 1)" % len(matchedProfiles))