def _add_interface_rewrite_cmds(self, if_type, if_id, interface, rewrite_pcp, rewrite_dscp):
    (current_rewrite_pcp, current_rewrite_dscp, ignored1, ignored2, ignored3) = self._get_current_rewrite_config(interface)
    if ((rewrite_pcp == 'enabled') and (rewrite_pcp != current_rewrite_pcp)):
        self._commands.append(self.REWRITE_PCP_CMD.format(if_type, if_id))
    elif ((rewrite_pcp == 'disabled') and (rewrite_pcp != current_rewrite_pcp)):
        self._commands.append(self.NO_REWRITE_PCP_CMD.format(if_type, if_id))
    if ((rewrite_dscp == 'enabled') and (rewrite_dscp != current_rewrite_dscp)):
        self._commands.append(self.REWRITE_DSCP_CMD.format(if_type, if_id))
    elif ((rewrite_dscp == 'disabled') and (rewrite_dscp != current_rewrite_dscp)):
        self._commands.append(self.NO_REWRITE_DSCP_CMD.format(if_type, if_id))
def _add_interface_rewrite_cmds(self, if_type, if_id, interface, rewrite_pcp, rewrite_dscp):
    (current_rewrite_pcp, current_rewrite_dscp, ignored1, ignored2, ignored3) = self._get_current_rewrite_config(interface)
    if ((rewrite_pcp == 'enabled') and (rewrite_pcp != current_rewrite_pcp)):
        self._commands.append(self.REWRITE_PCP_CMD.format(if_type, if_id))
    elif ((rewrite_pcp == 'disabled') and (rewrite_pcp != current_rewrite_pcp)):
        self._commands.append(self.NO_REWRITE_PCP_CMD.format(if_type, if_id))
    if ((rewrite_dscp == 'enabled') and (rewrite_dscp != current_rewrite_dscp)):
        self._commands.append(self.REWRITE_DSCP_CMD.format(if_type, if_id))
    elif ((rewrite_dscp == 'disabled') and (rewrite_dscp != current_rewrite_dscp)):
        self._commands.append(self.NO_REWRITE_DSCP_CMD.format(if_type, if_id))