Skip to content

Commit

Permalink
Merge pull request #284 from netscaler/v2.0.0-alpha-local
Browse files Browse the repository at this point in the history
get ready for initial GA for 2.0.0
  • Loading branch information
sumanth-lingappa authored Sep 26, 2023
2 parents bb446b2 + e1ee1be commit 8dec0be
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 5 deletions.
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
.vscode/

tools/
issues/

plugins/module_utils/test.ipynb

*.pyc
__pycache__/
Expand All @@ -11,5 +14,7 @@ _built_docs*
# collection package
**/netscaler-adc-*.tar.gz

examples/*.out

TODO.md
Dockerfile
Dockerfile
32 changes: 31 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,20 @@ fmt:
isort plugins/module_utils/*.py
isort tools/module_generator.py

fmt_tools:
# ignore if file not found
-autoflake tools/generated_modules/*.py
-autoflake tools/module_generator.py
-autoflake tools/nitro_resource_map.py

-black tools/generated_modules/*.py
-black tools/module_generator.py
-black tools/nitro_resource_map.py

-isort tools/generated_modules/*.py
-isort tools/module_generator.py
-isort tools/nitro_resource_map.py

generate_modules:
python3 tools/module_generator.py

Expand All @@ -26,4 +40,20 @@ lint: install
# cd _built_docs
# pip3 install -r requirements.txt
# ./build.sh
# rsync -cprv --delete-after _built_docs/rst/ docs/
# cd ..
# rsync -cprv _built_docs/build/html/ docs/ # Do not use --delete-after as this will delete .nojekyll file


# Run examples/*.yaml playbooks individually
# ansible-playbook -i examples/inventory examples/playbook.yaml
# Run the playbook. if the return code is non-zero, save the output to a file
# skip the playbook which contains "password" in the file name
run_examples:
@for playbook in examples/*.yaml; do \
if [[ $$playbook == *"password"* ]]; then \
continue; \
fi; \
echo "Running $$playbook"; \
ansible-playbook -i examples/inventory.ini $$playbook || \
ansible-playbook -i examples/inventory.ini $$playbook -vvv > $$playbook.out; \
done
2 changes: 1 addition & 1 deletion galaxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace: netscaler
name: adc

# The version of the collection. Must be compatible with semantic versioning
version: 2.0.0-alpha
version: 2.0.0

# The path to the Markdown (.md) readme file. This path is relative to the root of the collection
readme: README.md
Expand Down
4 changes: 2 additions & 2 deletions plugins/module_utils/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ def send(self, method, url, data=None):
if "body" in info:
try:
return status_code, json.loads(to_text(info["body"]))
except json.decoder.JSONDecodeError:
except json.decoder.JSONDecodeError as e:
log("ERROR: json.decoder.JSONDecodeError: %s" % e)
log("DEBUG: info['body'] = %s" % info["body"])
log("DEBUG: Traceback = %s" % traceback.format_exc())
Expand All @@ -164,7 +164,7 @@ def send(self, method, url, data=None):
else:
try:
return status_code, json.loads(to_text(body))
except json.decoder.JSONDecodeError:
except json.decoder.JSONDecodeError as e:
log("ERROR: json.decoder.JSONDecodeError: %s" % e)
log("DEBUG: info['body'] = %s" % info["body"])
log("DEBUG: Traceback = %s" % traceback.format_exc())
Expand Down

0 comments on commit 8dec0be

Please sign in to comment.