You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is useful for stuff like moving one security policy above another.
636
+
637
+
If this object's parent is a rulebase object, then this object is also
638
+
moved to the appropriate position in the local pandevice object tree.
639
+
640
+
Args:
641
+
location (str): Any of the following: before, after, top, or bottom
642
+
ref (PanObject/str): If location is "before" or "after", move this object before/after the ref object. If this is a string, then the string should just be the name of the object.
643
+
update (bool): If this is set to False, then only move this object in the pandevice object tree, do not actually perform the MOVE operation on the live device. Note that in order for this object to be moved in the pandevice object tree, the parent object must be a rulebase object.
644
+
645
+
Raises:
646
+
ValueError
647
+
648
+
"""
649
+
d=self.nearest_pandevice()
650
+
dst=None
651
+
new_index=None
652
+
rbs= ('Rulebase', 'PreRulebase', 'PostRulebase')
653
+
ref_locs= ('before', 'after')
654
+
standalone_locs= ('top', 'bottom')
655
+
parent=self.parent
656
+
657
+
# Sanity checks + determine move location.
658
+
ifparentisNone:
659
+
raiseValueError('No parent for object {0}'.format(self.uid))
660
+
eliflocationinstandalone_locs:
661
+
ifrefisnotNone:
662
+
raiseValueError('ref should be None for {0} move'.format(
0 commit comments