X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=geni%2Fmethods%2Fremove.py;h=e16cdbe056bb9c3bb1bf762a326616f7bb1ee320;hb=c98b060072eedda602681f658caaff421e837b66;hp=6ac8ad574ff4f5fe311cfef323a9a69884766b8e;hpb=7546fdde88851efc21caf2a764237f4eb4a669a9;p=sfa.git diff --git a/geni/methods/remove.py b/geni/methods/remove.py index 6ac8ad57..e16cdbe0 100644 --- a/geni/methods/remove.py +++ b/geni/methods/remove.py @@ -46,12 +46,9 @@ class remove(Method): self.api.plshell.DeleteSlice(self.api.plauth, record.get_pointer()) elif type == "node": self.api.plshell.DeleteNode(self.api.plauth, record.get_pointer()) - elif (type == "sa") or (type == "ma"): - if (type == "sa"): - other_rec = table.resolve("ma", record.get_name()) - elif (type == "ma"): - other_rec = table.resolve("sa", record.get_name()) - + elif (type in ['authority', 'sa', 'ma']): + other_rec = table.resolve(type, record.get_name()) + if other_rec: # sa and ma both map to a site, so if we are deleting one # but the other still exists, then do not delete the site