func CreateContainerWithId(netconf string, k8sName string, ip string, containerId string) (container_id, netnspath string, session *gexec.Session, contVeth netlink.Link, contAddr []netlink.Addr, contRoutes []netlink.Route, targetNs ns.NetNS, err error) {
	targetNs, container_id, netnspath, err = CreateContainerNamespaceWithCid(containerId)

	if err != nil {
		return "", "", nil, nil, nil, nil, nil, err
	}

	session, contVeth, contAddr, contRoutes, err = RunCNIPluginWithId(netconf, k8sName, ip, netnspath, container_id, targetNs)

	return
}
// Create container with the giving containerId when containerId is not empty
Create container with the giving containerId when containerId is not empty
// Create container with the giving containerId when containerId is not empty
func CreateContainerWithId(netconf string, k8sName string, ip string, containerId string) (container_id, netnspath string, session *gexec.Session, contVeth netlink.Link, contAddr []netlink.Addr, contRoutes []netlink.Route, targetNs ns.NetNS, err error) {
	targetNs, container_id, netnspath, err = CreateContainerNamespaceWithCid(containerId)
	if err != nil {
		return "", "", nil, nil, nil, nil, nil, err
	}
	session, contVeth, contAddr, contRoutes, err = RunCNIPluginWithId(netconf, k8sName, ip, netnspath, container_id, targetNs)
	return
}
func CreateContainerWithId ( netconf string , k8sName string , ip string , containerId string ) ( container_id , netnspath string , session * gexec . Session , contVeth netlink . Link , contAddr [ ] netlink . Addr , contRoutes [ ] netlink . Route , targetNs ns . NetNS , err error ) { targetNs , container_id , netnspath , err = CreateContainerNamespaceWithCid ( containerId ) if err != nil { return " " , " " , nil , nil , nil , nil , nil , err } session , contVeth , contAddr , contRoutes , err = RunCNIPluginWithId ( netconf , k8sName , ip , netnspath , container_id , targetNs ) return }
Create container with the giving containerId when containerId is not empty
Create container with the giving containerId when containerId is not empty