1443 Commits

Author SHA1 Message Date
tomdds
ccbc61f34f
Merge branch 'staging' into azure-initial-mgmt-grp 2020-02-10 17:44:19 -05:00
tomdds
6c0bc0dc47
Merge branch 'staging' into fix-kv-secret-update 2020-02-10 17:19:10 -05:00
tomdds
0705b47e4d
Merge branch 'staging' into fix-kv-secret-update 2020-02-10 17:04:11 -05:00
dandds
f0ddc9b2aa
Merge branch 'staging' into redis-ssl-verify 2020-02-10 17:02:26 -05:00
dandds
f975249f07 Set Redis verification mode for TLS connections.
If the app is making a TLS connection to Redis, the new config setting
REDIS_SSLMODE determines whether CA verification should be performed.
Acceptable values are Python `None` or strings "none", "optional", and
"required".
2020-02-10 16:58:07 -05:00
tomdds
e6d5369cb0 Ensure credential updates properly merge values.
Previously updating the credentials would delete values from the existing crednetials if they weren't also present in the update. This adds a method for merging credentials to the KeyVaultCredentials model and adds tests to both the cloud provider and model.
2020-02-10 16:14:42 -05:00
graham-dds
5b60a54dbc Remove fixture-based reporting methods
These methods probably can be reused to handle real Azure reporting data
2020-02-10 14:49:04 -05:00
graham-dds
63cb05249f Add Reports domain method to get portfolio spend 2020-02-10 14:49:04 -05:00
graham-dds
2f1c57aef4 Add fn to prepare Azure reporting data for views 2020-02-10 14:49:04 -05:00
leigh-mil
903f5ca33b Add todo about fixing tests 2020-02-06 13:07:46 -05:00
leigh-mil
b2da9de040 Log error when sending email fails. Wrap recipients in a list instead of putting the logic inside Mailer _build_message(). 2020-02-06 13:07:46 -05:00
leigh-mil
0f69a48bbe Refactor to catch errors and not update TaskOrder.pdf_last_sent_at unless the email has been sent. Add tests for failure cases 2020-02-06 13:07:46 -05:00
leigh-mil
0af29f485e Add celery task for finding unsent TO and sending them to Microsoft 2020-02-06 13:07:46 -05:00
93840ac7b8 revert local changes 2020-02-06 12:29:54 -05:00
86c01f6987 provision initial mgmt group migration script 2020-02-06 12:11:04 -05:00
leigh-mil
6ec9fb34f9 Add query for finding Task Orders that have not been sent to MS or that have been updated. 2020-02-06 12:04:13 -05:00
eb4201d6e3 correct data class name 2020-02-06 11:26:08 -05:00
7559875d64 resolve conflict with staging 2020-02-06 10:19:47 -05:00
6420cce4fc initial mgmt group stage data classes extend the management group data class 2020-02-06 10:13:27 -05:00
tomdds
13aca270ca Remove unused code in both the cloud interfaces and environment models. Also add tests for some untested code in the cloud interface. 2020-02-05 14:48:54 -05:00
38e92e427b resolve conflict with staging 2020-02-05 12:21:00 -05:00
tomdds
aaa4b401b5 Fix LGTM issues 2020-02-04 17:42:08 -05:00
tomdds
350e648beb Added tests for get and set secret 2020-02-04 17:39:31 -05:00
tomdds
e702c42fa5 Merge branch 'staging' into environment-mgmt-grp-provisioning 2020-02-04 17:05:24 -05:00
tomdds
4d11f7217e Add missing test for create_principal_admin_role 2020-02-04 16:43:06 -05:00
graham-dds
ff842f5051 Add cloud method to get reporting data
Adds a method to `azure_cloud_provider` to query the Cost Management API
for usage data per invoice.  For now, this query is relatively static.
We're always calling the API at the billing invoice section scope,
with the widest timeframe possible (one year), and with the same
requested dataset. As the scope of the application's reporting needs
changes, this function may change to be more general and/or revert back
to the SDK.
2020-02-04 16:07:06 -05:00
tomdds
ca4feaa403 post-rebase fixes 2020-02-04 15:39:03 -05:00
tomdds
1a7db62dac Remove Environment level user provisioning 2020-02-04 15:22:34 -05:00
tomdds
17ec944ad5 Update environment queries to look for app provisioning completion as well 2020-02-04 15:22:34 -05:00
tomdds
bcb552134b Update tests for environment management group provisioning 2020-02-04 15:21:41 -05:00
1378fcfc15 merge conflict 2020-02-04 15:21:27 -05:00
dandds
05f6b36ece Update SQL query to find pending portfolios.
The query to find portfolios that are pending provisioning is updated to
check for:

