-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
restructure to ansible collection and add ntc dev standards #268
Conversation
Would need to determine if a beta is needed, def. would need to be a major release. I think I caught everything, but maybe @gsnider2195 can take a look? |
There's a space at the beginning of your |
- ".vscode" | ||
- "*.tar.gz" | ||
- "poetry.lock" | ||
- "pyproject.toml" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should include the pyproject.toml in the collection build. Also include a requirements.txt for environments without poetry:
poetry export -f requirements.txt --output requirements.txt
try: | ||
from packaging import version | ||
HAS_PACKAGING=True | ||
|
||
HAS_PACKAGING = True | ||
except ImportError: | ||
HAS_PACKAGING=False | ||
if (HAS_PACKAGING and version.parse(ansible_version) < version.parse("2.4")) or (not HAS_PACKAGING and float(ansible_version[:3]) < 2.4): | ||
HAS_PACKAGING = False | ||
if (HAS_PACKAGING and version.parse(ansible_version) < version.parse("2.4")) or ( | ||
not HAS_PACKAGING and float(ansible_version[:3]) < 2.4 | ||
): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're pinning our ansible version to 2.10 in our pyproject.toml so we can get rid of this version checking code that ansible-test sanity
doesn't like
@@ -0,0 +1,214 @@ | |||
"""Tasks for use with Invoke.""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can get ansible-test sanity to ignore the errors on this file by creating a tests/sanity/ignore-2.10.txt
file and adding these lines to it
tasks.py future-import-boilerplate
tasks.py metaclass-boilerplate
https://docs.ansible.com/ansible/latest/dev_guide/testing/sanity/ignores.html
It wouldn't hurt to resolve the
|
examples.md should be updated to use the FQCN for module names. For example: tasks:
- name: GET VLANS IN REAL TIME
ntc_show_command:
connection: ssh should be tasks:
- name: GET VLANS IN REAL TIME
networktocode.ntc_ansible.ntc_show_command:
connection: ssh |
Co-authored-by: Gary Snider <75227981+gsnider2195@users.noreply.github.com>
so these should have a shebang? I understand them for a python file but not for a non-python file. |
Looking into reworking all modules to all use pyntc methods for uniformity. Currently some use pyntc methods and others use other solutions, multiple include libraries that don't appear to be maintained any longer. |
Still got some work to do, will change to DRAFT, some of the modules dont work fully |
temporarily putting this on hold until pyntc has implemented a few fixes and gets 1.0.0 released. |
Think this is now ready. Since the decision was to call the collection |
No description provided.