Switch this patch to simply make commonOpts public
diff --git a/openstack/identity/v2/users/requests.go b/openstack/identity/v2/users/requests.go
index d3ab134..c462e8c 100644
--- a/openstack/identity/v2/users/requests.go
+++ b/openstack/identity/v2/users/requests.go
@@ -28,7 +28,7 @@
Disabled EnabledState = &iFalse
)
-type CreateOpts struct {
+type CommonOpts struct {
// Either a name or username is required. When provided, the value must be
// unique or a 409 conflict error will be returned. If you provide a name but
// omit a username, the latter will be set to the former; and vice versa.
@@ -44,6 +44,9 @@
Email string
}
+// CreateOpts represents the options needed when creating new users.
+type CreateOpts CommonOpts
+
// CreateOptsBuilder describes struct types that can be accepted by the Create call.
type CreateOptsBuilder interface {
ToUserCreateMap() (map[string]interface{}, error)
@@ -114,23 +117,8 @@
ToUserUpdateMap() map[string]interface{}
}
-// UpdateOpts specifies the base attributes that may be updated on an existing
-// server.
-type UpdateOpts struct {
- // Either a name or username is required. When provided, the value must be
- // unique or a 409 conflict error will be returned. If you provide a name but
- // omit a username, the latter will be set to the former; and vice versa.
- Name, Username string
-
- // The ID of the tenant to which you want to assign this user.
- TenantID string
-
- // Indicates whether this user is enabled or not.
- Enabled EnabledState
-
- // The email address of this user.
- Email string
-}
+// UpdateOpts specifies the base attributes that may be updated on an existing server.
+type UpdateOpts CommonOpts
// ToUserUpdateMap formats an UpdateOpts structure into a request body.
func (opts UpdateOpts) ToUserUpdateMap() map[string]interface{} {