HariSekhon / DevOps-Python-tools

80+ DevOps & Data CLI Tools - AWS, GCP, GCF Python Cloud Functions, Log Anonymizer, Spark, Hadoop, HBase, Hive, Impala, Linux, Docker, Spark Data Converters & Validators (Avro/Parquet/JSON/CSV/INI/XML/YAML), Travis CI, AWS CloudFormation, Elasticsearch, Solr etc.
https://www.linkedin.com/in/HariSekhon
MIT License
772 stars 340 forks source link

ambari_blueprints.py support for dots in username #6

Closed disoardi closed 5 years ago

disoardi commented 5 years ago
docker run harisekhon/pytools ambari_blueprints.py -vvv -H <myambarihost> -P 8080 --user='test.test' --password='test' --list-hosts
2019-03-14 08:12:30,710 - cli.py[__parse_timeout__:387](1) - DEBUG - getting $TIMEOUT value None
2019-03-14 08:12:30,710 - cli.py[__parse_timeout__:397](1) - DEBUG - timeout not set, using default timeout 30
2019-03-14 08:12:30,711 - utils.py[log_option:2233](1) - INFO  - timeout:  30
2019-03-14 08:12:30,711 - cli.py[timeout:254](1) - DEBUG - setting timeout to 30 secs
2019-03-14 08:12:30,711 - cli.py[main:159](1) - INFO  - Hari Sekhon ambari_blueprints.py version 0.10.2 =>  CLI version 0.9.3 =>  Utils version 0.12.2
2019-03-14 08:12:30,711 - cli.py[main:160](1) - INFO  - https://github.com/harisekhon/devops-python-tools
2019-03-14 08:12:30,711 - cli.py[main:161](1) - INFO  - verbose level: 3 (DEBUG)
2019-03-14 08:12:30,711 - utils.py[log_option:2233](1) - INFO  - timeout:  30
2019-03-14 08:12:30,712 - cli.py[main:164](1) - DEBUG - setting timeout alarm (30)
2019-03-14 08:12:30,712 - utils.py[log_option:2233](1) - INFO  - host:  <host>
2019-03-14 08:12:30,712 - utils.py[log_option:2233](1) - INFO  - port:  8080
invalid user 'test.test' defined: must be alphanumeric
HariSekhon commented 5 years ago

Thanks for raising this. It's uncommon for usernames to contain periods but I've just pushed a fix to allow this.

I've also anonymized your debug output more thoroughly (lucky for you this is github and not apache jiras which would maintain the history - you might be interested in my anonymize.py program in this repo).

Please re-open if it does not solve your issue.

Thanks

Hari

disoardi commented 5 years ago

Thanks for raising this. It's uncommon for usernames to contain periods but I've just pushed a fix to allow this.

I've also anonymized your debug output more thoroughly (lucky for you this is github and not apache jiras which would maintain the history - you might be interested in my anonymize.py program in this repo).

Please re-open if it does not solve your issue.

Thanks

Hari Ok, now it works correctly.

I used your dockerfile for test this fix and I had to add the zip package in the apt-get install line (line 36).

HariSekhon commented 5 years ago

I made sure zip was added to the permanent package list for the repo and rebuilt the docker image so that should be sorted for you too (it was there just not for all distros).