Skip to content

Identity v3: Users Create - #392

Merged
jrperritt merged 4 commits into
gophercloud:masterfrom
jtopjian:identity-v3-users-create
Jun 16, 2017
Merged

jrperritt merged 4 commits into
gophercloud:masterfrom
jtopjian:identity-v3-users-create

Conversation

@jtopjian

Copy link
Copy Markdown
Contributor

For #287

@jtopjian
jtopjian requested a review from jrperritt June 16, 2017 02:07
@jtopjian

Copy link
Copy Markdown
Contributor Author

With regard to how "extras" are handled here, it's hard to determine from the Keystone code. The openstack client supports setting "properties" on projects, so I used the debug output to determine that extra fields are mixed into the POST/PUT request.

This also means that I'll modify v3/projects in the future to support extra fields.

@coveralls

coveralls commented Jun 16, 2017 •

Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.02%) to 70.802% when pulling 878df2d on jtopjian:identity-v3-users-create into 35bca3f on gophercloud:master.

@jtopjian
jtopjian removed the request for review from jrperritt June 16, 2017 02:15
@jtopjian jtopjian changed the title Identity v3: Users Create [WIP] Identity v3: Users Create Jun 16, 2017
@jtopjian

Copy link
Copy Markdown
Contributor Author

Found a nit: changing Options to Option.

@jtopjian
jtopjian force-pushed the identity-v3-users-create branch from 878df2d to e5d9c69 Compare June 16, 2017 02:19
@jtopjian
jtopjian requested a review from jrperritt June 16, 2017 02:20
@jtopjian jtopjian changed the title [WIP] Identity v3: Users Create Identity v3: Users Create Jun 16, 2017
Comment thread openstack/identity/v3/users/requests.go Outdated
// Extra are free-form extra key/value pairs to describe the user.
Extra map[string]interface{} `json:"-"`

// Options are coded 4-character options defined by the API.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does "coded 4-character options" mean?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're too quick :)

Yes, I'll fix this. In the Keystone code, these are actually stored as 4-character codes. But then I found out that the readable-name is used and forgot to change this.

Comment thread openstack/identity/v3/users/requests.go Outdated
Extra map[string]interface{} `json:"-"`

// Options are coded 4-character options defined by the API.
Options map[Options]interface{} `json:"options,omitempty"`

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this map's value type an interface only because of MultiFactorAuthRules?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, otherwise it would have been strict bool.

"password": "secretsecret",
"email": "[email protected]",
"options": {
"ignore_password_expiry": true

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's have at least the non-boolean option in here as an example.

@coveralls

coveralls commented Jun 16, 2017 •

Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.02%) to 70.802% when pulling e5d9c69 on jtopjian:identity-v3-users-create into 35bca3f on gophercloud:master.

@coveralls

coveralls commented Jun 16, 2017 •

Copy link
Copy Markdown

Coverage Status

Coverage decreased (-0.09%) to 70.692% when pulling 6d35e24 on jtopjian:identity-v3-users-create into 35bca3f on gophercloud:master.

@jrperritt

Copy link
Copy Markdown
Contributor

LGTM

@jrperritt
jrperritt merged commit d2f0054 into gophercloud:master Jun 16, 2017
@jtopjian

Copy link
Copy Markdown
Contributor Author

Thanks!

@jtopjian jtopjian mentioned this pull request Jun 16, 2017
4 tasks done
j-griffith pushed a commit to j-griffith/gophercloud that referenced this pull request Jul 15, 2017
* Identity v3: Users Create

* Identity v3: Users Create unit tests

* Identity v3: Users Create acceptance tests

* Identity v3 Users: code review updates
@jtopjian
jtopjian deleted the identity-v3-users-create branch April 24, 2018 03:12
msheikh-wind pushed a commit to msheikh-wind/gophercloud that referenced this pull request May 19, 2025
Unit test cases for host controller
- Test cases written for utility funcitons in host controller
- Test coverage for host_controller_test.go is 46.7%

Signed-off-by: vineela-pachchipulusu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants