go.ligato.io/vpp-agent/v3@v3.5.0/clientv2/linux/dbadapter/data_change_db.go (about)

     1  // Copyright (c) 2018 Cisco and/or its affiliates.
     2  //
     3  // Licensed under the Apache License, Version 2.0 (the "License");
     4  // you may not use this file except in compliance with the License.
     5  // You may obtain a copy of the License at:
     6  //
     7  //     http://www.apache.org/licenses/LICENSE-2.0
     8  //
     9  // Unless required by applicable law or agreed to in writing, software
    10  // distributed under the License is distributed on an "AS IS" BASIS,
    11  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  // See the License for the specific language governing permissions and
    13  // limitations under the License.
    14  
    15  package dbadapter
    16  
    17  import (
    18  	"go.ligato.io/cn-infra/v2/db/keyval"
    19  
    20  	linuxclient "go.ligato.io/vpp-agent/v3/clientv2/linux"
    21  	vppclient "go.ligato.io/vpp-agent/v3/clientv2/vpp"
    22  	"go.ligato.io/vpp-agent/v3/clientv2/vpp/dbadapter"
    23  	"go.ligato.io/vpp-agent/v3/pkg/models"
    24  	linux_interfaces "go.ligato.io/vpp-agent/v3/proto/ligato/linux/interfaces"
    25  	linux_iptables "go.ligato.io/vpp-agent/v3/proto/ligato/linux/iptables"
    26  	linux_l3 "go.ligato.io/vpp-agent/v3/proto/ligato/linux/l3"
    27  	abf "go.ligato.io/vpp-agent/v3/proto/ligato/vpp/abf"
    28  	acl "go.ligato.io/vpp-agent/v3/proto/ligato/vpp/acl"
    29  	interfaces "go.ligato.io/vpp-agent/v3/proto/ligato/vpp/interfaces"
    30  	ipfix "go.ligato.io/vpp-agent/v3/proto/ligato/vpp/ipfix"
    31  	ipsec "go.ligato.io/vpp-agent/v3/proto/ligato/vpp/ipsec"
    32  	l2 "go.ligato.io/vpp-agent/v3/proto/ligato/vpp/l2"
    33  	l3 "go.ligato.io/vpp-agent/v3/proto/ligato/vpp/l3"
    34  	nat "go.ligato.io/vpp-agent/v3/proto/ligato/vpp/nat"
    35  	punt "go.ligato.io/vpp-agent/v3/proto/ligato/vpp/punt"
    36  	stn "go.ligato.io/vpp-agent/v3/proto/ligato/vpp/stn"
    37  )
    38  
    39  // NewDataChangeDSL returns a new instance of DataChangeDSL which implements
    40  // the data change DSL for both Linux and VPP config (inherits dbadapter
    41  // from vppplugin).
    42  // Transaction <txn> is used to propagate changes to plugins.
    43  func NewDataChangeDSL(txn keyval.ProtoTxn) *DataChangeDSL {
    44  	vppDbAdapter := dbadapter.NewDataChangeDSL(txn)
    45  	return &DataChangeDSL{txn: txn, vppDataChange: vppDbAdapter}
    46  }
    47  
    48  // DataChangeDSL is an implementation of Domain Specific Language (DSL)
    49  // for changes of both Linux and VPP configuration.
    50  type DataChangeDSL struct {
    51  	txn           keyval.ProtoTxn
    52  	vppDataChange vppclient.DataChangeDSL
    53  }
    54  
    55  // PutDSL implements put operations of data change DSL.
    56  type PutDSL struct {
    57  	parent *DataChangeDSL
    58  	vppPut vppclient.PutDSL
    59  }
    60  
    61  // DeleteDSL implements delete operations of data change DSL.
    62  type DeleteDSL struct {
    63  	parent    *DataChangeDSL
    64  	vppDelete vppclient.DeleteDSL
    65  }
    66  
    67  // Put initiates a chained sequence of data change DSL statements and declares
    68  // new configurable objects or changes existing ones.
    69  func (dsl *DataChangeDSL) Put() linuxclient.PutDSL {
    70  	return &PutDSL{dsl, dsl.vppDataChange.Put()}
    71  }
    72  
    73  // Delete initiates a chained sequence of data change DSL statements
    74  // removing existing configurable objects.
    75  func (dsl *DataChangeDSL) Delete() linuxclient.DeleteDSL {
    76  	return &DeleteDSL{dsl, dsl.vppDataChange.Delete()}
    77  }
    78  
    79  // Send propagates requested changes to the plugins.
    80  func (dsl *DataChangeDSL) Send() vppclient.Reply {
    81  	return dsl.vppDataChange.Send()
    82  }
    83  
    84  // LinuxInterface adds a request to create or update Linux network interface.
    85  func (dsl *PutDSL) LinuxInterface(val *linux_interfaces.Interface) linuxclient.PutDSL {
    86  	dsl.parent.txn.Put(linux_interfaces.InterfaceKey(val.Name), val)
    87  	return dsl
    88  }
    89  
    90  // LinuxArpEntry adds a request to create or update Linux ARP entry.
    91  func (dsl *PutDSL) LinuxArpEntry(val *linux_l3.ARPEntry) linuxclient.PutDSL {
    92  	dsl.parent.txn.Put(linux_l3.ArpKey(val.Interface, val.IpAddress), val)
    93  	return dsl
    94  }
    95  
    96  // LinuxRoute adds a request to create or update Linux route.
    97  func (dsl *PutDSL) LinuxRoute(val *linux_l3.Route) linuxclient.PutDSL {
    98  	dsl.parent.txn.Put(linux_l3.RouteKey(val.DstNetwork, val.OutgoingInterface), val)
    99  	return dsl
   100  }
   101  
   102  // IptablesRuleChain adds request to create or update iptables rule chain.
   103  func (dsl *PutDSL) IptablesRuleChain(val *linux_iptables.RuleChain) linuxclient.PutDSL {
   104  	dsl.parent.txn.Put(linux_iptables.RuleChainKey(val.Name), val)
   105  	return dsl
   106  }
   107  
   108  // VppInterface adds a request to create or update VPP network interface.
   109  func (dsl *PutDSL) VppInterface(val *interfaces.Interface) linuxclient.PutDSL {
   110  	dsl.vppPut.Interface(val)
   111  	return dsl
   112  }
   113  
   114  // Span adds a request to create or update VPP SPAN.
   115  func (dsl *PutDSL) Span(val *interfaces.Span) linuxclient.PutDSL {
   116  	dsl.vppPut.Span(val)
   117  	return dsl
   118  }
   119  
   120  // ACL adds a request to create or update VPP Access Control List.
   121  func (dsl *PutDSL) ACL(acl *acl.ACL) linuxclient.PutDSL {
   122  	dsl.vppPut.ACL(acl)
   123  	return dsl
   124  }
   125  
   126  // ABF adds a request to create or update VPP ACL-based forwarding
   127  func (dsl *PutDSL) ABF(abf *abf.ABF) linuxclient.PutDSL {
   128  	dsl.vppPut.ABF(abf)
   129  	return dsl
   130  }
   131  
   132  /*// BfdSession adds a request to create or update VPP bidirectional forwarding
   133  // detection session.
   134  func (dsl *PutDSL) BfdSession(val *bfd.SingleHopBFD_Session) linuxclient.PutDSL {
   135  	dsl.vppPut.BfdSession(val)
   136  	return dsl
   137  }
   138  
   139  // BfdAuthKeys adds a request to create or update VPP bidirectional forwarding
   140  // detection key.
   141  func (dsl *PutDSL) BfdAuthKeys(val *bfd.SingleHopBFD_Key) linuxclient.PutDSL {
   142  	dsl.vppPut.BfdAuthKeys(val)
   143  	return dsl
   144  }
   145  
   146  // BfdEchoFunction adds a request to create or update VPP bidirectional forwarding
   147  // detection echo function.
   148  func (dsl *PutDSL) BfdEchoFunction(val *bfd.SingleHopBFD_EchoFunction) linuxclient.PutDSL {
   149  	dsl.vppPut.BfdEchoFunction(val)
   150  	return dsl
   151  }*/
   152  
   153  // BD adds a request to create or update VPP Bridge Domain.
   154  func (dsl *PutDSL) BD(val *l2.BridgeDomain) linuxclient.PutDSL {
   155  	dsl.vppPut.BD(val)
   156  	return dsl
   157  }
   158  
   159  // BDFIB adds a request to create or update VPP L2 Forwarding Information Base.
   160  func (dsl *PutDSL) BDFIB(fib *l2.FIBEntry) linuxclient.PutDSL {
   161  	dsl.vppPut.BDFIB(fib)
   162  	return dsl
   163  }
   164  
   165  // XConnect adds a request to create or update VPP Cross Connect.
   166  func (dsl *PutDSL) XConnect(val *l2.XConnectPair) linuxclient.PutDSL {
   167  	dsl.vppPut.XConnect(val)
   168  	return dsl
   169  }
   170  
   171  // VrfTable adds a request to create or update VPP VRF table.
   172  func (dsl *PutDSL) VrfTable(val *l3.VrfTable) linuxclient.PutDSL {
   173  	dsl.vppPut.VrfTable(val)
   174  	return dsl
   175  }
   176  
   177  // StaticRoute adds a request to create or update VPP L3 Static Route.
   178  func (dsl *PutDSL) StaticRoute(val *l3.Route) linuxclient.PutDSL {
   179  	dsl.vppPut.StaticRoute(val)
   180  	return dsl
   181  }
   182  
   183  // Arp adds a request to create or update VPP L3 ARP.
   184  func (dsl *PutDSL) Arp(arp *l3.ARPEntry) linuxclient.PutDSL {
   185  	dsl.vppPut.Arp(arp)
   186  	return dsl
   187  }
   188  
   189  // ProxyArp adds a request to create or update VPP L3 proxy ARP.
   190  func (dsl *PutDSL) ProxyArp(proxyArp *l3.ProxyARP) linuxclient.PutDSL {
   191  	dsl.vppPut.ProxyArp(proxyArp)
   192  	return dsl
   193  }
   194  
   195  // IPScanNeighbor adds a request to delete an existing VPP L3 IP Scan Neighbor.
   196  func (dsl *PutDSL) IPScanNeighbor(ipScanNeigh *l3.IPScanNeighbor) linuxclient.PutDSL {
   197  	dsl.vppPut.IPScanNeighbor(ipScanNeigh)
   198  	return dsl
   199  }
   200  
   201  /*// L4Features adds a request to enable or disable L4 features
   202  func (dsl *PutDSL) L4Features(val *l4.L4Features) linuxclient.PutDSL {
   203  	dsl.vppPut.L4Features(val)
   204  	return dsl
   205  }
   206  
   207  // AppNamespace adds a request to create or update VPP Application namespace
   208  func (dsl *PutDSL) AppNamespace(appNs *l4.AppNamespaces_AppNamespace) linuxclient.PutDSL {
   209  	dsl.vppPut.AppNamespace(appNs)
   210  	return dsl
   211  }*/
   212  
   213  // StnRule adds a request to create or update VPP Stn rule.
   214  func (dsl *PutDSL) StnRule(stn *stn.Rule) linuxclient.PutDSL {
   215  	dsl.vppPut.StnRule(stn)
   216  	return dsl
   217  }
   218  
   219  // NAT44Global adds a request to set global configuration for NAT44
   220  func (dsl *PutDSL) NAT44Global(nat44 *nat.Nat44Global) linuxclient.PutDSL {
   221  	dsl.vppPut.NAT44Global(nat44)
   222  	return dsl
   223  }
   224  
   225  // DNAT44 adds a request to create or update DNAT44 configuration
   226  func (dsl *PutDSL) DNAT44(nat44 *nat.DNat44) linuxclient.PutDSL {
   227  	dsl.vppPut.DNAT44(nat44)
   228  	return dsl
   229  }
   230  
   231  // NAT44Interface adds a request to create or update NAT44 interface configuration.
   232  func (dsl *PutDSL) NAT44Interface(natIf *nat.Nat44Interface) linuxclient.PutDSL {
   233  	dsl.parent.txn.Put(models.Key(natIf), natIf)
   234  	return dsl
   235  }
   236  
   237  // NAT44AddressPool adds a request to create or update NAT44 address pool.
   238  func (dsl *PutDSL) NAT44AddressPool(pool *nat.Nat44AddressPool) linuxclient.PutDSL {
   239  	dsl.parent.txn.Put(models.Key(pool), pool)
   240  	return dsl
   241  }
   242  
   243  // IPSecSA adds request to create a new Security Association
   244  func (dsl *PutDSL) IPSecSA(sa *ipsec.SecurityAssociation) linuxclient.PutDSL {
   245  	dsl.vppPut.IPSecSA(sa)
   246  	return dsl
   247  }
   248  
   249  // IPSecSPD adds request to create a new Security Policy Database
   250  func (dsl *PutDSL) IPSecSPD(spd *ipsec.SecurityPolicyDatabase) linuxclient.PutDSL {
   251  	dsl.vppPut.IPSecSPD(spd)
   252  	return dsl
   253  }
   254  
   255  // IPSecSP adds request to create a new Security Policy
   256  func (dsl *PutDSL) IPSecSP(sp *ipsec.SecurityPolicy) linuxclient.PutDSL {
   257  	dsl.vppPut.IPSecSP(sp)
   258  	return dsl
   259  }
   260  
   261  // IPSecTunnelProtection adds request to delete an IPSec tunnel protection from an interface
   262  func (dsl *PutDSL) IPSecTunnelProtection(tp *ipsec.TunnelProtection) linuxclient.PutDSL {
   263  	dsl.vppPut.IPSecTunnelProtection(tp)
   264  	return dsl
   265  }
   266  
   267  // PuntIPRedirect adds request to create or update rule to punt L3 traffic via interface.
   268  func (dsl *PutDSL) PuntIPRedirect(val *punt.IPRedirect) linuxclient.PutDSL {
   269  	dsl.vppPut.PuntIPRedirect(val)
   270  	return dsl
   271  }
   272  
   273  // PuntToHost adds request to create or update rule to punt L4 traffic to a host.
   274  func (dsl *PutDSL) PuntToHost(val *punt.ToHost) linuxclient.PutDSL {
   275  	dsl.vppPut.PuntToHost(val)
   276  	return dsl
   277  }
   278  
   279  // PuntException adds request to create or update exception to punt specific packets.
   280  func (dsl *PutDSL) PuntException(val *punt.Exception) linuxclient.PutDSL {
   281  	dsl.parent.txn.Put(models.Key(val), val)
   282  	return dsl
   283  }
   284  
   285  // IPFIX adds a request to update VPP IP Flow Information eXport configuration.
   286  func (dsl *PutDSL) IPFIX(val *ipfix.IPFIX) linuxclient.PutDSL {
   287  	dsl.parent.txn.Put(models.Key(val), val)
   288  	return dsl
   289  }
   290  
   291  // FlowprobeParams adds a request to update VPP Flowprobe Params.
   292  func (dsl *PutDSL) FlowprobeParams(val *ipfix.FlowProbeParams) linuxclient.PutDSL {
   293  	dsl.parent.txn.Put(models.Key(val), val)
   294  	return dsl
   295  }
   296  
   297  // FlowprobeFeature adds a request to enable Flowprobe Feature on interface.
   298  func (dsl *PutDSL) FlowprobeFeature(val *ipfix.FlowProbeFeature) linuxclient.PutDSL {
   299  	dsl.parent.txn.Put(models.Key(val), val)
   300  	return dsl
   301  }
   302  
   303  // VRRP adds a request to add an existing VPP L3 VRRP entry.
   304  func (dsl *PutDSL) VRRP(val *l3.VRRPEntry) linuxclient.PutDSL {
   305  	dsl.vppPut.VRRP(val)
   306  	return dsl
   307  }
   308  
   309  // Delete changes the DSL mode to allow removal of an existing configuration.
   310  func (dsl *PutDSL) Delete() linuxclient.DeleteDSL {
   311  	return &DeleteDSL{dsl.parent, dsl.vppPut.Delete()}
   312  }
   313  
   314  // Send propagates requested changes to the plugins.
   315  func (dsl *PutDSL) Send() vppclient.Reply {
   316  	return dsl.parent.Send()
   317  }
   318  
   319  // LinuxInterface adds a request to delete an existing Linux network
   320  // interface.
   321  func (dsl *DeleteDSL) LinuxInterface(interfaceName string) linuxclient.DeleteDSL {
   322  	dsl.parent.txn.Delete(linux_interfaces.InterfaceKey(interfaceName))
   323  	return dsl
   324  }
   325  
   326  // LinuxArpEntry adds a request to delete Linux ARP entry.
   327  func (dsl *DeleteDSL) LinuxArpEntry(ifaceName string, ipAddr string) linuxclient.DeleteDSL {
   328  	dsl.parent.txn.Delete(linux_l3.ArpKey(ifaceName, ipAddr))
   329  	return dsl
   330  }
   331  
   332  // LinuxRoute adds a request to delete Linux route.
   333  func (dsl *DeleteDSL) LinuxRoute(dstAddr, outIfaceName string) linuxclient.DeleteDSL {
   334  	dsl.parent.txn.Delete(linux_l3.RouteKey(dstAddr, outIfaceName))
   335  	return dsl
   336  }
   337  
   338  // IptablesRuleChain adds request to delete iptables rule chain.
   339  func (dsl *DeleteDSL) IptablesRuleChain(name string) linuxclient.DeleteDSL {
   340  	dsl.parent.txn.Delete(linux_iptables.RuleChainKey(name))
   341  	return dsl
   342  }
   343  
   344  // VppInterface adds a request to delete an existing VPP network interface.
   345  func (dsl *DeleteDSL) VppInterface(ifaceName string) linuxclient.DeleteDSL {
   346  	dsl.vppDelete.Interface(ifaceName)
   347  	return dsl
   348  }
   349  
   350  // Span adds a request to delete VPP SPAN.
   351  func (dsl *DeleteDSL) Span(val *interfaces.Span) linuxclient.DeleteDSL {
   352  	dsl.vppDelete.Span(val)
   353  	return dsl
   354  }
   355  
   356  // ACL adds a request to delete an existing VPP Access Control List.
   357  func (dsl *DeleteDSL) ACL(aclName string) linuxclient.DeleteDSL {
   358  	dsl.vppDelete.ACL(aclName)
   359  	return dsl
   360  }
   361  
   362  // ABF adds a request to delete an existing VPP ACL-based forwarding
   363  func (dsl *DeleteDSL) ABF(abfIndex uint32) linuxclient.DeleteDSL {
   364  	dsl.vppDelete.ABF(abfIndex)
   365  	return dsl
   366  }
   367  
   368  /*// BfdSession adds a request to delete an existing VPP bidirectional forwarding
   369  // detection session.
   370  func (dsl *DeleteDSL) BfdSession(bfdSessionIfaceName string) linuxclient.DeleteDSL {
   371  	dsl.vppDelete.BfdSession(bfdSessionIfaceName)
   372  	return dsl
   373  }
   374  
   375  // BfdAuthKeys adds a request to delete an existing VPP bidirectional forwarding
   376  // detection key.
   377  func (dsl *DeleteDSL) BfdAuthKeys(bfdKey string) linuxclient.DeleteDSL {
   378  	dsl.vppDelete.BfdAuthKeys(bfdKey)
   379  	return dsl
   380  }
   381  
   382  // BfdEchoFunction adds a request to delete an existing VPP bidirectional
   383  // forwarding detection echo function.
   384  func (dsl *DeleteDSL) BfdEchoFunction(bfdEchoName string) linuxclient.DeleteDSL {
   385  	dsl.vppDelete.BfdEchoFunction(bfdEchoName)
   386  	return dsl
   387  }*/
   388  
   389  // BD adds a request to delete an existing VPP Bridge Domain.
   390  func (dsl *DeleteDSL) BD(bdName string) linuxclient.DeleteDSL {
   391  	dsl.vppDelete.BD(bdName)
   392  	return dsl
   393  }
   394  
   395  // BDFIB adds a request to delete an existing VPP L2 Forwarding Information Base.
   396  func (dsl *DeleteDSL) BDFIB(bdName string, mac string) linuxclient.DeleteDSL {
   397  	dsl.vppDelete.BDFIB(bdName, mac)
   398  	return dsl
   399  }
   400  
   401  // XConnect adds a request to delete an existing VPP Cross Connect.
   402  func (dsl *DeleteDSL) XConnect(rxIfaceName string) linuxclient.DeleteDSL {
   403  	dsl.vppDelete.XConnect(rxIfaceName)
   404  	return dsl
   405  }
   406  
   407  // VrfTable adds a request to delete existing VPP VRF table.
   408  func (dsl *DeleteDSL) VrfTable(id uint32, proto l3.VrfTable_Protocol) linuxclient.DeleteDSL {
   409  	dsl.vppDelete.VrfTable(id, proto)
   410  	return dsl
   411  }
   412  
   413  // StaticRoute adds a request to delete an existing VPP L3 Static Route.
   414  func (dsl *DeleteDSL) StaticRoute(iface string, vrf uint32, dstAddr string, nextHopAddr string) linuxclient.DeleteDSL {
   415  	dsl.vppDelete.StaticRoute(iface, vrf, dstAddr, nextHopAddr)
   416  	return dsl
   417  }
   418  
   419  // IPScanNeighbor adds a request to delete an existing VPP L3 IP Scan Neighbor.
   420  func (dsl *DeleteDSL) IPScanNeighbor() linuxclient.DeleteDSL {
   421  	dsl.vppDelete.IPScanNeighbor()
   422  	return dsl
   423  }
   424  
   425  // Arp adds a request to delete an existing VPP L3 ARP.
   426  func (dsl *DeleteDSL) Arp(ifaceName string, ipAddr string) linuxclient.DeleteDSL {
   427  	dsl.vppDelete.Arp(ifaceName, ipAddr)
   428  	return dsl
   429  }
   430  
   431  // ProxyArp adds a request to delete an existing VPP L3 proxy ARP.
   432  func (dsl *DeleteDSL) ProxyArp() linuxclient.DeleteDSL {
   433  	dsl.vppDelete.ProxyArp()
   434  	return dsl
   435  }
   436  
   437  /*// L4Features adds a request to enable or disable L4 features
   438  func (dsl *DeleteDSL) L4Features() linuxclient.DeleteDSL {
   439  	dsl.vppDelete.L4Features()
   440  	return dsl
   441  }
   442  
   443  // AppNamespace adds a request to delete VPP Application namespace
   444  // Note: current version does not support application namespace deletion
   445  func (dsl *DeleteDSL) AppNamespace(id string) linuxclient.DeleteDSL {
   446  	dsl.vppDelete.AppNamespace(id)
   447  	return dsl
   448  }*/
   449  
   450  // StnRule adds a request to delete an existing VPP Stn rule.
   451  func (dsl *DeleteDSL) StnRule(iface, addr string) linuxclient.DeleteDSL {
   452  	dsl.vppDelete.StnRule(iface, addr)
   453  	return dsl
   454  }
   455  
   456  // NAT44Global adds a request to remove global configuration for NAT44
   457  func (dsl *DeleteDSL) NAT44Global() linuxclient.DeleteDSL {
   458  	dsl.vppDelete.NAT44Global()
   459  	return dsl
   460  }
   461  
   462  // DNAT44 adds a request to delete an existing DNAT44 configuration
   463  func (dsl *DeleteDSL) DNAT44(label string) linuxclient.DeleteDSL {
   464  	dsl.vppDelete.DNAT44(label)
   465  	return dsl
   466  }
   467  
   468  // NAT44Interface adds a request to delete NAT44 interface configuration.
   469  func (dsl *DeleteDSL) NAT44Interface(natIf *nat.Nat44Interface) linuxclient.DeleteDSL {
   470  	dsl.parent.txn.Delete(models.Key(natIf))
   471  	return dsl
   472  }
   473  
   474  // NAT44AddressPool adds a request to create or update NAT44 address pool.
   475  func (dsl *DeleteDSL) NAT44AddressPool(pool *nat.Nat44AddressPool) linuxclient.DeleteDSL {
   476  	dsl.parent.txn.Delete(models.Key(pool))
   477  	return dsl
   478  }
   479  
   480  // IPSecSA adds request to delete a Security Association
   481  func (dsl *DeleteDSL) IPSecSA(saIndex uint32) linuxclient.DeleteDSL {
   482  	dsl.vppDelete.IPSecSA(saIndex)
   483  	return dsl
   484  }
   485  
   486  // IPSecSPD adds request to delete a Security Policy Database
   487  func (dsl *DeleteDSL) IPSecSPD(spdIndex uint32) linuxclient.DeleteDSL {
   488  	dsl.vppDelete.IPSecSPD(spdIndex)
   489  	return dsl
   490  }
   491  
   492  // IPSecSP adds request to delete a Security Policy
   493  func (dsl *DeleteDSL) IPSecSP(sp *ipsec.SecurityPolicy) linuxclient.DeleteDSL {
   494  	dsl.vppDelete.IPSecSP(sp)
   495  	return dsl
   496  }
   497  
   498  // IPSecTunnelProtection adds request to delete an IPSec tunnel protection from an interface
   499  func (dsl *DeleteDSL) IPSecTunnelProtection(tp *ipsec.TunnelProtection) linuxclient.DeleteDSL {
   500  	dsl.vppDelete.IPSecTunnelProtection(tp)
   501  	return dsl
   502  }
   503  
   504  // PuntIPRedirect adds request to delete a rule used to punt L3 traffic via interface.
   505  func (dsl *DeleteDSL) PuntIPRedirect(l3Proto punt.L3Protocol, txInterface string) linuxclient.DeleteDSL {
   506  	dsl.vppDelete.PuntIPRedirect(l3Proto, txInterface)
   507  	return dsl
   508  }
   509  
   510  // PuntToHost adds request to delete a rule used to punt L4 traffic to a host.
   511  func (dsl *DeleteDSL) PuntToHost(l3Proto punt.L3Protocol, l4Proto punt.L4Protocol, port uint32) linuxclient.DeleteDSL {
   512  	dsl.vppDelete.PuntToHost(l3Proto, l4Proto, port)
   513  	return dsl
   514  }
   515  
   516  // PuntException adds request to delete exception to punt specific packets.
   517  func (dsl *DeleteDSL) PuntException(reason string) linuxclient.DeleteDSL {
   518  	dsl.parent.txn.Delete(punt.ExceptionKey(reason))
   519  	return dsl
   520  }
   521  
   522  // FlowprobeFeature adds a request to disable Flowprobe Feature on interface.
   523  func (dsl *DeleteDSL) FlowprobeFeature(val *ipfix.FlowProbeFeature) linuxclient.DeleteDSL {
   524  	dsl.parent.txn.Delete(models.Key(val))
   525  	return dsl
   526  }
   527  
   528  // Put changes the DSL mode to allow configuration editing.
   529  func (dsl *DeleteDSL) Put() linuxclient.PutDSL {
   530  	return &PutDSL{dsl.parent, dsl.vppDelete.Put()}
   531  }
   532  
   533  // Send propagates requested changes to the plugins.
   534  func (dsl *DeleteDSL) Send() vppclient.Reply {
   535  	return dsl.parent.Send()
   536  }
   537  
   538  // VRRP adds a request to delete an existing VPP L3 VRRP entry.
   539  func (dsl *DeleteDSL) VRRP(val *l3.VRRPEntry) linuxclient.DeleteDSL {
   540  	dsl.vppDelete.VRRP(val)
   541  	return dsl
   542  }