Fixing spoofguard policy deletion

Change-Id: I8fc97d48ecc564ac83717c896cd8ee2a05d5f9cb
Signed-off-by: Roey Chen <roeyc@vmware.com>
This commit is contained in:
Roey Chen 2015-02-25 09:07:39 -08:00 committed by Kobi Samoray
parent 07aa9cdb8d
commit 96a1fb9633
1 changed files with 5 additions and 5 deletions

View File

@ -171,7 +171,7 @@ class VSMClient(object):
ls['objectId'])
endpoint = '/vdn/virtualwires/%s' % ls['objectId']
response = self.delete(endpoint=endpoint)
if response.status_code != 200:
if response.status_code != 204:
print "ERROR: reponse status code %s" % response.status_code
def query_all_firewall_sections(self):
@ -201,7 +201,7 @@ class VSMClient(object):
endpoint = '/firewall/globalroot-0/config/layer3sections/%s' % \
l3sec['id']
response = self.delete(endpoint=endpoint)
if response.status_code != 200:
if response.status_code != 204:
print "ERROR: reponse status code %s" % response.status_code
def query_all_security_groups(self):
@ -231,7 +231,7 @@ class VSMClient(object):
endpoint = '/services/securitygroup/%s' % sg['objectId']
params = {'force': self.force}
response = self.delete(endpoint=endpoint, params=params)
if response.status_code != 200:
if response.status_code != 204:
print "ERROR: reponse status code %s" % response.status_code
def query_all_spoofguard_policies(self):
@ -254,7 +254,7 @@ class VSMClient(object):
for spg in policies:
print "\nDeleting spoofguard policy %s (%s) ..." % (spg['name'],
spg['policyId'])
endpoint = '/services/spoofguard/%s' % spg['policyId']
endpoint = '/services/spoofguard/policies/%s' % spg['policyId']
response = self.delete(endpoint=endpoint)
print "Response code: %s" % response.status_code
@ -287,7 +287,7 @@ class VSMClient(object):
print "\nDeleting edge %s (%s) ..." % (edge['name'], edge['id'])
endpoint = '/edges/%s' % edge['id']
response = self.delete(endpoint=endpoint)
if response.status_code != 200:
if response.status_code != 204:
print "ERROR: reponse status code %s" % response.status_code
def cleanup_all(self):