-
Notifications
You must be signed in to change notification settings - Fork 4.7k
/
singletenant.go
48 lines (35 loc) · 1.08 KB
/
singletenant.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
package plugin
import (
osapi "github.com/openshift/origin/pkg/sdn/apis/network"
)
type singleTenantPlugin struct{}
func NewSingleTenantPlugin() osdnPolicy {
return &singleTenantPlugin{}
}
func (sp *singleTenantPlugin) Name() string {
return osapi.SingleTenantPluginName
}
func (sp *singleTenantPlugin) Start(node *OsdnNode) error {
otx := node.oc.NewTransaction()
otx.AddFlow("table=80, priority=200, actions=output:NXM_NX_REG2[]")
return otx.EndTransaction()
}
func (sp *singleTenantPlugin) AddNetNamespace(netns *osapi.NetNamespace) {
}
func (sp *singleTenantPlugin) UpdateNetNamespace(netns *osapi.NetNamespace, oldNetID uint32) {
}
func (sp *singleTenantPlugin) DeleteNetNamespace(netns *osapi.NetNamespace) {
}
func (sp *singleTenantPlugin) GetVNID(namespace string) (uint32, error) {
return 0, nil
}
func (sp *singleTenantPlugin) GetNamespaces(vnid uint32) []string {
return nil
}
func (sp *singleTenantPlugin) GetMulticastEnabled(vnid uint32) bool {
return false
}
func (sp *singleTenantPlugin) EnsureVNIDRules(vnid uint32) {
}
func (sp *singleTenantPlugin) SyncVNIDRules() {
}