// Call by higher layers to create the plugin instance func NewPlugin(pluginType string, osClient *osclient.Client, kClient *kclient.Client, hostname string, selfIP string, ready chan struct{}) (api.OsdnPlugin, oskserver.FilteringEndpointsConfigHandler, error) { switch strings.ToLower(pluginType) { case ovs.SingleTenantPluginName(): return ovs.CreatePlugin(osdn.NewRegistry(osClient, kClient), false, hostname, selfIP, ready) case ovs.MultiTenantPluginName(): return ovs.CreatePlugin(osdn.NewRegistry(osClient, kClient), true, hostname, selfIP, ready) } return nil, nil, nil }
func newPlugin(pluginType string, osClient *osclient.Client, kClient *kclient.Client, hostname string, selfIP string) (api.OsdnPlugin, error) { switch strings.ToLower(pluginType) { case ovs.SingleTenantPluginName: return ovs.CreatePlugin(osdn.NewRegistry(osClient, kClient), false, hostname, selfIP) case ovs.MultiTenantPluginName: return ovs.CreatePlugin(osdn.NewRegistry(osClient, kClient), true, hostname, selfIP) } return nil, nil }
func newPlugin(pluginName string, osClient *osclient.Client, kClient *kclient.Client, hostname string, selfIP string, iptablesSyncPeriod time.Duration) (api.OsdnPlugin, error) { switch strings.ToLower(pluginName) { case ovs.SingleTenantPluginName, ovs.MultiTenantPluginName: return ovs.CreatePlugin(osdn.NewRegistry(osClient, kClient), pluginName, hostname, selfIP, iptablesSyncPeriod) } return nil, nil }