-
Couldn't load subscription status.
- Fork 160
Open
Description
After using modelgen to generate the go code for interacting with ovsdb I get the following errors
2023/01/21 17:47:43 database validation error (14): Mapper Error. Object type ovsmodel.CTZone contains field TimeoutPolicy (*string) ovs tag timeout_policy: Wrong type, column expects []string. Mapper Error. Object type ovsmodel.Port contains field BondActiveSlave (*string) ovs tag bond_active_slave: Wrong type, column expects []string. Mapper Error. Object type ovsmodel.Bridge contains field AutoAttach (*string) ovs tag auto_attach: Wrong type, column expects []string. Mapper Error. Object type ovsmodel.FlowTable contains field FlowLimit (*int) ovs tag flow_limit: Wrong type, column expects []int. Mapper Error. Object type ovsmodel.OpenvSwitch contains field DbVersion (*string) ovs tag db_version: Wrong type, column expects []string. Mapper Error. Object type ovsmodel.Manager contains field ConnectionMode (*string) ovs tag connection_mode: Wrong type, column expects []string. Mapper Error. Object type ovsmodel.FlowSampleCollectorSet contains field IPFIX (*string) ovs tag ipfix: Wrong type, column expects []string. Mapper Error. Object type ovsmodel.Mirror contains field OutputPort (*string) ovs tag output_port: Wrong type, column expects []string. Mapper Error. Object type ovsmodel.Interface contains field AdminState (*string) ovs tag admin_state: Wrong type, column expects []string. Mapper Error. Object type ovsmodel.Queue contains field DSCP (*int) ovs tag dscp: Wrong type, column expects []int. Mapper Error. Object type ovsmodel.Controller contains field ConnectionMode (*string) ovs tag connection_mode: Wrong type, column expects []string. Mapper Error. Object type ovsmodel.IPFIX contains field CacheActiveTimeout (*int) ovs tag cache_active_timeout: Wrong type, column expects []int. Mapper Error. Object type ovsmodel.SFlow contains field Agent (*string) ovs tag agent: Wrong type, column expects []string. Mapper Error. Object type ovsmodel.NetFlow contains field EngineID (*int) ovs tag engine_id: Wrong type, column expects []int
My code is very simple
package main
import (
"context"
"log"
generated "github.com/gavmckee80/bootstrap/ovsmodel"
"github.com/ovn-org/libovsdb/client"
//"github.com/ovn-org/libovsdb/model"
)
func main() {
dbModel, err := generated.FullDatabaseModel()
if err != nil {
log.Fatal(err)
}
ovs, err := client.NewOVSDBClient(dbModel, client.WithEndpoint("unix:/var/run/openvswitch/db.sock"))
if err != nil {
log.Fatal(err)
}
err = ovs.Connect(context.Background())
if err != nil {
log.Print(err)
}
defer ovs.Disconnect()
The db schema I used was from OVS 2.17.6 (8.3.0)
ovs-vsctl (Open vSwitch) 2.17.6
DB Schema 8.3.0
Can someone help me here?
Metadata
Metadata
Assignees
Labels
No labels