Issue Number | 4809 |
---|---|
Summary | Change populate-Drupal-cms.py Script |
Created | 2020-04-13 17:05:15 |
Issue Type | Improvement |
Submitted By | Englisch, Volker (NIH/NCI) [C] |
Assigned To | Kline, Bob (NIH/NCI) [C] |
Status | Closed |
Resolved | 2020-04-20 17:42:55 |
Resolution | Fixed |
Path | /home/bkline/backups/jira/ocecdr/issue.260149 |
The script to populate the Drupal CMS servers allows for several optional command line parameters to be specified. One of those options, however, should never be left off if the script is run on the PROD tier.
Please ensure that the "--keep" option will always be specified when run on PROD.
Installed on DEV.
$ ./populate-drupal-cms.py --help
usage: populate-drupal-cms.py [-h] --session SESSION [--tier TIER]
[--base BASE] [--password PASSWORD]
[--dumpfile DUMPFILE] [--keep] [--level LEVEL]
optional arguments:
-h, --help show this help message and exit
--session SESSION CDR login key
--tier TIER publish from another tier
--base BASE override base URL for Drupal site
--password PASSWORD override password for PDQ account
--dumpfile DUMPFILE where to store serialized docs
--keep don't drop existing PDQ content (REQUIRED ON
PRODUCTION)
--level LEVEL how much to log
$ ./populate-drupal-cms.py --tier PROD --session 5E9E16C2-90E5CC-002-KPUR0GC7F4G0
Traceback (most recent call last):
File "./populate-drupal-cms.py", line 42, in <module>
raise Exception("** CANNOT DROP EXISTING PDQ CONTENT ON PROD! **")
Exception: ** CANNOT DROP EXISTING PDQ CONTENT ON PROD! **
The options have been rewritten (from --keep to --drop) to ensure the documents aren't dropped by default and the option is not available on PROD.
Elapsed: 0:00:00.001498