This is a mechanically generated patch to complete step 1 of moving
the zuul job settings out of project-config and into each project
repository.
Because there will be a separate patch on each branch, the branch
specifiers for branch-specific jobs have been removed.
Because this patch is generated by a script, there may be some
cosmetic changes to the layout of the YAML file(s) as the contents are
normalized.
See the python3-first goal document for details:
https://governance.openstack.org/tc/goals/stein/python3-first.html
Change-Id: Ib10e1adfa6f0f6329ad310d6d7d40cc90d754312
Story: #2002586
Task: #24284
1.As mentioned in [1], we should avoid usingg
six.iteritems to achieve iterators. We can
use dict.items instead, as it will return
iterators in PY3 as well. And dict.items/keys
will more readable.
2.In py2, the performance
about list should be negligible, see the link [2].
[1]
https://wiki.openstack.org/wiki/Python3
[2]
http://lists.openstack.org/pipermail/openstack-dev/2015-June/066391.html
Change-Id: I19adc9253ce874205d12a5b5430818cbf94ed29c
* This is part of a larger issue that needs to be addressed
but for now just fixing this gets around the problem I'm
running into.
Change-Id: I0b4d7897293708181e21d9b5ef473f257bdf7f5c
If an action becomes invalid after during submit,
currently a user will get an OK response and an email stating the
completion of the action.
Now returns 400 in this case and does not send the email.
Change-Id: I4b998742cd2dfbafd40ff277a68ce9aca45b7872
* A few slight changes that threw errors during the tests
* Adds a coveragerc file which ignores a few common things that
will not be tested
Change-Id: I5c3604783dce67585ba3592e723649707549b65a
The update command of modify_dict_settings wasn't working due to
the main reset operation being to override the whole dict and not
update pointers. This has been fixed.
Additionally some basic tests the modify_dict_settings have been
added, which are more explicit.
Change-Id: I52e2157a7faeb6c4a95a06f40209aa3642d0e76c
Different versions of tox default to different base versions of
python for coverage tests.
This ensures it uses python2.7.
Change-Id: I6137c43b6383909498efae45a197ef05fc00a026
* While the incode documentation has been updated quite
a bit, the readme has remained mostly untouched for too
long and needed some updates.
* Also added some notes about deprecation of older style
taskviews that ended up never being used in production
anyway.
Change-Id: I7f21b68e1e37fec0bcba75eeccc35213c4e0a5c0
* When a token is reissued actions aren't rerun and task cache
values do not persist beyond runs (we may need to rethink that).
* This simply adds default causes for those token templates.
Change-Id: I004a2c1aac05aa5e9079b71b819f6f1dfa4bc565
* Once the interface is created, it shouldn't happen again
in the event of a rerun. Storing a flag now to avoid check
and skip if done already.
Change-Id: I71808b4e79889b6d3bd397d4fec459e7f9f07909
* Properly handling the spacing issues in some email templates.
* Adding proper cache values as needed by default templates in action
so they are set properly, and also work for reapproval.
Change-Id: I3c8f9ffce3618b9a32464efa463c3bbd57782c68
* While useful in some cases, this isn't really a standard
thing most clouds will really do and shouldn't be a default
in the example conf.
Change-Id: Ida6ef9f421749f9e83122cd4c838366ac6c84045
* 'adjutant' is taken, so renaming the package to
'python-adjutant'.
* This pypi package is needed for ease of testing plugins
as they need to import core stacktask features to run tests.
Change-Id: I08f87ee2ab2ab7ae624cf24eae5801a857681737
* Removing an old folder related to packaging
which is no longer used, and also specific
to an old way Catalyst used to package the
service.
Change-Id: I634c4ab7fd114bec51a1d1b74f67fcad02d5a9ae
* This patch is just a search and replace with minor tweaks.
* No functional changes, just renaming.
Change-Id: I103790be7c0cd9234545e25e21ab1768cb5eb131
The task only allows the current user to update their own email
address, a confirmation email is sent to the new address before
the switch.
Change-Id: I62b169d262c6455ffec96bdb29e254279e973851
Currently set up as an additional action added to the task in the
configuration file. At each stage (corresponding to the current email
section lables) a template and subject can be specified detailing
the email to be sent. This will be sent to the users email address
or otherwise an override email address set from the task.
In the configuration sending to the users email address can be
turned off with the line
email_current_user: false
Additionally an email can be sent out to a group of roles within
a project using:
email_roles:
- project_admin
Or to a number of specific emails:
email_additional_addresses:
- admin@example.org
Or to an address specified in the task cache
email_in_task_cache: true
(Cache key "additional_emails")
Change-Id: I6d454bdfefb7549322fea6cf0c91fac76b5aa89a
* If roles not present in keystone, we throw and error
while trying to handle an error.
* when data is empty we fail to return a useful error message.
Change-Id: I8572cf7ce35997cd7b5a38658a3e4eb26afe4941
Number of tasks per page can be specified in the get request,
but if not specified the endpoint will return all of them.
Change-Id: I524249bf7e9f16feba8c9beaeb66267ec7da874e
Currently even if USERNAME_IS_EMAIL=False and a username has been
specified the list of invited users will show the email as the
username, this changes it to display the username.
Change-Id: Id4491790e4035050df5be4b79cd22d60e0b03b65
Note that while all of the base stacktask codebase works with this
setting, not all of the client and horizon will work with it.
This is due to when the settings change a number of actions now
also require a username field to be filled in, and there isn't a
way for the clients to determine whether or not this is the case.
Change-Id: Ie91f7634b3686a1535af1c3344be217db5a80d15
* Updated to reflect versions currently used
* Updated Django safely to newest LTS (1.11).
All tests pass, and existing code has been
maintained with deprecation notices in expectation
of this upgrade.
* Redid the docs url because of a new version
causing an odd 500 error and because the schema
method wasn't being used properly.
Change-Id: I991f825941a240eea7a5e408a540bc38afdd91be
This decorator allows for modification of test settings that are
stored as dictionaries for that tests only without needing to
override the whole dictionary. It acts in a similar way to django's
in built override_settings, and modify_settings.
To be applied to a class the class must subclass StacktaskTestCase
or StacktaskAPITestCase. In those two classes settings can also
be modified using:
with self.modify_dict_settings(...):
# code
Example Usage:
@modify_dict_settings(ROLES_MAPPING=[
{'key_list': ['project_mod'],
'operation': 'remove',
'value': 'heat_stack_owner'},
{'key_list': ['project_admin'],
'operation': 'append',
'value': 'heat_stack_owner'},
])
or
@modify_dict_settings(PROJECT_QUOTA_SIZES={
'key_list': ['small', 'nova', 'instances'],
'operations': 'override',
'value': 11
})
Available operations:
Standard operations:
- 'override': Either overrides or adds the value to the dictionary.
- 'delete': Removes the value from the dictionary.
List operations:
List operations expect that the accessed value in the dictionary
is a list.
- 'append': Add the specified values to the end of the list
- 'prepend': Add the specifed values to the start of the list
- 'remove': Remove the specified values from the list
Change-Id: I575c17891d14418c335b2fb8426830e6e31be515
Due to more of stacktask interacting with the clients querying
about usage and deletion, the fake openstack clients have to
be updated.
Neutron cache top level key is now a region name, with the
second level being a project id.
A number of additional functions have been added to fake nova
client and fake neutron client to allow the user to query usage.
Change-Id: I3859f298b3530abaf2dc59f61d57e464f8a8a7f4
In actions pre-approve stage the function self.set_auto_approve()
can be called, to identify the action as one that is allowed to
be pre-approved. (True, False and None can be specified). If the
function has not been called when auto_approve is accessed it will
default to None. This is saved as a new attribute in the actions
model.
At the task layer before process_actions finishes, it checks to
see the status of it's actions auto_approve. If none of these are
False and at least one of them is True it will auto approve
if all of it's actions have auto_approve set to true, if so
instead of returning it it will run (and return the values of)
the approve function.
ResetPassword is the only pre-approved action that has not been
switched to this way, due to possible security implications, as
it would return 'actions invalid' if the user did not exist.
Change-Id: I678849d212b7e91de541120e0d70ddf08cf9b488
* A user cannot edit another user unless all target user
roles are a subset of editor manageable roles, not just
the roles that are being edited.
* User list now returns 'manageable' boolean to indicate
if your logged in user can edit roles of the listed user.
* Fixing an issue with mocking and test code not actually
returning correct values for 'user_list'.
* Editing ROLES_MAPPING in settings to match default conf.
Change-Id: I3720386b6dfe4465a50ded3e21b5b577f1340dbf