-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
outcalls: auto generate name to improve multi-tenancy #402
base: master
Are you sure you want to change the base?
Conversation
Build failed.
|
298f8e5
to
97549ab
Compare
Build failed.
|
Build succeeded.
|
26fe1c3
to
045c899
Compare
Build succeeded.
|
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
@@ -40,6 +44,18 @@ class OutcallSchema(BaseSchema): | |||
dump_only=True, | |||
) | |||
|
|||
# DEPRECATED 23.10 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# DEPRECATED 23.10 | |
# DEPRECATED 23.11 |
# Outcalls do not use UUIDs yet | ||
form['name'] = self.outcall_name_fmt.format( | ||
tenant_slug=tenant.slug, | ||
outcall_uuid=uuid4(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same comment as: #401 (comment)
About adding uuid in database
yield s.check_bogus_field_returns_error, url, 'name', True | ||
yield s.check_bogus_field_returns_error, url, 'name', None | ||
yield s.check_bogus_field_returns_error, url, 'name', s.random_string(129) | ||
yield s.check_bogus_field_returns_error, url, 'name', 1234 | ||
yield s.check_bogus_field_returns_error, url, 'name', [] | ||
yield s.check_bogus_field_returns_error, url, 'name', {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same comment as #401 (comment)
about testing deprecated name
@@ -15,5 +14,4 @@ def build_validator(): | |||
create=[ | |||
UniqueField('name', lambda name: outcall_dao.find_by(name=name), 'Outcall') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would remove this validator too, since the input does not come from the user anymore
Depends-On: wazo-platform/xivo-manage-db#207
Depends-On: wazo-platform/xivo-dao#228