- a period of performance that has started
- a portfolio state machine that has an UNSTARTED or one of the CREATED
  states

I left several TODOs to ensure that the orchestration functions
correctly for portfolio.
2020-02-04 10:16:02 -05:00
8c5f532ca1 azure initial management group creation 2020-02-04 08:09:24 -05:00
dandds
bb7cbf00cd Add microsoft domain to AAD user names. 2020-02-03 11:17:42 -05:00
dandds
6b8d9d1d65 Celery wrapper for creating a user. 2020-02-02 14:42:44 -05:00
dandds
cc28f53999 Function for claiming multiple resources at once.
Like claim_for_update, the claim_many_for_update claims resources with
an expiring lock. This was written to allow the updating of multiple
application roles with a single cloud_id, since multiple application
roles will map to a single Azure Active Directory user.
2020-02-02 14:19:13 -05:00
dandds
1b45502fe5 SQLAlchemy query for finding ApplicationRoles ready for provisioning.
This adds a query method to return the IDs of the application roles that
should be provisioned as users in Azure. We will provision one Azure
Active Directory user per ATAT user in a portfolio, meaning that one AAD
user might correspond to multiple application roles under a single
portfolio. The query method returns IDs in a nested list grouped by
portfolio and user because of this.

add method for getting app roles that are pending creation

update application_roles query to group by portfolio

check for user existing and role status correct when filtering ApplicationRole for creation
2020-02-02 14:03:17 -05:00
tomdds
61e891258b Merge branch 'staging' into azure-subscriptions 2020-01-31 17:00:43 -05:00
tomdds
6952a533e2
Merge branch 'staging' into product-purchase-provisioning 2020-01-31 15:50:31 -05:00
tomdds
bbed83d897 Update AADP Purchase url and respose format to newer schema. 2020-01-31 15:50:10 -05:00
tomdds
53dcb94046
Merge branch 'staging' into azure-subscriptions 2020-01-31 15:43:08 -05:00
tomdds
9acbeeb824 Add display name to subscription creation payload
Also extracts environment -> subscription payload construction to it's own method.
2020-01-31 14:42:38 -05:00
tomdds
670e135a0e
Merge branch 'staging' into azure-subscriptions 2020-01-31 14:41:39 -05:00
graham-dds
e32e211966 Make Upload related classes more generic
Renames Python classes that refer to Upload to something to FileService.
We added this change because these classes now handle downloading as
well as uploading.
2020-01-31 13:17:00 -05:00
graham-dds
a7770d8a6a Add method to download TOs from Azure 2020-01-31 13:17:00 -05:00
graham-dds
00a5a98577 Add Mailer class method to email TOs to MSFT 2020-01-31 13:17:00 -05:00
tomdds
ba84b92795
Merge branch 'staging' into product-purchase-provisioning 2020-01-31 13:13:07 -05:00
leigh-mil
dff9924c95 Make file size limit configurable 2020-01-31 11:59:07 -05:00
tomdds
6b8ea41925 Make AADP purchase quantity configurable
Also remove a few constant params from the payload model.
2020-01-30 22:12:28 -05:00
29b69a7d5d code formatting 2020-01-30 16:50:32 -05:00