diff --git a/test/integration/component/test_project_usage.py b/test/integration/component/test_project_usage.py index bb253e1c04a..1422febf975 100644 --- a/test/integration/component/test_project_usage.py +++ b/test/integration/component/test_project_usage.py @@ -1659,7 +1659,10 @@ class TestVpnUsage(cloudstackTestCase): # Remove VPN user self.debug("Deleting VPN user: %s" % vpnuser.id) - vpnuser.delete(self.apiclient) + vpnuser.delete( + self.apiclient, + projectid=self.project.id + ) # Delete VPN access self.debug("Deleting VPN: %s" % vpn.publicipid) diff --git a/tools/marvin/marvin/integration/lib/base.py b/tools/marvin/marvin/integration/lib/base.py index 13507bc8ac4..03c0707d335 100755 --- a/tools/marvin/marvin/integration/lib/base.py +++ b/tools/marvin/marvin/integration/lib/base.py @@ -2100,13 +2100,16 @@ class VpnUser: cmd.projectid = projectid return VpnUser(apiclient.addVpnUser(cmd).__dict__) - def delete(self, apiclient): + def delete(self, apiclient, projectid=None): """Remove VPN user""" cmd = removeVpnUser.removeVpnUserCmd() cmd.username = self.username - cmd.account = self.account - cmd.domainid = self.domainid + if projectid: + cmd.projectid = projectid + else: + cmd.account = self.account + cmd.domainid = self.domainid apiclient.removeVpnUser(cmd) @classmethod