Skip to content
This repository was archived by the owner on Aug 1, 2023. It is now read-only.

Commit b02c75b

Browse files
author
Travis Truman
committed
Passing acceptance test
1 parent 0447aca commit b02c75b

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

acceptance/openstack/networking/v2/port_test.go

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,13 @@ func TestPortCRUD(t *testing.T) {
4545
th.AssertEquals(t, p.ID, portID)
4646

4747
// Update port
48-
p, err = ports.Update(Client, portID, ports.UpdateOpts{Name: "new_port_name"}).Extract()
48+
updateOpts := ports.UpdateOpts{
49+
Name: "new_port_name",
50+
AllowedAddressPairs: []ports.AddressPair{
51+
ports.AddressPair{IPAddress: "192.168.199.201"},
52+
},
53+
}
54+
p, err = ports.Update(Client, portID, updateOpts).Extract()
4955
th.AssertNoErr(t, err)
5056
th.AssertEquals(t, p.Name, "new_port_name")
5157

@@ -108,6 +114,9 @@ func createSubnet(networkID string) (string, error) {
108114
IPVersion: subnets.IPv4,
109115
Name: "my_subnet",
110116
EnableDHCP: subnets.Down,
117+
AllocationPools: []subnets.AllocationPool{
118+
subnets.AllocationPool{Start: "192.168.199.2", End: "192.168.199.200"},
119+
},
111120
}).Extract()
112121
return s.ID, err
113122
}

openstack/networking/v2/ports/results.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ type IP struct {
5353

5454
type AddressPair struct {
5555
IPAddress string `mapstructure:"ip_address" json:"ip_address,omitempty"`
56-
MACAddress string `mapstructure:"mac_address" json:"mac_address"`
56+
MACAddress string `mapstructure:"mac_address" json:"mac_address,omitempty"`
5757
}
5858

5959
// Port represents a Neutron port. See package documentation for a top-level

0 commit comments

Comments
 (0)