-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5a26cfb
commit 8086a44
Showing
7 changed files
with
62 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import os | ||
|
||
def prepare_env(): | ||
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'settings') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
from django.utils.dateparse import parse_datetime | ||
|
||
def get_awx_version(): | ||
"24.6.123" | ||
|
||
def get_awx_http_client_headers(): | ||
return { | ||
'Content-Type': 'application/json', | ||
'User-Agent': '{} {} ({})'.format('Red Hat Ansible Automation Platform', get_awx_version(), 'UNLICENSED'), | ||
} | ||
|
||
def datetime_hook(d): | ||
new_d = {} | ||
for key, value in d.items(): | ||
try: | ||
new_d[key] = parse_datetime(value) | ||
except TypeError: | ||
new_d[key] = value | ||
return new_d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from django_pglocks import advisory_lock |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/sh | ||
set -e | ||
|
||
export METRICS_UTILITY_PRICE_PER_NODE=11.55 # in USD | ||
export METRICS_UTILITY_REPORT_COMPANY_NAME="Partner A" | ||
export METRICS_UTILITY_REPORT_EMAIL="[email protected]" | ||
export METRICS_UTILITY_REPORT_END_USER_CITY="Springfield" | ||
export METRICS_UTILITY_REPORT_END_USER_COMPANY_NAME="Customer A" | ||
export METRICS_UTILITY_REPORT_END_USER_COUNTRY="US" | ||
export METRICS_UTILITY_REPORT_END_USER_STATE="TX" | ||
export METRICS_UTILITY_REPORT_H1_HEADING="CCSP NA Direct Reporting Template" | ||
export METRICS_UTILITY_REPORT_PO_NUMBER="123" | ||
export METRICS_UTILITY_REPORT_RHN_LOGIN="test_login" | ||
export METRICS_UTILITY_REPORT_SKU="MCT3752MO" | ||
export METRICS_UTILITY_REPORT_SKU_DESCRIPTION="EX: Red Hat Ansible Automation Platform, Full Support (1 Managed Node, Dedicated, Monthly)" | ||
export METRICS_UTILITY_REPORT_TYPE="CCSPv2" | ||
export METRICS_UTILITY_SHIP_PATH=./metrics_utility/test/test_data/ | ||
export METRICS_UTILITY_SHIP_TARGET=directory | ||
|
||
uv run ./manage.py build_report --month=2024-04 --force "$@" | ||
|
||
set -x | ||
ls -l metrics_utility/test/test_data/reports/2024/04/ |