@@ -68,6 +68,7 @@ func (c *CniService) Init(serverCloseChan chan struct{}) error {
6868 return nil
6969}
7070
71+ // SetupWorkload sets up the network for the workload
7172func (c * CniService ) SetupWorkload (cniInfo cniapi.CniInfo ) (
7273 ep client.EndpointInfo ,
7374 retErr error ,
@@ -116,6 +117,7 @@ func (c *CniService) SetupWorkload(cniInfo cniapi.CniInfo) (
116117 return ep , nil
117118}
118119
120+ // TearDownWorkload tears the networking of the workload
119121func (c * CniService ) TearDownWorkload (cniInfo cniapi.CniInfo ) error {
120122 cniMetadata , err := c .getMetadataFromStore (cniInfo )
121123 if err != nil {
@@ -154,7 +156,7 @@ func (c *CniService) putMetadataToStore(cniInfo cniapi.CniInfo,
154156 ContainerID : cniInfo .ContainerID ,
155157 SandboxID : sbID ,
156158 EndpointID : epID ,
157- SandboxMeta : CopySandboxMetadata (sbConfig , cniInfo .NetNS ),
159+ SandboxMeta : copySandboxMetadata (sbConfig , cniInfo .NetNS ),
158160 }
159161 store := c .getstore ()
160162 if store == nil {
@@ -274,7 +276,7 @@ func createNetwork(netConf cniapi.NetworkConf) error {
274276 log .Infof ("Creating network %+v \n " , netConf )
275277 driverOpts := make (map [string ]string )
276278 driverOpts ["hostaccess" ] = ""
277- nc := client.NetworkCreate {Name : netConf .Name , ID : netConf .Name , NetworkType : GetNetworkType (netConf .Name ),
279+ nc := client.NetworkCreate {Name : netConf .Name , ID : netConf .Name , NetworkType : getNetworkType (netConf .Name ),
278280 DriverOpts : driverOpts }
279281 if ipam := netConf .IPAM ; ipam != nil {
280282 cfg := client.IPAMConf {}
0 commit comments