def apply(self):
        if not self.pan_device:
            return
        self.pan_device.set_config_changed()
        # apply the interface
        xpath, element = self._xpath()
        self.pan_device.xapi.edit(xpath, ET.tostring(element))
        # put it in a zone
        if self.zone:
            xpath = pandevice.XPATH_ZONE + "/entry[@name='%s']/network/layer3" \
                                 % (self.zone,)
            element = "<member>%s</member>" % (self.name,)
            self.pan_device.xapi.set(xpath, element)
        # set the virtual router
        if self.router:
            xpath = pandevice.XPATH_DEFAULT_VROUTER_INTERFACES
            element = "<member>%s</member>" % (self.name,)
            self.pan_device.xapi.set(xpath, element)
dataset/ETHPy150Open PaloAltoNetworks/SplunkforPaloAltoNetworks/bin/lib/pandevice/pandevice/network.py/Interface.apply/original