Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ type ExtraDHCPOpt struct {

// IPVersion is the IP protocol version of a single DHCP option.
// Valid value is 4 or 6. Default is 4.
IPVersion int `json:"ip_version"`
IPVersion string `json:"ip_version"`
}
8 changes: 4 additions & 4 deletions openstack/networking/v2/ports/testing/fixtures.go
Original file line number Diff line number Diff line change
Expand Up @@ -573,12 +573,12 @@ const GetWithExtraDHCPOptsResponse = `
{
"opt_name": "option1",
"opt_value": "value1",
"ip_version": 4
"ip_version": "4"
},
{
"opt_name": "option2",
"opt_value": "value2",
"ip_version": 4
"ip_version": "4"
}
],
"admin_state_up": true,
Expand Down Expand Up @@ -633,7 +633,7 @@ const CreateWithExtraDHCPOptsResponse = `
{
"opt_name": "option1",
"opt_value": "value1",
"ip_version": 4
"ip_version": "4"
}
],
"admin_state_up": true,
Expand Down Expand Up @@ -690,7 +690,7 @@ const UpdateWithExtraDHCPOptsResponse = `
{
"opt_name": "option2",
"opt_value": "value2",
"ip_version": 4
"ip_version": "4"
}
],
"admin_state_up": true,
Expand Down
8 changes: 4 additions & 4 deletions openstack/networking/v2/ports/testing/requests_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -645,10 +645,10 @@ func TestGetWithExtraDHCPOpts(t *testing.T) {

th.AssertDeepEquals(t, s.ExtraDHCPOpts[0].OptName, "option1")
th.AssertDeepEquals(t, s.ExtraDHCPOpts[0].OptValue, "value1")
th.AssertDeepEquals(t, s.ExtraDHCPOpts[0].IPVersion, 4)
th.AssertDeepEquals(t, s.ExtraDHCPOpts[0].IPVersion, "4")
th.AssertDeepEquals(t, s.ExtraDHCPOpts[1].OptName, "option2")
th.AssertDeepEquals(t, s.ExtraDHCPOpts[1].OptValue, "value2")
th.AssertDeepEquals(t, s.ExtraDHCPOpts[1].IPVersion, 4)
th.AssertDeepEquals(t, s.ExtraDHCPOpts[1].IPVersion, "4")
}

func TestCreateWithExtraDHCPOpts(t *testing.T) {
Expand Down Expand Up @@ -711,7 +711,7 @@ func TestCreateWithExtraDHCPOpts(t *testing.T) {

th.AssertDeepEquals(t, s.ExtraDHCPOpts[0].OptName, "option1")
th.AssertDeepEquals(t, s.ExtraDHCPOpts[0].OptValue, "value1")
th.AssertDeepEquals(t, s.ExtraDHCPOpts[0].IPVersion, 4)
th.AssertDeepEquals(t, s.ExtraDHCPOpts[0].IPVersion, "4")
}

func TestUpdateWithExtraDHCPOpts(t *testing.T) {
Expand Down Expand Up @@ -775,5 +775,5 @@ func TestUpdateWithExtraDHCPOpts(t *testing.T) {

th.AssertDeepEquals(t, s.ExtraDHCPOpts[0].OptName, "option2")
th.AssertDeepEquals(t, s.ExtraDHCPOpts[0].OptValue, "value2")
th.AssertDeepEquals(t, s.ExtraDHCPOpts[0].IPVersion, 4)
th.AssertDeepEquals(t, s.ExtraDHCPOpts[0].IPVersion, "4")
}