git://git.onelab.eu
/
sfa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
7546fdd
)
fix bug when removing authorites, check for authority record type
author
Tony Mack
<tmack@cs.princeton.edu>
Wed, 17 Jun 2009 16:20:30 +0000
(16:20 +0000)
committer
Tony Mack
<tmack@cs.princeton.edu>
Wed, 17 Jun 2009 16:20:30 +0000
(16:20 +0000)
geni/methods/remove.py
patch
|
blob
|
history
diff --git
a/geni/methods/remove.py
b/geni/methods/remove.py
index
6ac8ad5
..
e16cdbe
100644
(file)
--- 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())
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
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