Remove second script, modify first

This commit is contained in:
zandercymatics 2025-01-07 08:42:56 -07:00
parent ca9a40caaf
commit 2c5c9de6dc
No known key found for this signature in database
GPG key ID: FF4636ABEC9682B7
4 changed files with 24 additions and 188 deletions

View file

@ -919,36 +919,3 @@ Example (only requests): `./manage.py create_federal_portfolio --branch "executi
- Parameters #2-#3, you cannot use `--both` while using these. You must specify either `--parse_requests` or `--parse_domains` seperately. While all of these parameters are optional in that you do not need to specify all of them,
you must specify at least one to run this script.
## Populate requested suborg
This script populates the "requested suborganization" fields on DomainRequest.
These fields are: requested_suborganization, suborganization_city, suborganization_state_territory.
This is done by pulling from organization_name, city, and state_territory.
The script will only parse records with a portfolio but no suborganization attached to it.
Additionally, it will not parse records wherein the organization name matches the portfolio org name.
### Running on sandboxes
#### Step 1: Login to CloudFoundry
```cf login -a api.fr.cloud.gov --sso```
#### Step 2: SSH into your environment
```cf ssh getgov-{space}```
Example: `cf ssh getgov-za`
#### Step 3: Create a shell instance
```/tmp/lifecycle/shell```
#### Step 4: Upload your csv to the desired sandbox
[Follow these steps](#use-scp-to-transfer-data-to-sandboxes) to upload the federal_cio csv to a sandbox of your choice.
#### Step 5: Running the script
To create a specific portfolio:
```./manage.py populate_requested_suborg```
### Running locally
#### Step 1: Running the script
```docker-compose exec app ./manage.py populate_requested_suborg```