Skip to content

Commit 288ff18

Browse files
identity.v3.Endpoint: make name as optional on creation
1 parent cd37e15 commit 288ff18

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

openstack/identity/v3/endpoints/requests.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ type CreateOpts struct {
2626
Enabled *bool `json:"enabled,omitempty"`
2727

2828
// Name is the name of the Endpoint.
29-
Name string `json:"name" required:"true"`
29+
Name string `json:"name,omitempty"`
3030

3131
// Region is the region the Endpoint is located in.
3232
// This field can be omitted or left as a blank string.

openstack/identity/v3/endpoints/testing/requests_test.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ func TestCreateSuccessful(t *testing.T) {
2323
th.TestJSONRequest(t, r, `{
2424
"endpoint": {
2525
"interface": "public",
26-
"name": "the-endiest-of-points",
2726
"region": "underground",
2827
"url": "https://1.2.3.4:9000/",
2928
"service_id": "asdfasdfasdfasdf",
@@ -41,7 +40,6 @@ func TestCreateSuccessful(t *testing.T) {
4140
"links": {
4241
"self": "https://localhost:5000/v3/endpoints/12"
4342
},
44-
"name": "the-endiest-of-points",
4543
"region": "underground",
4644
"service_id": "asdfasdfasdfasdf",
4745
"url": "https://1.2.3.4:9000/",
@@ -53,7 +51,6 @@ func TestCreateSuccessful(t *testing.T) {
5351
enabled := false
5452
actual, err := endpoints.Create(context.TODO(), client.ServiceClient(fakeServer), endpoints.CreateOpts{
5553
Availability: gophercloud.AvailabilityPublic,
56-
Name: "the-endiest-of-points",
5754
Region: "underground",
5855
URL: "https://1.2.3.4:9000/",
5956
ServiceID: "asdfasdfasdfasdf",
@@ -65,7 +62,6 @@ func TestCreateSuccessful(t *testing.T) {
6562
expected := &endpoints.Endpoint{
6663
ID: "12",
6764
Availability: gophercloud.AvailabilityPublic,
68-
Name: "the-endiest-of-points",
6965
Enabled: false,
7066
Region: "underground",
7167
ServiceID: "asdfasdfasdfasdf",

0 commit comments

Comments
 (0)