mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-3620: [Automation] API removevpnuser failed, in test case test_project_usage.TestVpnUsage.test_01_vpn_usage.
Signed-off-by: Prasanna Santhanam <tsp@apache.org>
(cherry picked from commit ecfeaa1037)
This commit is contained in:
parent
182de56743
commit
5eaec0a5e0
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue