@@ -1419,28 +1419,28 @@ func mustVerifyFlowBundle(t *testing.T, stdin io.Reader, flows []*Flow, matchFlo
14191419func TestClientOpenFlowDumpPortMappingsOK (t * testing.T ) {
14201420 want := map [string ]* PortMapping {
14211421 "interface1" : {
1422- OfPort : 7 ,
1423- MACAddress : "fe:4f:76:09:88:2b" ,
1422+ ofPort : 7 ,
1423+ macAddress : "fe:4f:76:09:88:2b" ,
14241424 },
14251425 "interface2" : {
1426- OfPort : 8 ,
1427- MACAddress : "fe:be:7b:0d:53:d8" ,
1426+ ofPort : 8 ,
1427+ macAddress : "fe:be:7b:0d:53:d8" ,
14281428 },
14291429 "interface3" : {
1430- OfPort : 9 ,
1431- MACAddress : "fe:b6:4c:d5:40:79" ,
1430+ ofPort : 9 ,
1431+ macAddress : "fe:b6:4c:d5:40:79" ,
14321432 },
14331433 "interface4" : {
1434- OfPort : 20 ,
1435- MACAddress : "fe:cf:a6:90:30:29" ,
1434+ ofPort : 20 ,
1435+ macAddress : "fe:cf:a6:90:30:29" ,
14361436 },
14371437 "LOCAL" : {
1438- OfPort : 65534 ,
1439- MACAddress : "fe:74:0f:80:cf:9a" ,
1438+ ofPort : 65534 ,
1439+ macAddress : "fe:74:0f:80:cf:9a" ,
14401440 },
14411441 "eth0" : {
1442- OfPort : 1 ,
1443- MACAddress : "aa:bb:cc:dd:ee:ff" ,
1442+ ofPort : 1 ,
1443+ macAddress : "aa:bb:cc:dd:ee:ff" ,
14441444 },
14451445 }
14461446
@@ -1511,14 +1511,14 @@ actions: output enqueue set_vlan_vid set_vlan_pcp strip_vlan mod_dl_src mod_dl_d
15111511 t .Fatalf ("missing mapping for interface %q" , name )
15121512 }
15131513
1514- if wantMapping .OfPort != gotMapping .OfPort {
1515- t .Fatalf ("unexpected OfPort for %q:\n - want: %d\n - got: %d" ,
1516- name , wantMapping .OfPort , gotMapping .OfPort )
1514+ if wantMapping .ofPort != gotMapping .ofPort {
1515+ t .Fatalf ("unexpected ofPort for %q:\n - want: %d\n - got: %d" ,
1516+ name , wantMapping .ofPort , gotMapping .ofPort )
15171517 }
15181518
1519- if wantMapping .MACAddress != gotMapping .MACAddress {
1520- t .Fatalf ("unexpected MACAddress for %q:\n - want: %q\n - got: %q" ,
1521- name , wantMapping .MACAddress , gotMapping .MACAddress )
1519+ if wantMapping .macAddress != gotMapping .macAddress {
1520+ t .Fatalf ("unexpected macAddress for %q:\n - want: %q\n - got: %q" ,
1521+ name , wantMapping .macAddress , gotMapping .macAddress )
15221522 }
15231523 }
15241524
@@ -1548,12 +1548,12 @@ func TestClientOpenFlowDumpPortMappingsEmptyOutput(t *testing.T) {
15481548func TestClientOpenFlowDumpPortMappingsAllInterfaces (t * testing.T ) {
15491549 want := map [string ]* PortMapping {
15501550 "eth0" : {
1551- OfPort : 1 ,
1552- MACAddress : "aa:bb:cc:dd:ee:ff" ,
1551+ ofPort : 1 ,
1552+ macAddress : "aa:bb:cc:dd:ee:ff" ,
15531553 },
15541554 "eth1" : {
1555- OfPort : 2 ,
1556- MACAddress : "11:22:33:44:55:66" ,
1555+ ofPort : 2 ,
1556+ macAddress : "11:22:33:44:55:66" ,
15571557 },
15581558 }
15591559
@@ -1582,14 +1582,14 @@ OFPT_FEATURES_REPLY (xid=0x2): dpid:0000000000000001
15821582 t .Fatalf ("missing mapping for interface %q" , name )
15831583 }
15841584
1585- if wantMapping .OfPort != gotMapping .OfPort {
1586- t .Fatalf ("unexpected OfPort for %q:\n - want: %d\n - got: %d" ,
1587- name , wantMapping .OfPort , gotMapping .OfPort )
1585+ if wantMapping .ofPort != gotMapping .ofPort {
1586+ t .Fatalf ("unexpected ofPort for %q:\n - want: %d\n - got: %d" ,
1587+ name , wantMapping .ofPort , gotMapping .ofPort )
15881588 }
15891589
1590- if wantMapping .MACAddress != gotMapping .MACAddress {
1591- t .Fatalf ("unexpected MACAddress for %q:\n - want: %q\n - got: %q" ,
1592- name , wantMapping .MACAddress , gotMapping .MACAddress )
1590+ if wantMapping .macAddress != gotMapping .macAddress {
1591+ t .Fatalf ("unexpected macAddress for %q:\n - want: %q\n - got: %q" ,
1592+ name , wantMapping .macAddress , gotMapping .macAddress )
15931593 }
15941594 }
15951595}
@@ -1605,8 +1605,8 @@ func TestClientOpenFlowDumpPortMappingsForInterface(t *testing.T) {
16051605 name : "LOCAL interface" ,
16061606 interfaceName : "LOCAL" ,
16071607 want : & PortMapping {
1608- OfPort : 65534 ,
1609- MACAddress : "fe:74:0f:80:cf:9a" ,
1608+ ofPort : 65534 ,
1609+ macAddress : "fe:74:0f:80:cf:9a" ,
16101610 },
16111611 output : `
16121612OFPT_FEATURES_REPLY (xid=0x2): dpid:0000000000000001
@@ -1617,8 +1617,8 @@ OFPT_FEATURES_REPLY (xid=0x2): dpid:0000000000000001
16171617 name : "interface1" ,
16181618 interfaceName : "interface1" ,
16191619 want : & PortMapping {
1620- OfPort : 7 ,
1621- MACAddress : "fe:4f:76:09:88:2b" ,
1620+ ofPort : 7 ,
1621+ macAddress : "fe:4f:76:09:88:2b" ,
16221622 },
16231623 output : `
16241624OFPT_FEATURES_REPLY (xid=0x2): dpid:0000000000000001
@@ -1645,14 +1645,14 @@ OFPT_FEATURES_REPLY (xid=0x2): dpid:0000000000000001
16451645 t .Fatalf ("missing mapping for interface %q" , tt .interfaceName )
16461646 }
16471647
1648- if tt .want .OfPort != gotMapping .OfPort {
1649- t .Fatalf ("unexpected OfPort for %q:\n - want: %d\n - got: %d" ,
1650- tt .interfaceName , tt .want .OfPort , gotMapping .OfPort )
1648+ if tt .want .ofPort != gotMapping .ofPort {
1649+ t .Fatalf ("unexpected ofPort for %q:\n - want: %d\n - got: %d" ,
1650+ tt .interfaceName , tt .want .ofPort , gotMapping .ofPort )
16511651 }
16521652
1653- if tt .want .MACAddress != gotMapping .MACAddress {
1654- t .Fatalf ("unexpected MACAddress for %q:\n - want: %q\n - got: %q" ,
1655- tt .interfaceName , tt .want .MACAddress , gotMapping .MACAddress )
1653+ if tt .want .macAddress != gotMapping .macAddress {
1654+ t .Fatalf ("unexpected macAddress for %q:\n - want: %q\n - got: %q" ,
1655+ tt .interfaceName , tt .want .macAddress , gotMapping .macAddress )
16561656 }
16571657 })
16581658 }
@@ -1689,8 +1689,8 @@ func TestClientOpenFlowDumpPortMapping(t *testing.T) {
16891689 name : "successful retrieval" ,
16901690 interfaceName : "interface1" ,
16911691 want : & PortMapping {
1692- OfPort : 7 ,
1693- MACAddress : "fe:4f:76:09:88:2b" ,
1692+ ofPort : 7 ,
1693+ macAddress : "fe:4f:76:09:88:2b" ,
16941694 },
16951695 output : `
16961696OFPT_FEATURES_REPLY (xid=0x2): dpid:0000000000000001
@@ -1713,8 +1713,8 @@ OFPT_FEATURES_REPLY (xid=0x2): dpid:0000000000000001
17131713 name : "LOCAL interface" ,
17141714 interfaceName : "LOCAL" ,
17151715 want : & PortMapping {
1716- OfPort : 65534 ,
1717- MACAddress : "fe:74:0f:80:cf:9a" ,
1716+ ofPort : 65534 ,
1717+ macAddress : "fe:74:0f:80:cf:9a" ,
17181718 },
17191719 output : `
17201720OFPT_FEATURES_REPLY (xid=0x2): dpid:0000000000000001
@@ -1747,14 +1747,14 @@ OFPT_FEATURES_REPLY (xid=0x2): dpid:0000000000000001
17471747 t .Fatalf ("unexpected error: %v" , err )
17481748 }
17491749
1750- if tt .want .OfPort != got .OfPort {
1751- t .Fatalf ("unexpected OfPort :\n - want: %d\n - got: %d" ,
1752- tt .want .OfPort , got .OfPort )
1750+ if tt .want .ofPort != got .ofPort {
1751+ t .Fatalf ("unexpected ofPort :\n - want: %d\n - got: %d" ,
1752+ tt .want .ofPort , got .ofPort )
17531753 }
17541754
1755- if tt .want .MACAddress != got .MACAddress {
1756- t .Fatalf ("unexpected MACAddress :\n - want: %q\n - got: %q" ,
1757- tt .want .MACAddress , got .MACAddress )
1755+ if tt .want .macAddress != got .macAddress {
1756+ t .Fatalf ("unexpected macAddress :\n - want: %q\n - got: %q" ,
1757+ tt .want .macAddress , got .macAddress )
17581758 }
17591759 })
17601760 }
0 commit comments