@@ -914,7 +914,7 @@ func TestAPIMutate(t *testing.T) {
914
914
{
915
915
Op : ovsdb .OperationMutate ,
916
916
Table : "Logical_Switch_Port" ,
917
- Mutations : []ovsdb.Mutation {{Column : "addresses" , Mutator : ovsdb .MutateOperationInsert , Value : testOvsSet (t , []string {"1.1.1.1" })}},
917
+ Mutations : []ovsdb.Mutation {{Column : "addresses" , Mutator : ovsdb .MutateOperationInsert , Value : testOvsSet (t , ovsdb . TypeString , ovsdb . Unlimited , []string {"1.1.1.1" })}},
918
918
Where : []ovsdb.Condition {{Column : "_uuid" , Function : ovsdb .ConditionEqual , Value : ovsdb.UUID {GoUUID : aUUID0 }}},
919
919
},
920
920
},
@@ -940,19 +940,19 @@ func TestAPIMutate(t *testing.T) {
940
940
{
941
941
Op : ovsdb .OperationMutate ,
942
942
Table : "Logical_Switch_Port" ,
943
- Mutations : []ovsdb.Mutation {{Column : "addresses" , Mutator : ovsdb .MutateOperationInsert , Value : testOvsSet (t , []string {"2.2.2.2" })}},
943
+ Mutations : []ovsdb.Mutation {{Column : "addresses" , Mutator : ovsdb .MutateOperationInsert , Value : testOvsSet (t , ovsdb . TypeString , ovsdb . Unlimited , []string {"2.2.2.2" })}},
944
944
Where : []ovsdb.Condition {{Column : "_uuid" , Function : ovsdb .ConditionEqual , Value : ovsdb.UUID {GoUUID : aUUID0 }}},
945
945
},
946
946
{
947
947
Op : ovsdb .OperationMutate ,
948
948
Table : "Logical_Switch_Port" ,
949
- Mutations : []ovsdb.Mutation {{Column : "addresses" , Mutator : ovsdb .MutateOperationInsert , Value : testOvsSet (t , []string {"2.2.2.2" })}},
949
+ Mutations : []ovsdb.Mutation {{Column : "addresses" , Mutator : ovsdb .MutateOperationInsert , Value : testOvsSet (t , ovsdb . TypeString , ovsdb . Unlimited , []string {"2.2.2.2" })}},
950
950
Where : []ovsdb.Condition {{Column : "_uuid" , Function : ovsdb .ConditionEqual , Value : ovsdb.UUID {GoUUID : aUUID1 }}},
951
951
},
952
952
{
953
953
Op : ovsdb .OperationMutate ,
954
954
Table : "Logical_Switch_Port" ,
955
- Mutations : []ovsdb.Mutation {{Column : "addresses" , Mutator : ovsdb .MutateOperationInsert , Value : testOvsSet (t , []string {"2.2.2.2" })}},
955
+ Mutations : []ovsdb.Mutation {{Column : "addresses" , Mutator : ovsdb .MutateOperationInsert , Value : testOvsSet (t , ovsdb . TypeString , ovsdb . Unlimited , []string {"2.2.2.2" })}},
956
956
Where : []ovsdb.Condition {{Column : "_uuid" , Function : ovsdb .ConditionEqual , Value : ovsdb.UUID {GoUUID : aUUID2 }}},
957
957
},
958
958
},
@@ -976,7 +976,7 @@ func TestAPIMutate(t *testing.T) {
976
976
{
977
977
Op : ovsdb .OperationMutate ,
978
978
Table : "Logical_Switch_Port" ,
979
- Mutations : []ovsdb.Mutation {{Column : "external_ids" , Mutator : ovsdb .MutateOperationDelete , Value : testOvsSet (t , []string {"foo" })}},
979
+ Mutations : []ovsdb.Mutation {{Column : "external_ids" , Mutator : ovsdb .MutateOperationDelete , Value : testOvsSet (t , ovsdb . TypeString , ovsdb . Unlimited , []string {"foo" })}},
980
980
Where : []ovsdb.Condition {{Column : "_uuid" , Function : ovsdb .ConditionEqual , Value : ovsdb.UUID {GoUUID : aUUID2 }}},
981
981
},
982
982
},
@@ -1000,7 +1000,7 @@ func TestAPIMutate(t *testing.T) {
1000
1000
{
1001
1001
Op : ovsdb .OperationMutate ,
1002
1002
Table : "Logical_Switch_Port" ,
1003
- Mutations : []ovsdb.Mutation {{Column : "external_ids" , Mutator : ovsdb .MutateOperationDelete , Value : testOvsSet (t , []string {"foo" })}},
1003
+ Mutations : []ovsdb.Mutation {{Column : "external_ids" , Mutator : ovsdb .MutateOperationDelete , Value : testOvsSet (t , ovsdb . TypeString , ovsdb . Unlimited , []string {"foo" })}},
1004
1004
Where : []ovsdb.Condition {{Column : "name" , Function : ovsdb .ConditionEqual , Value : "foo" }},
1005
1005
},
1006
1006
},
@@ -1136,10 +1136,10 @@ func TestAPIUpdate(t *testing.T) {
1136
1136
tcache := apiTestCache (t , testData )
1137
1137
1138
1138
testObj := testLogicalSwitchPort {}
1139
- testRow := ovsdb .Row (map [string ]interface {}{"type" : "somethingElse" , "tag" : testOvsSet (t , []int {6 })})
1140
- tagRow := ovsdb .Row (map [string ]interface {}{"tag" : testOvsSet (t , []int {6 })})
1139
+ testRow := ovsdb .Row (map [string ]interface {}{"type" : "somethingElse" , "tag" : testOvsSet (t , ovsdb . TypeInteger , 1 , []int {6 })})
1140
+ tagRow := ovsdb .Row (map [string ]interface {}{"tag" : testOvsSet (t , ovsdb . TypeInteger , 1 , []int {6 })})
1141
1141
var nilInt * int
1142
- testNilRow := ovsdb .Row (map [string ]interface {}{"type" : "somethingElse" , "tag" : testOvsSet (t , nilInt )})
1142
+ testNilRow := ovsdb .Row (map [string ]interface {}{"type" : "somethingElse" , "tag" : testOvsSet (t , ovsdb . TypeInteger , 1 , nilInt )})
1143
1143
typeRow := ovsdb .Row (map [string ]interface {}{"type" : "somethingElse" })
1144
1144
fields := []interface {}{& testObj .Tag , & testObj .Type }
1145
1145
@@ -1350,7 +1350,7 @@ func TestAPIUpdate(t *testing.T) {
1350
1350
Row : tagRow ,
1351
1351
Where : []ovsdb.Condition {
1352
1352
{Column : "type" , Function : ovsdb .ConditionEqual , Value : "sometype" },
1353
- {Column : "enabled" , Function : ovsdb .ConditionIncludes , Value : testOvsSet (t , & trueVal )},
1353
+ {Column : "enabled" , Function : ovsdb .ConditionIncludes , Value : testOvsSet (t , ovsdb . TypeBoolean , 1 , & trueVal )},
1354
1354
},
1355
1355
},
1356
1356
},
@@ -1403,7 +1403,7 @@ func TestAPIUpdate(t *testing.T) {
1403
1403
Op : ovsdb .OperationUpdate ,
1404
1404
Table : "Logical_Switch_Port" ,
1405
1405
Row : tagRow ,
1406
- Where : []ovsdb.Condition {{Column : "tag" , Function : ovsdb .ConditionNotEqual , Value : testOvsSet (t , & one )}},
1406
+ Where : []ovsdb.Condition {{Column : "tag" , Function : ovsdb .ConditionNotEqual , Value : testOvsSet (t , ovsdb . TypeInteger , 1 , & one )}},
1407
1407
},
1408
1408
},
1409
1409
err : false ,
@@ -1843,6 +1843,7 @@ func TestAPIWait(t *testing.T) {
1843
1843
tcache := apiTestCache (t , cache.Data {})
1844
1844
timeout0 := 0
1845
1845
1846
+ trueSet := testOvsSet (t , ovsdb .TypeBoolean , 1 , []interface {}{true })
1846
1847
test := []struct {
1847
1848
name string
1848
1849
condition func (API ) ConditionalAPI
@@ -1944,7 +1945,7 @@ func TestAPIWait(t *testing.T) {
1944
1945
{
1945
1946
Column : "up" ,
1946
1947
Function : ovsdb .ConditionNotEqual ,
1947
- Value : ovsdb. OvsSet { GoSet : [] interface {}{ true }} ,
1948
+ Value : trueSet ,
1948
1949
},
1949
1950
},
1950
1951
Until : string (ovsdb .WaitConditionNotEqual ),
0 commit comments