diff options
Diffstat (limited to 'ansible_collections/dellemc/os9')
344 files changed, 36447 insertions, 0 deletions
diff --git a/ansible_collections/dellemc/os9/.ansible-lint b/ansible_collections/dellemc/os9/.ansible-lint new file mode 100644 index 000000000..d8c4900d7 --- /dev/null +++ b/ansible_collections/dellemc/os9/.ansible-lint @@ -0,0 +1,2 @@ +skip_list: + - '208' diff --git a/ansible_collections/dellemc/os9/.github/workflows/ansible-test.yml b/ansible_collections/dellemc/os9/.github/workflows/ansible-test.yml new file mode 100644 index 000000000..6834c54a2 --- /dev/null +++ b/ansible_collections/dellemc/os9/.github/workflows/ansible-test.yml @@ -0,0 +1,33 @@ +name: CI +on: +- pull_request + +jobs: + sanity: + name: Sanity (${{ matrix.ansible }}) + strategy: + matrix: + ansible: + - stable-2.10 + - devel + runs-on: ubuntu-latest + steps: + + - name: Check out code + uses: actions/checkout@v1 + with: + path: ansible_collections/dellemc/os9 + + - name: Set up Python 3.6 + uses: actions/setup-python@v1 + with: + python-version: 3.6 + + - name: Install ansible-base (${{ matrix.ansible }}) + run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz --disable-pip-version-check + + - name: Install ansible_collections.ansible.netcommon + run: ansible-galaxy collection install ansible.netcommon -p ../../ + + - name: Run sanity tests + run: ansible-test sanity --docker -v --color --python 3.6 diff --git a/ansible_collections/dellemc/os9/.gitignore b/ansible_collections/dellemc/os9/.gitignore new file mode 100644 index 000000000..c6fc14ad0 --- /dev/null +++ b/ansible_collections/dellemc/os9/.gitignore @@ -0,0 +1,387 @@ + +# Created by https://www.gitignore.io/api/git,linux,pydev,python,windows,pycharm+all,jupyternotebook,vim,webstorm,emacs,dotenv +# Edit at https://www.gitignore.io/?templates=git,linux,pydev,python,windows,pycharm+all,jupyternotebook,vim,webstorm,emacs,dotenv + +### dotenv ### +.env + +### Emacs ### +# -*- mode: gitignore; -*- +*~ +\#*\# +/.emacs.desktop +/.emacs.desktop.lock +*.elc +auto-save-list +tramp +.\#* + +# Org-mode +.org-id-locations +*_archive + +# flymake-mode +*_flymake.* + +# eshell files +/eshell/history +/eshell/lastdir + +# elpa packages +/elpa/ + +# reftex files +*.rel + +# AUCTeX auto folder +/auto/ + +# cask packages +.cask/ +dist/ + +# Flycheck +flycheck_*.el + +# server auth directory +/server/ + +# projectiles files +.projectile + +# directory configuration +.dir-locals.el + +# network security +/network-security.data + + +### Git ### +# Created by git for backups. To disable backups in Git: +# $ git config --global mergetool.keepBackup false +*.orig + +# Created by git when using merge tools for conflicts +*.BACKUP.* +*.BASE.* +*.LOCAL.* +*.REMOTE.* +*_BACKUP_*.txt +*_BASE_*.txt +*_LOCAL_*.txt +*_REMOTE_*.txt + +#!! ERROR: jupyternotebook is undefined. Use list command to see defined gitignore types !!# + +### Linux ### + +# temporary files which can be created if a process still has a handle open of a deleted file +.fuse_hidden* + +# KDE directory preferences +.directory + +# Linux trash folder which might appear on any partition or disk +.Trash-* + +# .nfs files are created when an open file is removed but is still being accessed +.nfs* + +### PyCharm+all ### +# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm +# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 + +# User-specific stuff +.idea/**/workspace.xml +.idea/**/tasks.xml +.idea/**/usage.statistics.xml +.idea/**/dictionaries +.idea/**/shelf + +# Generated files +.idea/**/contentModel.xml + +# Sensitive or high-churn files +.idea/**/dataSources/ +.idea/**/dataSources.ids +.idea/**/dataSources.local.xml +.idea/**/sqlDataSources.xml +.idea/**/dynamic.xml +.idea/**/uiDesigner.xml +.idea/**/dbnavigator.xml + +# Gradle +.idea/**/gradle.xml +.idea/**/libraries + +# Gradle and Maven with auto-import +# When using Gradle or Maven with auto-import, you should exclude module files, +# since they will be recreated, and may cause churn. Uncomment if using +# auto-import. +# .idea/modules.xml +# .idea/*.iml +# .idea/modules +# *.iml +# *.ipr + +# CMake +cmake-build-*/ + +# Mongo Explorer plugin +.idea/**/mongoSettings.xml + +# File-based project format +*.iws + +# IntelliJ +out/ + +# mpeltonen/sbt-idea plugin +.idea_modules/ + +# JIRA plugin +atlassian-ide-plugin.xml + +# Cursive Clojure plugin +.idea/replstate.xml + +# Crashlytics plugin (for Android Studio and IntelliJ) +com_crashlytics_export_strings.xml +crashlytics.properties +crashlytics-build.properties +fabric.properties + +# Editor-based Rest Client +.idea/httpRequests + +# Android studio 3.1+ serialized cache file +.idea/caches/build_file_checksums.ser + +### PyCharm+all Patch ### +# Ignores the whole .idea folder and all .iml files +# See https://github.com/joeblau/gitignore.io/issues/186 and https://github.com/joeblau/gitignore.io/issues/360 + +.idea/ + +# Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-249601023 + +*.iml +modules.xml +.idea/misc.xml +*.ipr + +# Sonarlint plugin +.idea/sonarlint + +### pydev ### +.pydevproject + +### Python ### +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +build/ +develop-eggs/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +pip-wheel-metadata/ +share/python-wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.nox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +.hypothesis/ +.pytest_cache/ + +# Translations +*.mo +*.pot + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +# pyenv +.python-version + +# pipenv +# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. +# However, in case of collaboration, if having platform-specific dependencies or dependencies +# having no cross-platform support, pipenv may install dependencies that don't work, or not +# install all needed dependencies. +#Pipfile.lock + +# celery beat schedule file +celerybeat-schedule + +# SageMath parsed files +*.sage.py + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# Mr Developer +.mr.developer.cfg +.project + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ +.dmypy.json +dmypy.json + +# Pyre type checker +.pyre/ + +### Vim ### +# Swap +[._]*.s[a-v][a-z] +[._]*.sw[a-p] +[._]s[a-rt-v][a-z] +[._]ss[a-gi-z] +[._]sw[a-p] + +# Session +Session.vim +Sessionx.vim + +# Temporary +.netrwhist +# Auto-generated tag files +tags +# Persistent undo +[._]*.un~ + +### WebStorm ### +# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm +# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 + +# User-specific stuff + +# Generated files + +# Sensitive or high-churn files + +# Gradle + +# Gradle and Maven with auto-import +# When using Gradle or Maven with auto-import, you should exclude module files, +# since they will be recreated, and may cause churn. Uncomment if using +# auto-import. +# .idea/modules.xml +# .idea/*.iml +# .idea/modules +# *.iml +# *.ipr + +# CMake + +# Mongo Explorer plugin + +# File-based project format + +# IntelliJ + +# mpeltonen/sbt-idea plugin + +# JIRA plugin + +# Cursive Clojure plugin + +# Crashlytics plugin (for Android Studio and IntelliJ) + +# Editor-based Rest Client + +# Android studio 3.1+ serialized cache file + +### WebStorm Patch ### +# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721 + +# *.iml +# modules.xml +# .idea/misc.xml +# *.ipr + +# Sonarlint plugin +.idea/**/sonarlint/ + +# SonarQube Plugin +.idea/**/sonarIssues.xml + +# Markdown Navigator plugin +.idea/**/markdown-navigator.xml +.idea/**/markdown-navigator/ + +### Windows ### +# Windows thumbnail cache files +Thumbs.db +Thumbs.db:encryptable +ehthumbs.db +ehthumbs_vista.db + +# Dump file +*.stackdump + +# Folder config file +[Dd]esktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msix +*.msm +*.msp + +# Windows shortcuts +*.lnk + +# End of https://www.gitignore.io/api/git,linux,pydev,python,windows,pycharm+all,jupyternotebook,vim,webstorm,emacs,dotenv diff --git a/ansible_collections/dellemc/os9/COPYING b/ansible_collections/dellemc/os9/COPYING new file mode 100644 index 000000000..10926e87f --- /dev/null +++ b/ansible_collections/dellemc/os9/COPYING @@ -0,0 +1,675 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + <program> Copyright (C) <year> <name of author> + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +<http://www.gnu.org/licenses/>. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +<http://www.gnu.org/philosophy/why-not-lgpl.html>. + diff --git a/ansible_collections/dellemc/os9/FILES.json b/ansible_collections/dellemc/os9/FILES.json new file mode 100644 index 000000000..de5777d50 --- /dev/null +++ b/ansible_collections/dellemc/os9/FILES.json @@ -0,0 +1,3953 @@ +{ + "files": [ + { + "format": 1, + "ftype": "dir", + "chksum_sha256": null, + "name": ".", + "chksum_type": null + }, + { + "ftype": "file", + "chksum_sha256": "0c29a1ae51505d7a5d1e7f80c5abac708f68c44c5bd96fc94f0afff2408daeca", + "name": ".ansible-lint", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "5883eb4c7ece1931e1b25a9071bcbe50c1eaab7b9a38d2515e1b4be29e630fb3", + "name": "LICENSE", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "tests", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "tests/sanity", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "47b57717c6b01630d3628ebfd0288cb961d6c1ae43d050656ff40cca0c136831", + "name": "tests/sanity/ignore-2.9.txt", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "c8a4ac4bfdef88e75d6e748e35a42fb4915947dfa2b7dd788626fd829600e014", + "name": "tests/sanity/requirements.txt", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "aa689a5caa0c4c0d15e13cc42590037dd2a70c8663d961b7d890b345cc175a99", + "name": "tests/sanity/ignore-2.10.txt", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "aa689a5caa0c4c0d15e13cc42590037dd2a70c8663d961b7d890b345cc175a99", + "name": "tests/sanity/ignore-2.11.txt", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "tests/integration", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "tests/integration/targets", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "tests/integration/targets/os9_command", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "tests/integration/targets/os9_command/os9_command", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "tests/integration/targets/os9_command/os9_command/tests", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "tests/integration/targets/os9_command/os9_command/tests/cli", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "7fec66f82d7fc43d56da0eea8b53394eba52f26bf8f7059f12ea9703503b562f", + "name": "tests/integration/targets/os9_command/os9_command/tests/cli/bad_operator", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "a1082ade2b6b3b60448649536e311691e159519934fad93cd473b334e07a01f9", + "name": "tests/integration/targets/os9_command/os9_command/tests/cli/contains", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "bafdebd96db17a954899808696fa2e3d38ba09b03114638ada75f49a96acb588", + "name": "tests/integration/targets/os9_command/os9_command/tests/cli/output", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "29d2545c7c7de45bbc802b34e167797f5a9ff85cd8456ed30c2d4fe00cf80cb7", + "name": "tests/integration/targets/os9_command/os9_command/tests/cli/timeout", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "cedd8e1102bc85d0a77a8e752253d2dd42276dc672b0d5eb8e51ce5011dc15a0", + "name": "tests/integration/targets/os9_command/os9_command/tests/cli/invalid", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "431660d4177c8289f53aa0487bd9195b0de7e1ed944bee9e09c665bd532cc8bb", + "name": "tests/integration/targets/os9_command/os9_command/tests/cli/show_commands.yaml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "tests/integration/targets/os9_command/os9_command/defaults", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "c67b69d54f5ebc1de087ed737f6a0e4119d6f045229f64b7cbd1971e4d5eb14f", + "name": "tests/integration/targets/os9_command/os9_command/defaults/main.yaml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "tests/integration/targets/os9_command/os9_command/tasks", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "8b99fcd12715fcec0cba3d649252a55c86f4710650f9f2e0fdab0bb958fb88f1", + "name": "tests/integration/targets/os9_command/os9_command/tasks/main.yaml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "81ae4136ca3d879f645bc323268dd5af5a89467b0d776010965374f56ef07eb0", + "name": "tests/integration/targets/os9_command/os9_command/tasks/cli.yaml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "name": "tests/integration/targets/__init__.py", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "tests/integration/targets/os9_facts", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "tests/integration/targets/os9_facts/os9_facts", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "tests/integration/targets/os9_facts/os9_facts/tests", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "tests/integration/targets/os9_facts/os9_facts/tests/cli", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "2a1b00378f0b59a8b92d07b174826617ce1dde761f2f98cb0627737ca2895171", + "name": "tests/integration/targets/os9_facts/os9_facts/tests/cli/testcases_facts.yaml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "tests/integration/targets/os9_facts/os9_facts/defaults", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "b6cec8117492a3110c2e9066aa77a54abd2b9774cea08d60eb42b01c51c3e032", + "name": "tests/integration/targets/os9_facts/os9_facts/defaults/main.yaml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "tests/integration/targets/os9_facts/os9_facts/tasks", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "ac196e55bc80cba08a1cadef71a151160e493ce9cb00cb3ae12e88cf83664c47", + "name": "tests/integration/targets/os9_facts/os9_facts/tasks/main.yaml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "2267f2038f66e2be89d7a6c63ffdb80801f457c22193408b10bae86c3144670e", + "name": "tests/integration/targets/os9_facts/os9_facts/tasks/cli.yaml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "tests/integration/targets/os9_config", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "tests/integration/targets/os9_config/os9_config", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "tests/integration/targets/os9_config/os9_config/tests", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "tests/integration/targets/os9_config/os9_config/tests/cli", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "71ff9b108a1e14b50a2cb5e71de55580c9a2a345cf53385391e95a359310508d", + "name": "tests/integration/targets/os9_config/os9_config/tests/cli/configcommands.yaml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "3dcd20cbd7aa3ff27003ccf2feed4bdf6d5bb86f11438772fd73c89c9a1955f3", + "name": "tests/integration/targets/os9_config/os9_config/tests/cli/vlan_config.txt", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "608a1218cafc5851413641f44f2109add4c0977d42b9e4a1b795bf89906a7155", + "name": "tests/integration/targets/os9_config/os9_config/tests/cli/toplevel.yaml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "tests/integration/targets/os9_config/os9_config/defaults", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "b6cec8117492a3110c2e9066aa77a54abd2b9774cea08d60eb42b01c51c3e032", + "name": "tests/integration/targets/os9_config/os9_config/defaults/main.yaml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "tests/integration/targets/os9_config/os9_config/tasks", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "ac196e55bc80cba08a1cadef71a151160e493ce9cb00cb3ae12e88cf83664c47", + "name": "tests/integration/targets/os9_config/os9_config/tasks/main.yaml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "2267f2038f66e2be89d7a6c63ffdb80801f457c22193408b10bae86c3144670e", + "name": "tests/integration/targets/os9_config/os9_config/tasks/cli.yaml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "b5726d3ec9335a09c124469eca039523847a6b0f08a083efaefd002b83326600", + "name": "tests/.gitignore", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "tests/unit", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "tests/unit/modules", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "tests/unit/modules/network", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "tests/unit/modules/network/os9", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "d44b86de2cf6f1bc939fc743cf76dbec128e7b78ba872c2c8b6a9399c0acf3b5", + "name": "tests/unit/modules/network/os9/test_os9_config.py", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "name": "tests/unit/modules/network/os9/__init__.py", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "3987235f717a4104ac08ba54efdaf0917d4f70566176728717ca382e3de74856", + "name": "tests/unit/modules/network/os9/os9_module.py", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "f776673004a00a68326154ede112ae99897541044cd83dc0162783c81019f050", + "name": "tests/unit/modules/network/os9/test_os9_command.py", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "tests/unit/modules/network/os9/fixtures", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "e6feab0f1d65c9a751171208547a21763d80b4f3589893bf3c9a175d7b31e483", + "name": "tests/unit/modules/network/os9/fixtures/show_ipv6_interface", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "125417e5d4d2deca2272f11e4c5124579741cff5e35fdb749b63696e87e87d0b", + "name": "tests/unit/modules/network/os9/fixtures/show_lldp_neighbors_detail", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "5fb0e1ad78714da4423b9c9a7ebd2938b0050febc7b10d32246a9afe1981ade7", + "name": "tests/unit/modules/network/os9/fixtures/show_running-config__grep_hostname", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "5a252359d7d8aaf0c632dcdfdce095984764c593871f6acb005f94dbcfa16aff", + "name": "tests/unit/modules/network/os9/fixtures/show_inventory", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "d09c902762898fca26cae465dfa5d091d8cb255892c07e75b0462d7046cb5544", + "name": "tests/unit/modules/network/os9/fixtures/show_interfaces", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "182cb0ed4d2624e815ba3aca306283100e279b7b01305a771ac3dc9962839514", + "name": "tests/unit/modules/network/os9/fixtures/os9_config_src.cfg", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "baf72eb01ee429ea7599874957dd1398b25da53212c61f667b214b3bf2615fc9", + "name": "tests/unit/modules/network/os9/fixtures/show_version", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "d895db603a8e35ece016395993b860fef4d8c04d3f5e316083203858592d338a", + "name": "tests/unit/modules/network/os9/fixtures/show_file-systems", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "8e44f65026c6a56109e9e3ba30e6b9bfb866dedd3b475beb37841479d5e010f7", + "name": "tests/unit/modules/network/os9/fixtures/show_running-config", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "885553e6317b9e9da78f7230ba38e410b1ec7fe548d852d3d19c044bf29bfaa5", + "name": "tests/unit/modules/network/os9/fixtures/os9_config_config.cfg", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "315f7a32efeddc96e388092d8af26a4e6bd220a29e8f78dcfaf8ffed471c7861", + "name": "tests/unit/modules/network/os9/fixtures/show_memory__except_Processor", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "2401872bfd39a36e786461d82e8672887258ba81a4e477c44ebd223ddaa8ba2d", + "name": "tests/unit/modules/network/os9/test_os9_facts.py", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "meta", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "21e22101c2afb46bb6a916f2bf3df69eb5023903506152bbf6f0669e831a422c", + "name": "meta/runtime.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": ".github", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": ".github/workflows", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "a72707b6d3f3810741fa9784222d3c56f48472b77aba15222ae780c652262eac", + "name": ".github/workflows/ansible-test.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "plugins", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "plugins/module_utils", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "name": "plugins/module_utils/__init__.py", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "plugins/module_utils/network", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "name": "plugins/module_utils/network/__init__.py", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "78158444072c124ca00b4cfee2471cc5ac35d0ac23f55063665afad9c700831d", + "name": "plugins/module_utils/network/os9.py", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "plugins/action", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "name": "plugins/action/__init__.py", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "2252271fdb4a68288f44c2a8d31c3693bca0141960ba8c5a1c01ab7a12147ba1", + "name": "plugins/action/os9.py", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "plugins/terminal", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "name": "plugins/terminal/__init__.py", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "cd7498d518117883d4ace3f39e8045f0023fe9a2c62bcc8277f35d35a0a87ad7", + "name": "plugins/terminal/os9.py", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "plugins/cliconf", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "name": "plugins/cliconf/__init__.py", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "452eb0a83fa4a5adf85ca49e0c7b9f51e298d3b2bcb3a25009fc670fa4b3ecd7", + "name": "plugins/cliconf/os9.py", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "plugins/doc_fragments", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "name": "plugins/doc_fragments/__init__.py", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "d3bc65aabc3b22af8323623fc19dbb48fd65252b0505fa20bf7ac7e9b8171f33", + "name": "plugins/doc_fragments/os9.py", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "plugins/modules", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "88e781b42ea96e44fa81d08347c70f57139dfbb46c741879280f2b904638b29c", + "name": "plugins/modules/os9_facts.py", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "49b93b6c6e7ddbd76a1b1c89b8775062ec9bea4e67209cef7238585794c6cbbf", + "name": "plugins/modules/os9_config.py", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "name": "plugins/modules/__init__.py", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "d1297f0656ee49abe886cf9ab77871a79b1f7196d51bc3d0a53aee675a0c8652", + "name": "plugins/modules/os9_command.py", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "0ae0485a5bd37a63e63603596417e4eb0e653334fa6c7f932ca3a0e85d4af227", + "name": "COPYING", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "258e4be3cfda40797fe734b375b6f94c110c9a9bebce196fedce319a457ce720", + "name": ".gitignore", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "changelogs", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "70a7fbafc6e1175acdf70896d266f6e7c3cdaf7b6d786a6ccfd6bc6d84e46bae", + "name": "changelogs/config.yaml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "e05e09bd169818f68582946673a13a370158c2539a52a6a4b16e5ddf68e32668", + "name": "changelogs/changelog.yaml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "349741eaeee3c184691fa268cae80843cdb9e7a8a4400ef1869d05d6f795bb87", + "name": "changelogs/CHANGELOG.rst", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "docs", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "e81d64f1de9c3270f1f56d5ce253a45dd18e3fd85917cd72607ca597127d1f71", + "name": "docs/os9_dns.md", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "19771f0031148029ab0b196b35580c440fd07884c3abe6b8b86b27aefed11732", + "name": "docs/os9_aaa.md", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "b4a5d8c724dfaa01e7b4a2a17ca38d3dd5f1bca9ce695666fcd829d0330f296b", + "name": "docs/os9_ntp.md", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "9aa3a01ae4c5a30649015623999722c1ee2d7dc555177cc80b676608afe6c4d0", + "name": "docs/roles.rst", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "2ff6ab9e62f00e60c6c321476e3de23db595faf1f57b4b4d03df4ca27702b2b9", + "name": "docs/os9_xstp.md", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "7c1e34c1ae9189e3c0e9092a75f867ea5b4ae0c19e273f57d30a84d59418d1bb", + "name": "docs/os9_vlan.md", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "d4ef7e561975060c0f8480f7ec0e7ca042ae250930eb4aaa2fe89ff1d5c935a6", + "name": "docs/os9_acl.md", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "d1d39e1bd43a44fd8ea455be74fdfcf42732e5775916716399599402075523bf", + "name": "docs/os9_vrrp.md", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "087ff2922aec2a9911d67440527e81e0ad1ea1fc079776f95e84badba9039843", + "name": "docs/os9_vrf.md", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "dd43845c1a91be5e8323914ab1aee26275dc2362fbf4520f8c9d31952e628be3", + "name": "docs/os9_interface.md", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "b19735d8dc20ee8d5b79ec6f25244d5bf513ae93c0ec72cb130018a991e9d409", + "name": "docs/os9_prefix_list.md", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "858d5c07058ee5d90bdf5022439e788a9bc1e2daad0bfb7ce522edff282598a6", + "name": "docs/os9_lag.md", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "b72d204f8dedd27d2988ecf0d53589a6547205774be69f6b298561f743b9b252", + "name": "docs/os9_ecmp.md", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "19c514de5c3e29a0f885abb6da52fff413eb9078b9ef1fe87253705e2f919ad8", + "name": "docs/os9_lldp.md", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "a770aa97b66a8c49a948bf4ebd6dbec672b77b6c4c9e80d05973580b1ff13b12", + "name": "docs/os9_system.md", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "3aac3568b9d528d747b0b59acec0b71f473c8d7c5254452b4eb44c5f8131dc8d", + "name": "docs/os9_dcb.md", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "440f5dfc57184ae41e73988b49e0391e678c1eabb534eb1a527fcbadc6ee1b76", + "name": "docs/os9_sflow.md", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "33fd4184f2648fcc0e69c524b3797a5013afabd703eb4a3ec40ee3abc1436939", + "name": "docs/os9_bgp.md", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "d000c615ec8d3366f408fc731d001055d85dd22912f064440e1331e0a86a94fb", + "name": "docs/os9_copy_config.md", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "7b5fa6361cabee40c802df10c63dea98b38ff1221c0a9846f5823908d9689190", + "name": "docs/os9_snmp.md", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "88842853681202a3e8b4cc0712310dad87eba8c8f5b24f76fff101e93e7cd714", + "name": "docs/os9_vlt.md", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "c1bf779e16b26773779b3cff23111b14c76913556729e019af7f1091d8fbb235", + "name": "docs/os9_users.md", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "fc49c2852e7bf0c11fa863341dd38dae4de133630a8de2af96c4348f52284c34", + "name": "docs/os9_logging.md", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "23e9d4c2fd8d62be40f9ddbfdac92465f4682886c2b1dd073f37097197f705d9", + "name": "README.md", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "playbooks", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "playbooks/clos_fabric_ebgp", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "playbooks/clos_fabric_ebgp/group_vars", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "8dfc56fa05d702dbc40efa71a43a4148cb1fabde2d61c27fdc5b652f96b47e7c", + "name": "playbooks/clos_fabric_ebgp/group_vars/all", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "bc5ab983e078c9a5a8cd262b0379d890817589e29e324cf4ded2e2d87e157da6", + "name": "playbooks/clos_fabric_ebgp/group_vars/spine.yaml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "f5b68d8f1801c40577f9acc356e0c9a8a08ac91ddbd4f3d82158a808fd9d9770", + "name": "playbooks/clos_fabric_ebgp/inventory.yaml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "855a81733f763088f5326ac9cb210284edfab2e21d0a0886764c007c6878194d", + "name": "playbooks/clos_fabric_ebgp/datacenter.yaml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "ba9189063a69b9774a2aded0a7d4c2d7c36e9270bc5354bd21e62d146df6d881", + "name": "playbooks/clos_fabric_ebgp/README.md", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "playbooks/clos_fabric_ebgp/host_vars", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "0686aa905934de49d4403b0d8fbb27fb68dfac45043db2a509ce827e58c321db", + "name": "playbooks/clos_fabric_ebgp/host_vars/leaf2.yaml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "6ad88e8d68755ee79d86f572586bb3b2bea037e8699d52acd699fe1584abc488", + "name": "playbooks/clos_fabric_ebgp/host_vars/leaf3.yaml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "d1f8d83e73880a72c0206133da575b0fd416c12919d2a85b628534de88ce5009", + "name": "playbooks/clos_fabric_ebgp/host_vars/spine2.yaml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "776939597c809d002ee820c5ed7f776df294a9bfe6be72b37e5aa4ee53512360", + "name": "playbooks/clos_fabric_ebgp/host_vars/leaf4.yaml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "9c189687de2087d635359151f3c3d4f07bea2caed813e889ab55b462c9067326", + "name": "playbooks/clos_fabric_ebgp/host_vars/leaf1.yaml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "18e827e2380304c8065de68d8db4b7808eb351b86601611610ca3340e6a42844", + "name": "playbooks/clos_fabric_ebgp/host_vars/spine1.yaml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_vrf", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_vrf/handlers", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "328e38eb6243f1b7180e79b06a29b292fe36b3bfd9e47c3393f84e37393a79ad", + "name": "roles/os9_vrf/handlers/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "5883eb4c7ece1931e1b25a9071bcbe50c1eaab7b9a38d2515e1b4be29e630fb3", + "name": "roles/os9_vrf/LICENSE", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_vrf/tests", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "f5b68d8f1801c40577f9acc356e0c9a8a08ac91ddbd4f3d82158a808fd9d9770", + "name": "roles/os9_vrf/tests/inventory.yaml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "82c2dacec1c7e99ae63ebf20fafe0c16105959699e02239c5d579c963cc695d2", + "name": "roles/os9_vrf/tests/main.os9.yaml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "9d09f75a83662192bce545b4d03c876f1db00e79f9867e7e2875f765fd648cc5", + "name": "roles/os9_vrf/tests/test.yaml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_vrf/templates", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "a9d07572f5aaa73ea15a375fdbb317a443d10a524b63ab28fe4edb67f8d273dd", + "name": "roles/os9_vrf/templates/os9_vrf.j2", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_vrf/meta", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "4791fe8f67d0b722e1af57aea187cde857443730901432f6f15da82d285474fc", + "name": "roles/os9_vrf/meta/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_vrf/vars", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "e223f46d113fa7925d4c5bd9218810c1f241fe944302f2effc0e8728e3ef4f80", + "name": "roles/os9_vrf/vars/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "af5620af058efa0916111f46705ab43205edef3bef05542d6da325ae47f2c120", + "name": "roles/os9_vrf/README.md", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_vrf/defaults", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "0e4a9b4572288830796b6833d2053b416d6243cdfd0969b7f4b54f2d9e8622c5", + "name": "roles/os9_vrf/defaults/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_vrf/tasks", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "83170116a0504aba73704308942df782d7c6e342c0828ef9387342f4b0b3d079", + "name": "roles/os9_vrf/tasks/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_sflow", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_sflow/handlers", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "a9f076780aa43672910f9aede19c73abd0c7b8e017167ad2c483b0d4d1c58636", + "name": "roles/os9_sflow/handlers/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "5883eb4c7ece1931e1b25a9071bcbe50c1eaab7b9a38d2515e1b4be29e630fb3", + "name": "roles/os9_sflow/LICENSE", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_sflow/tests", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "f5b68d8f1801c40577f9acc356e0c9a8a08ac91ddbd4f3d82158a808fd9d9770", + "name": "roles/os9_sflow/tests/inventory.yaml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "a5fe3e746e1bc1b090970dea0271d25b6fadb8054efcd6250c1a8b49a59f697a", + "name": "roles/os9_sflow/tests/main.os9.yaml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "62be668d4bddb7e6708bcdd68b931ab71a3976867c66eca68965425326096669", + "name": "roles/os9_sflow/tests/test.yaml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_sflow/templates", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "82704f4f253f0d64ec1e43a38b38802c549256b3acd65417e7dfed1e98c4ae0e", + "name": "roles/os9_sflow/templates/os9_sflow.j2", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_sflow/meta", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "47cceedfd12b18197b1eb1d691e0e2e46f3a33b8d4ddda5c180720dd781fc29b", + "name": "roles/os9_sflow/meta/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_sflow/vars", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "f0d4a18cc0ead67b6d26be2af0b2c7bffa0fcb82bf57b357f2823af5b237a5ec", + "name": "roles/os9_sflow/vars/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "c63b06d76b54b76a2b8221e04a2514b8a691679e799813345ee17a5cf7453341", + "name": "roles/os9_sflow/README.md", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_sflow/defaults", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "b42edf22664bd7d9f44f6309b13faa376c197d95ced795193dda8ef8710de8fa", + "name": "roles/os9_sflow/defaults/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_sflow/tasks", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "9be297ba0a1e316c69f0738d824bbfdce133f2edec183a22b750c25824f63879", + "name": "roles/os9_sflow/tasks/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_lag", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_lag/handlers", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "e8ce2a6e7602821f89d3e8394dc3bfc8828df82be2512c63cbb442717b271a1b", + "name": "roles/os9_lag/handlers/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "5883eb4c7ece1931e1b25a9071bcbe50c1eaab7b9a38d2515e1b4be29e630fb3", + "name": "roles/os9_lag/LICENSE", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_lag/tests", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "f5b68d8f1801c40577f9acc356e0c9a8a08ac91ddbd4f3d82158a808fd9d9770", + "name": "roles/os9_lag/tests/inventory.yaml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "c551da3ea192239ad7cc7ed48f7e05cece38c80c9e1388fc673c349efd57acd4", + "name": "roles/os9_lag/tests/main.os9.yaml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "47bfa1c48ee4cbeda5082df0d5d2ddaf3c0d5e2c8b6f55bb842cf07f425de331", + "name": "roles/os9_lag/tests/test.yaml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_lag/templates", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "ee73098cbce745d8c9ef24794e73123c6c334a3a7b4eb8a8640e842a970e38ba", + "name": "roles/os9_lag/templates/os9_lag.j2", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_lag/meta", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "01259b7234aa137d0d3873560d93fff1a2863472575dfb3c5386f9c2b5b6d395", + "name": "roles/os9_lag/meta/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_lag/vars", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "4757240d44c3b63d143c289627b337375f6b012d3df063bdfe3f3b75193e99c0", + "name": "roles/os9_lag/vars/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "ac08af08a2a8a3674ec86d5372661cfcd2cb2b59d22a92940f9193c5eef37897", + "name": "roles/os9_lag/README.md", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_lag/defaults", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "459917ce56ac381180085455a66a6404ccc38b88ea59d5437fadf7884d177cc6", + "name": "roles/os9_lag/defaults/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_lag/tasks", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "e5e65e1af8aef78cd7ae46197210ef94d1800b2a7a0df70aa88efe338d6554b0", + "name": "roles/os9_lag/tasks/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_bgp", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_bgp/handlers", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "4399f312689744d712656ba35d0e6380b22ec594527097aed5b5c542fb9959df", + "name": "roles/os9_bgp/handlers/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "5883eb4c7ece1931e1b25a9071bcbe50c1eaab7b9a38d2515e1b4be29e630fb3", + "name": "roles/os9_bgp/LICENSE", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_bgp/tests", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "f5b68d8f1801c40577f9acc356e0c9a8a08ac91ddbd4f3d82158a808fd9d9770", + "name": "roles/os9_bgp/tests/inventory.yaml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "6d8c0035b353b80ca85fe611ba5b38216a74a00176619fadfa3a1ad9f31c647f", + "name": "roles/os9_bgp/tests/main.os9.yaml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "cc84666798d17dae32dc929df414e0c170005b751c6f73c55cf1082d223c2e1a", + "name": "roles/os9_bgp/tests/test.yaml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_bgp/templates", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "402b54dfddd140ce7a39f22e52de134f82d10ee941beadfa0f1dd8b759fdbff1", + "name": "roles/os9_bgp/templates/os9_bgp.j2", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_bgp/meta", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "ddff5a7d8ae16b2005878b50e0c58be34a1adab7ef9549aff528bbd8914d7ff9", + "name": "roles/os9_bgp/meta/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_bgp/vars", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "e3bf13b2ab4c0bbc6dbf1c8317167024b9b242749a1fa358c8ffe28e58d95a64", + "name": "roles/os9_bgp/vars/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "794a1ca7042ebadf2e8dbd7eb696fec5cbc982453536654022f8348d9dd63ad4", + "name": "roles/os9_bgp/README.md", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_bgp/defaults", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "4b8eecc34bbb888dd110c345c6c469afb5f4ffcc5f0dedb8539b905c3df6e1e0", + "name": "roles/os9_bgp/defaults/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_bgp/tasks", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "1c4af2285f60dcab13f5fdb4b2012dc924ad19df54fd56c8a3c5dc5c681a2af4", + "name": "roles/os9_bgp/tasks/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_lldp", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_lldp/handlers", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "5a6bec4eb07c0b5b105cf47a4e1d6a300a54a3c3705a01512755c86e11e8a6d0", + "name": "roles/os9_lldp/handlers/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "5883eb4c7ece1931e1b25a9071bcbe50c1eaab7b9a38d2515e1b4be29e630fb3", + "name": "roles/os9_lldp/LICENSE", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_lldp/tests", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "f5b68d8f1801c40577f9acc356e0c9a8a08ac91ddbd4f3d82158a808fd9d9770", + "name": "roles/os9_lldp/tests/inventory.yaml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "bacbc3d73ed0149d3539ff2a367127f439e4a746d419b14d6827ae8aa71ed1bb", + "name": "roles/os9_lldp/tests/main.os9.yaml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "2cccaad903053c4c7fb5306f2efc55c380add6c53af6219a533fd10fd26f42be", + "name": "roles/os9_lldp/tests/test.yaml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_lldp/templates", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "581c3f712c0f682b8e794768040cf2b87623f871984f618ebbc8c168e409329d", + "name": "roles/os9_lldp/templates/os9_lldp.j2", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_lldp/meta", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "a3c75160f8505b7530dd5f0a75ffb020ee40bd42b907cfb53f9a77d9e471d08a", + "name": "roles/os9_lldp/meta/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_lldp/vars", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "1f37d26dc0302e65ab7e6c64ead0fbde3a9af90300b41c50833d8fdd4afcbc11", + "name": "roles/os9_lldp/vars/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "c07e9a3a9fa8e7ff8da33649e1e9dd70fb2946b56e1361c58f9f9183a006fcc5", + "name": "roles/os9_lldp/README.md", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_lldp/defaults", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "62abbb6384e7e70179a32796857731fe713246323b7b3b09cb26bb8bdf217f3f", + "name": "roles/os9_lldp/defaults/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_lldp/tasks", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "0e73bad322e68692969dd78a67a40a04e46405aa6101b7340ff3975dac554a1a", + "name": "roles/os9_lldp/tasks/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_aaa", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_aaa/handlers", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "41505d1144bcec0a736a30bb7a675387edefcd3f43786c11642facd88debc46a", + "name": "roles/os9_aaa/handlers/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "5883eb4c7ece1931e1b25a9071bcbe50c1eaab7b9a38d2515e1b4be29e630fb3", + "name": "roles/os9_aaa/LICENSE", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_aaa/tests", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "f5b68d8f1801c40577f9acc356e0c9a8a08ac91ddbd4f3d82158a808fd9d9770", + "name": "roles/os9_aaa/tests/inventory.yaml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "46e62e6fdc007a49b8cd1bbb496047742c2d3634756addf6dee3222ada757f72", + "name": "roles/os9_aaa/tests/test.yaml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "67a167f69545c2e18aefed05f7278dd991363af0a58b655e760212a72c5bf2ce", + "name": "roles/os9_aaa/tests/main.os6.yaml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_aaa/templates", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "d88597d2c9fef832b4c003757838c420f71fcb54c060deacbd753af87d46a333", + "name": "roles/os9_aaa/templates/os9_aaa.j2", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_aaa/meta", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "a31f22a0a47898e35b56b9c5aa4f6b9fd7e36829809aebace774b9ecdc31f39b", + "name": "roles/os9_aaa/meta/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_aaa/vars", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "ee4fc0e75c9bd541ce4202e29bb73201b79ae69c899abc65a802dd7769fdc5b4", + "name": "roles/os9_aaa/vars/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "526df525101ddda741aea64cffc40cdd740376739703639e71e45073311c6274", + "name": "roles/os9_aaa/README.md", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_aaa/defaults", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "3f916612c2b5d2833a97330e40f2075e952c62a0c8e24b023fa2c2415d09785b", + "name": "roles/os9_aaa/defaults/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_aaa/tasks", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "d4f4ed469715df92037e7560cf7fb49044c246a4824b5a378a7747b16d1d5fcc", + "name": "roles/os9_aaa/tasks/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_system", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_system/handlers", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "8b3be39873d380cac2259251db29c1ee0a27896283bc8d73e1b8fc9c6fa845d7", + "name": "roles/os9_system/handlers/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "5883eb4c7ece1931e1b25a9071bcbe50c1eaab7b9a38d2515e1b4be29e630fb3", + "name": "roles/os9_system/LICENSE", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_system/tests", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "f5b68d8f1801c40577f9acc356e0c9a8a08ac91ddbd4f3d82158a808fd9d9770", + "name": "roles/os9_system/tests/inventory.yaml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "6781ea8f4437f79de909fb4035678cda7a57661f6e2de823148fd6031ee5b354", + "name": "roles/os9_system/tests/main.os9.yaml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "80de0d1be31759897d13f274a29d667cc91900c51c3ea8461b0a13d6b53ec7e2", + "name": "roles/os9_system/tests/test.yaml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_system/templates", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "8ba71352c4c8293f02164dad4c1d5e3b84667ba877d826bb7519522437e38b6f", + "name": "roles/os9_system/templates/os9_system.j2", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_system/meta", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "5af0a107d425ac7e7a6eabfb6244e036828c3e1e7fab4c7ebfc0019a80351c6e", + "name": "roles/os9_system/meta/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_system/vars", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "2ccff3e3162348757f00101ccb0890cf12bd823b19cdb9a24ecd9ee6aa1cfc4a", + "name": "roles/os9_system/vars/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "9d32045c65e6b80d9cf45d4f17537caef70d61ee59ccc5005262889e3a40fd59", + "name": "roles/os9_system/README.md", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_system/defaults", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "5c0a32bf0ea6008ed276ee38ead2c7d5e5354f669244f9129024c28339214ae5", + "name": "roles/os9_system/defaults/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_system/tasks", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "36fdd262d9e3162ff3da7d48de1dbe3267e8a1b5ee8bd6ddd29199e00c885e49", + "name": "roles/os9_system/tasks/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_prefix_list", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_prefix_list/handlers", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "55e506ce13e2f09e9e92329a0c636f1828a4aa20bb55a3f8f03d3405a02d2527", + "name": "roles/os9_prefix_list/handlers/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "5883eb4c7ece1931e1b25a9071bcbe50c1eaab7b9a38d2515e1b4be29e630fb3", + "name": "roles/os9_prefix_list/LICENSE", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_prefix_list/tests", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "f5b68d8f1801c40577f9acc356e0c9a8a08ac91ddbd4f3d82158a808fd9d9770", + "name": "roles/os9_prefix_list/tests/inventory.yaml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "a977ff9d2a922d16bec06e5f95a81ef6fcaf996db42697d8102ce705f1e9d2ef", + "name": "roles/os9_prefix_list/tests/main.os9.yaml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "5a0ba2151e2353f32777b08b3e87d7747ba486e3582909e4942fc09b24444ff3", + "name": "roles/os9_prefix_list/tests/test.yaml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_prefix_list/templates", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "a1151c7962365507462e93f65755b778aed85ad023f606d7bfa1324c2fdb1416", + "name": "roles/os9_prefix_list/templates/os9_prefix_list.j2", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_prefix_list/meta", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "462f14295d91855188b42ea296e20728f58000fd97ac57cb3e98d0d93fc8342f", + "name": "roles/os9_prefix_list/meta/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_prefix_list/vars", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "9aecebe122a66572a519557baca9944627a8c5ae508fc79846d530cc536985c5", + "name": "roles/os9_prefix_list/vars/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "271f9da4247e0b36a3566d5c344e3c5c64b528c60dfe0d6077ed008fc22ee1c7", + "name": "roles/os9_prefix_list/README.md", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_prefix_list/defaults", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "992f92fcc74006e970557f814cd0146bbe6d2cefe1403791e2ebb7bb6eb51ad5", + "name": "roles/os9_prefix_list/defaults/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_prefix_list/tasks", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "212f31f556f2327e0479895aaeecb66bb21eb804e96a3c0d01c82476fdbca0a7", + "name": "roles/os9_prefix_list/tasks/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_snmp", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_snmp/handlers", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "f63e7892ea088a676c9cf647f8be96b6163ee798d7a5241a8cc9851f28007ddc", + "name": "roles/os9_snmp/handlers/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "5883eb4c7ece1931e1b25a9071bcbe50c1eaab7b9a38d2515e1b4be29e630fb3", + "name": "roles/os9_snmp/LICENSE", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_snmp/tests", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "f5b68d8f1801c40577f9acc356e0c9a8a08ac91ddbd4f3d82158a808fd9d9770", + "name": "roles/os9_snmp/tests/inventory.yaml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "e470344c03bee986ef193b921efaf0af420e7d1b4d0d921ef9961f4142ec189f", + "name": "roles/os9_snmp/tests/main.os9.yaml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "92fab363287fae218e2c8c9df27430c9024c0053a5d604777459089d40a33545", + "name": "roles/os9_snmp/tests/test.yaml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_snmp/templates", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "964ea7367c2996d49f9630e066c501d55fd429f60fc69c6546a4d3dc8212b622", + "name": "roles/os9_snmp/templates/os9_snmp.j2", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_snmp/meta", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "bb161a86e7babdd18253b1038616a326f03636a06536b475addb506c118281a4", + "name": "roles/os9_snmp/meta/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_snmp/vars", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "be39ed1562711ed3b2437dea16f758d8bf517ab8a791446a4635e75b22bfbe21", + "name": "roles/os9_snmp/vars/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "3ffe2fe6323ea23a7b1b036865798e9f56616752411fb44c1c48a90e74f6ed62", + "name": "roles/os9_snmp/README.md", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_snmp/defaults", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "7389af4080c0b463f08c67954423343121aa7c8ce9b99dacd944d88a590dc63a", + "name": "roles/os9_snmp/defaults/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_snmp/tasks", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "35f6eb0c04481e0ccfc6a0eb73eba0a790d441d56c5a5d79b0c2b246c4e14e8b", + "name": "roles/os9_snmp/tasks/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_vlt", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_vlt/handlers", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "2b38e87edc4d3f68932d5bf099ed5fd8ea70d93d704306d3ed049d40e37f0ca9", + "name": "roles/os9_vlt/handlers/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "5883eb4c7ece1931e1b25a9071bcbe50c1eaab7b9a38d2515e1b4be29e630fb3", + "name": "roles/os9_vlt/LICENSE", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_vlt/tests", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "f5b68d8f1801c40577f9acc356e0c9a8a08ac91ddbd4f3d82158a808fd9d9770", + "name": "roles/os9_vlt/tests/inventory.yaml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "132284efd21362e11003eef8bd1d7c459cb7b6784b33c32032d0a47114c6317f", + "name": "roles/os9_vlt/tests/main.os9.yaml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "344709014b6edcfe10171bffac2bcbba099ac82c8370bd26d8baf4147f4b8ee7", + "name": "roles/os9_vlt/tests/test.yaml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_vlt/templates", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "26098b1dfe90103b9b5e94d4777a2597c22b857dfcb54bf482c57c2432524f3e", + "name": "roles/os9_vlt/templates/os9_vlt.j2", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_vlt/meta", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "8ee5cb1918cf36de31fe6c7c7fa937fb7b96f9e09e8a7cc21ee785143e8d2db3", + "name": "roles/os9_vlt/meta/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_vlt/vars", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "b69245df09bbc3acf580b4bde39e5beda7de8427640510d66f7d15ddcc35fbb5", + "name": "roles/os9_vlt/vars/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "affc8b0508a1d8811daec7893c9b0cb674a30820b09f317da0b0141abb1156c2", + "name": "roles/os9_vlt/README.md", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_vlt/defaults", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "0f9dbde4e5e8fd21bbe18d8166c97829e32ce4672256901aebea6a55966865e1", + "name": "roles/os9_vlt/defaults/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_vlt/tasks", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "07578fbd5595dce89ce08b8b53a777fbf5533be6e08d8e8db05a362e4b1b3b48", + "name": "roles/os9_vlt/tasks/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_copy_config", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_copy_config/handlers", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "01ee1a797920557b814cf3554b45e74495243698d99d028df1800b325ae50483", + "name": "roles/os9_copy_config/handlers/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "5883eb4c7ece1931e1b25a9071bcbe50c1eaab7b9a38d2515e1b4be29e630fb3", + "name": "roles/os9_copy_config/LICENSE", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_copy_config/tests", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "f5b68d8f1801c40577f9acc356e0c9a8a08ac91ddbd4f3d82158a808fd9d9770", + "name": "roles/os9_copy_config/tests/inventory.yaml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "cb3f91d54eee30e53e35b2b99905f70f169ed549fd78909d3dac2defc9ed8d3b", + "name": "roles/os9_copy_config/tests/main.os9.yaml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "1c90e7372af3606aff65055fd7a2f3be9b5c4dc4b38c17596d36beca0e164066", + "name": "roles/os9_copy_config/tests/test.yaml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_copy_config/templates", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "5b9620be68039a5077ed58d7e1e044114af95a5c10d58b37f21efd1479d6ed55", + "name": "roles/os9_copy_config/templates/os9_copy_config.j2", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_copy_config/meta", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "1dd056b18de3a4536562c829ed620d26b9656b967f2d3f721a3db296ed492739", + "name": "roles/os9_copy_config/meta/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_copy_config/vars", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "d9b355a31983ad5f1acdeed96b95782584d363020a4f143b3118fd22c6c99125", + "name": "roles/os9_copy_config/vars/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "77723ba59cb770095cd7c17ae3b98e14236b5175a0b93a43b7b1aaa2a16971ce", + "name": "roles/os9_copy_config/README.md", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_copy_config/defaults", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "d4f41f5def27074e2fe886235868e8a3fcd6fdf629f7e0ae9d0b4671b4bf64a4", + "name": "roles/os9_copy_config/defaults/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_copy_config/tasks", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "84527ffd86c46f3b873c6eb41c4ab3ec683a0705c4b283f1fe93921c60b1c685", + "name": "roles/os9_copy_config/tasks/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_ntp", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_ntp/handlers", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "789d2d2eaf9f1dea06ec0d24120f98cdc8efd8df706d217b8eef9394c9af4df6", + "name": "roles/os9_ntp/handlers/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "5883eb4c7ece1931e1b25a9071bcbe50c1eaab7b9a38d2515e1b4be29e630fb3", + "name": "roles/os9_ntp/LICENSE", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_ntp/tests", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "f5b68d8f1801c40577f9acc356e0c9a8a08ac91ddbd4f3d82158a808fd9d9770", + "name": "roles/os9_ntp/tests/inventory.yaml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "e15445ca6c63e463b3d16958cafd1b5487250d972a96b81499a8a638b1f54515", + "name": "roles/os9_ntp/tests/main.os9.yaml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "17efc759f3a2873ac54a378e6193a9bdbc27625fadc9f6648ac9cb8375c76379", + "name": "roles/os9_ntp/tests/test.yaml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_ntp/templates", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "ba6f6614f85e9de9725547367940e861552b47d37617be4b97dd78545314cd81", + "name": "roles/os9_ntp/templates/os9_ntp.j2", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_ntp/meta", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "1147c842c5f03689beb4084aa81ab416f8a8623c361e32a2f0033e0876ab7af4", + "name": "roles/os9_ntp/meta/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_ntp/vars", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "cc74d3f42e5a4f026b4e7abdc6816a024e30704cf83436258091e82677f71a28", + "name": "roles/os9_ntp/vars/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "5d4b91ee81601f3ad72554958ae19c16ff85f748e756415eaa713da36fae664f", + "name": "roles/os9_ntp/README.md", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_ntp/defaults", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "53b60c8aec93aca48d04eb336f7d6356933245223674d3121a47a2146b21c93f", + "name": "roles/os9_ntp/defaults/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_ntp/tasks", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "b242fdd811c59913a23a4e78fcfe8e83f3b263843c7dee460158630f542fed1b", + "name": "roles/os9_ntp/tasks/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_logging", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_logging/handlers", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "a718ec989264c1e6e7baf0aee663e100f3af2fe558ec05ea5715329c3b5b5d9a", + "name": "roles/os9_logging/handlers/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "5883eb4c7ece1931e1b25a9071bcbe50c1eaab7b9a38d2515e1b4be29e630fb3", + "name": "roles/os9_logging/LICENSE", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_logging/tests", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "f5b68d8f1801c40577f9acc356e0c9a8a08ac91ddbd4f3d82158a808fd9d9770", + "name": "roles/os9_logging/tests/inventory.yaml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "697e597bf75d342ba4f3e60eb499e15bf4d092ad701b6684f9c5babd16da4dfb", + "name": "roles/os9_logging/tests/main.os9.yaml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "5af7cd9b0d509543a80873d15bc44225648be398d2c8be6353e4dcd0bdcf7ba2", + "name": "roles/os9_logging/tests/test.yaml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_logging/templates", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "23247f4a92c1f63e5bd036b930112a0d24e5cd06318ab78ae84c2238b24a30ce", + "name": "roles/os9_logging/templates/os9_logging.j2", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_logging/meta", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "ba0c438ab0fb041c432db690eb4d391f67ea7760763be98a203fbc4a56bc5173", + "name": "roles/os9_logging/meta/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_logging/vars", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "6fa31d2a1e3412f56aa2390f96d1b8876fb433764ffbf2f0dd4930ddc1f67646", + "name": "roles/os9_logging/vars/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "df022a69119f4daf35333b84e4977bc3917504ae1ad258ee88a581f2d1b8fa71", + "name": "roles/os9_logging/README.md", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_logging/defaults", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "a0db5e2a60ed9d1f8ad1f73d05ba11f6f4e8be95aea985c152a8f94ed3969bc3", + "name": "roles/os9_logging/defaults/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_logging/tasks", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "177872b6c9f2d6a1c9bdf150b3b4a77072c4af8ab76c8c304305fdd5d4fdb0c9", + "name": "roles/os9_logging/tasks/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_ecmp", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_ecmp/handlers", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "0b4f9c65d055ecdedd62f295d6582d792ee3023ef75203e131379180ca595b5f", + "name": "roles/os9_ecmp/handlers/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "5883eb4c7ece1931e1b25a9071bcbe50c1eaab7b9a38d2515e1b4be29e630fb3", + "name": "roles/os9_ecmp/LICENSE", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_ecmp/tests", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "f5b68d8f1801c40577f9acc356e0c9a8a08ac91ddbd4f3d82158a808fd9d9770", + "name": "roles/os9_ecmp/tests/inventory.yaml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "2887f736ae9837d946286a7d3f37f2e344af45cbb6642d8f67bc250475628873", + "name": "roles/os9_ecmp/tests/main.os9.yaml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "0131fa28520315b169b620453dcc86c2fe369ae1843e605ca3ef160aac191192", + "name": "roles/os9_ecmp/tests/test.yaml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_ecmp/templates", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "b50beb983ed6d26e3a55e5f1226dae4bbe32fd8993191e2c5be7444b27d56590", + "name": "roles/os9_ecmp/templates/os9_ecmp.j2", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_ecmp/meta", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "3403ca7b7b2dddecd069d176ccdc743262e0d9d4d1b71cbf55d08e3b9bd412f5", + "name": "roles/os9_ecmp/meta/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_ecmp/vars", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "3ab88739f9e5506e3f03af1983e5889d465d6a8ec6fd4822ae1dd65abd58f718", + "name": "roles/os9_ecmp/vars/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "ed8f4d75b1440fd46a57314230bf6b4e7940715fd6f06550e2eb348897a70d58", + "name": "roles/os9_ecmp/README.md", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_ecmp/defaults", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "af442ee7c7c9e2a752861ff664e25a342b0f1e798b22b0a3361dc4d91a1f81c6", + "name": "roles/os9_ecmp/defaults/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_ecmp/tasks", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "2e33cb744140789803c982297776a734828e9b1b0a369a3f64687c67ba1a2b4e", + "name": "roles/os9_ecmp/tasks/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_dcb", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_dcb/handlers", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "b6dee9f01529a3945a1ef44678bd3ce2063c7b57359e72fac7526a4941ca61af", + "name": "roles/os9_dcb/handlers/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "5883eb4c7ece1931e1b25a9071bcbe50c1eaab7b9a38d2515e1b4be29e630fb3", + "name": "roles/os9_dcb/LICENSE", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_dcb/tests", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "f5b68d8f1801c40577f9acc356e0c9a8a08ac91ddbd4f3d82158a808fd9d9770", + "name": "roles/os9_dcb/tests/inventory.yaml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "1879ecba3e800b09be3ccb02e2f506a5255fa7d05e6f4147ab821aa13d4d309a", + "name": "roles/os9_dcb/tests/main.os9.yaml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "2fd0382a4e49d7b34e4cdc1646bbae302aa4c71edadd5001bf7ea8ab3a4d4863", + "name": "roles/os9_dcb/tests/test.yaml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_dcb/templates", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "9132818aba64211491e368f6ce466d20daf8f41188425bae13bd2afe8c14fc45", + "name": "roles/os9_dcb/templates/os9_dcb.j2", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_dcb/meta", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "93d73f08eb7f5cddf5e3fde83039d0af6a7e7b1dc20da90bfc5bb79d68599829", + "name": "roles/os9_dcb/meta/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_dcb/vars", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "8c65780c8a45b662cd6da234e12087283032cace0000763f245997a40ddf4cb1", + "name": "roles/os9_dcb/vars/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "d3fbc607d9d5654176b138ad3a3b8860bdd02efaee80857cc2c340fc47e012a3", + "name": "roles/os9_dcb/README.md", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_dcb/defaults", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "f2a1463ec0a20576475fccaea3587b7c0021d64f9db67cb57bfd6bff1d97472d", + "name": "roles/os9_dcb/defaults/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_dcb/tasks", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "8c219c522f0f0e34e311993513c54c403a7f14fd5e7a46f796bde3211bcad04e", + "name": "roles/os9_dcb/tasks/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_vrrp", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_vrrp/handlers", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "e14262571f041338ffb6ed5287842619eefc504e9a365ab0c5a2706733b59d97", + "name": "roles/os9_vrrp/handlers/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "5883eb4c7ece1931e1b25a9071bcbe50c1eaab7b9a38d2515e1b4be29e630fb3", + "name": "roles/os9_vrrp/LICENSE", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_vrrp/tests", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "f5b68d8f1801c40577f9acc356e0c9a8a08ac91ddbd4f3d82158a808fd9d9770", + "name": "roles/os9_vrrp/tests/inventory.yaml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "06c7945a53e3756ed9904678f7948c988a134b2e31367fd2ee061675ded0c28f", + "name": "roles/os9_vrrp/tests/main.os9.yaml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "43c0e775030d8eceabbe51458243c9a6d4b8ac31ce327e790adb3537ac1a6dcb", + "name": "roles/os9_vrrp/tests/test.yaml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_vrrp/templates", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "da5f553bf203e8bf1261a6c39f54474e6383f7fb198ce4525e27bb245f56f4d0", + "name": "roles/os9_vrrp/templates/os9_vrrp.j2", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_vrrp/meta", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "de4793fd6e3d27ceddcbc42a52f03ab2bfbfaadf09ca9f64384f1d4466b7e739", + "name": "roles/os9_vrrp/meta/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_vrrp/vars", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "8ad50a040d16c979338d20bc027c505d74973999fce4309cfb5effadbb48f2b5", + "name": "roles/os9_vrrp/vars/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "6af7dbc1efceae78d4e59fbcc1a3dda1a2042742e41f15f446c5c14541f14307", + "name": "roles/os9_vrrp/README.md", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_vrrp/defaults", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "d8bf1cbccecd2adca7d94456a1c682629720860e4ac71e8c53cc41b2f3d7265b", + "name": "roles/os9_vrrp/defaults/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_vrrp/tasks", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "c6c091fd261666fcb155aa3f53d435c8bce4f7afcc176124b7b8e3414d5357ea", + "name": "roles/os9_vrrp/tasks/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_users", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_users/handlers", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "564947fa6f512be5164882ea2e712e74644f07952416745a3bec43d003222d09", + "name": "roles/os9_users/handlers/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "5883eb4c7ece1931e1b25a9071bcbe50c1eaab7b9a38d2515e1b4be29e630fb3", + "name": "roles/os9_users/LICENSE", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_users/tests", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "f5b68d8f1801c40577f9acc356e0c9a8a08ac91ddbd4f3d82158a808fd9d9770", + "name": "roles/os9_users/tests/inventory.yaml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "2ef47d1df27ce87233757f2ac53dd95216fab5c1fba3a192c4840f81de19c91a", + "name": "roles/os9_users/tests/main.os9.yaml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "d6abe4a2dfa4ee140d104db11dfffcc20292e3dd7f946711bda115f922d3ac94", + "name": "roles/os9_users/tests/test.yaml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_users/templates", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "5acd0a378bc82e6c64d5e7491df5d0f6267e3d43fceedad591eddcb36acb5dac", + "name": "roles/os9_users/templates/os9_users.j2", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_users/meta", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "b0979140519185b665b020d642c2bb243524e1a9a22ad8dd3d73d653ae96f951", + "name": "roles/os9_users/meta/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_users/vars", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "f342917d465c3eb791bb41253bf90355047d6362f20d198b110f8a419d9e49a3", + "name": "roles/os9_users/vars/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "61b015f4b27447519bcb59a438f438657bdba3089f542b1e663421875f21e210", + "name": "roles/os9_users/README.md", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_users/defaults", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "867fecb1d2f46cbef060883395f455fe9945458e38b16f7da343749ba2a66414", + "name": "roles/os9_users/defaults/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_users/tasks", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "1eada97cb8000ff2dc0d71168b591225e75b5643ca1d21d6ee4e5ba092b7b424", + "name": "roles/os9_users/tasks/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_interface", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_interface/handlers", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "06cb55093c7919c9b833928237314e617b3454c2e1f883d1fbd1042c08ba3b8c", + "name": "roles/os9_interface/handlers/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "5883eb4c7ece1931e1b25a9071bcbe50c1eaab7b9a38d2515e1b4be29e630fb3", + "name": "roles/os9_interface/LICENSE", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_interface/tests", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "f5b68d8f1801c40577f9acc356e0c9a8a08ac91ddbd4f3d82158a808fd9d9770", + "name": "roles/os9_interface/tests/inventory.yaml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "e9cad0fc65504bd7c7833ed3e9851563cd8de34e546ca88a4b628e54c84b3687", + "name": "roles/os9_interface/tests/main.os9.yaml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "bd827c9440da10af0908feb9fc80e9aee4050a858cba6f5d91b9d5506d4a4b44", + "name": "roles/os9_interface/tests/test.yaml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_interface/templates", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "9f7b85676c476ea75a38bf9bd637592856684c5b791d2121777ba6bb0ef35aa0", + "name": "roles/os9_interface/templates/os9_interface.j2", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_interface/meta", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "15ad26d58ac0d83592e74a9c7ed2ca686f3e6941ff3b8b7bf674fa4a74b90ad8", + "name": "roles/os9_interface/meta/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_interface/vars", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "f6669df8a0566976a72f43f5250f73d97c797362855aa6471aad87f2a2669fd5", + "name": "roles/os9_interface/vars/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "c1974d2c55eef43d63c133aca494e7272abdf73233bf1d5da6933bdab6078386", + "name": "roles/os9_interface/README.md", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_interface/defaults", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "c6e2d02450c180c4b6046f3c8c1dd6182596cfd6e7c5b2ec8bc55ffebe02410d", + "name": "roles/os9_interface/defaults/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_interface/tasks", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "4b256fa702eac321dd120c22381ebaf74fef91ad8cd1c846566afbb8e82a3fcf", + "name": "roles/os9_interface/tasks/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_xstp", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_xstp/handlers", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "7f06b39a0d22144098a7436d20589fe60993b26fd57c3b30fb8b995351a026ec", + "name": "roles/os9_xstp/handlers/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "5883eb4c7ece1931e1b25a9071bcbe50c1eaab7b9a38d2515e1b4be29e630fb3", + "name": "roles/os9_xstp/LICENSE", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_xstp/tests", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "f5b68d8f1801c40577f9acc356e0c9a8a08ac91ddbd4f3d82158a808fd9d9770", + "name": "roles/os9_xstp/tests/inventory.yaml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "20f351bb4c6447e74fd6f694724b9c9880d5820f257b9cf017aab1b9357a22b3", + "name": "roles/os9_xstp/tests/main.os9.yaml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "60a16999f83102fc0a60b1dc62c3d8da3d82cd925231be9a84dd582a05367961", + "name": "roles/os9_xstp/tests/test.yaml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_xstp/templates", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "518f9666f56eee0374a345c8d66e95f89a6b54b8d437aaa4647e01b7f86317c4", + "name": "roles/os9_xstp/templates/os9_xstp.j2", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_xstp/meta", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "ce35411b14512701202f5951dcfbec195650af9fddc89690594f08ba3a0889fe", + "name": "roles/os9_xstp/meta/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_xstp/vars", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "b9c4e648b0f71e05a139a0a60e31834db399a4271420c8d015195d27d788eb92", + "name": "roles/os9_xstp/vars/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "e4acb30fac87a104e4acd23307b9d56243561919b56f13263734e4935aa724ef", + "name": "roles/os9_xstp/README.md", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_xstp/defaults", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "601f927b7dd50f6e6d4172e0b5bd895b16285bb81e3eec25571aa218cea59958", + "name": "roles/os9_xstp/defaults/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_xstp/tasks", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "0457d3e39544589ca342c73424ef9af18f01ea64ea7ee3bddf7f70d0c06c3148", + "name": "roles/os9_xstp/tasks/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_dns", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_dns/handlers", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "d563505ac5f9e86cd31c8858f8d1f3280d0120df01d4b7cdbc294e32040c8963", + "name": "roles/os9_dns/handlers/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "5883eb4c7ece1931e1b25a9071bcbe50c1eaab7b9a38d2515e1b4be29e630fb3", + "name": "roles/os9_dns/LICENSE", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_dns/tests", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "f5b68d8f1801c40577f9acc356e0c9a8a08ac91ddbd4f3d82158a808fd9d9770", + "name": "roles/os9_dns/tests/inventory.yaml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "91fb7feb04a43a6e745068a54b5399ab757cefdaf59fa6fd1e58bf046ae72997", + "name": "roles/os9_dns/tests/main.os9.yaml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "17decf3eec309eb00c6836a4beedc8072a61befd67eec9c5972bca2a99ebc941", + "name": "roles/os9_dns/tests/test.yaml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_dns/templates", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "ec177955fd27a81e864b82af4914c04e29ad1f5459cfb1fff6fcb213afb45f17", + "name": "roles/os9_dns/templates/os9_dns.j2", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_dns/meta", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "6590574613a0d22d15672f3156f7aefb865b2543f7e7e3b2273e30f5a416b77a", + "name": "roles/os9_dns/meta/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_dns/vars", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "ed942b5afe9a98c6c297aa61685e7a2e02f14591bf97e0b88baec7d4bedba10e", + "name": "roles/os9_dns/vars/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "2e032670738e7258a61d77e685beb840702a2eacfdbef6ec3af3aca5fc945386", + "name": "roles/os9_dns/README.md", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_dns/defaults", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "7f760f65685d6c512fbceeacabae0a50e3628efe3120973750c1addd1c4ff1d3", + "name": "roles/os9_dns/defaults/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_dns/tasks", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "f3ad5e14b372d852332ad5869bf7872dec83160a5fb227a84d63d8d9f06708b3", + "name": "roles/os9_dns/tasks/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_vlan", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_vlan/handlers", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "cbbbd29017700d1dd2c88752c27a8cd1c49ec80a58ce65552bd220cf6130ae75", + "name": "roles/os9_vlan/handlers/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "5883eb4c7ece1931e1b25a9071bcbe50c1eaab7b9a38d2515e1b4be29e630fb3", + "name": "roles/os9_vlan/LICENSE", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_vlan/tests", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "f5b68d8f1801c40577f9acc356e0c9a8a08ac91ddbd4f3d82158a808fd9d9770", + "name": "roles/os9_vlan/tests/inventory.yaml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "9f9ef9b08b8e36ed3ba0179873751eecefabae0ffd664f351d22227d00fa9e0c", + "name": "roles/os9_vlan/tests/main.os9.yaml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "4018361707fab5667b43805963b21dfa1f8752ceb9a3dbecd52f65066811dce1", + "name": "roles/os9_vlan/tests/test.yaml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_vlan/templates", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "e8291586b745585ed2bc488e9aae24d989b95b9cc1fcd6cf450059ce63b82cb6", + "name": "roles/os9_vlan/templates/os9_vlan.j2", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_vlan/meta", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "d82b31e71f2000b209fc6a91dff8ee36448138c7a38524c5c5424b285a3604d9", + "name": "roles/os9_vlan/meta/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_vlan/vars", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "a5a44d45dc61f9efabc3f6fae37c33cb55bcab7f62a460c75f4f3fff42598ca2", + "name": "roles/os9_vlan/vars/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "24b34bd5b0f9c8738728e8a3b937c89e462ea902c5288ac764a5da0d3a96f457", + "name": "roles/os9_vlan/README.md", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_vlan/defaults", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "3abddd14991d068ad364bd2e46437fff7398f71d0d7cf92b9a10b3dca5cbd9ff", + "name": "roles/os9_vlan/defaults/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_vlan/tasks", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "bfb597d511246cac6886b4639f4fa5858df32b4a49235b07cb12e6bb965b8684", + "name": "roles/os9_vlan/tasks/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_acl", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_acl/handlers", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "41505d1144bcec0a736a30bb7a675387edefcd3f43786c11642facd88debc46a", + "name": "roles/os9_acl/handlers/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "5883eb4c7ece1931e1b25a9071bcbe50c1eaab7b9a38d2515e1b4be29e630fb3", + "name": "roles/os9_acl/LICENSE", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_acl/tests", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "f5b68d8f1801c40577f9acc356e0c9a8a08ac91ddbd4f3d82158a808fd9d9770", + "name": "roles/os9_acl/tests/inventory.yaml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "b66014feff883af307b5b3284a1da62a647dfb3bf47dba57c109e85ee247e456", + "name": "roles/os9_acl/tests/main.os9.yaml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "2c34b288af25aa54fde46bae5baa21fedeb5cf7f0644a7e7ebd35b2900b14452", + "name": "roles/os9_acl/tests/test.yaml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_acl/templates", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "ebad1f9043572155dc792e70fc54da5a9de28edd93de8bb16aa6a419b403f168", + "name": "roles/os9_acl/templates/os9_acl.j2", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_acl/meta", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "e06f7c300f06675328ca857b16b2d9752a508680b384975fba89792ca1575eaa", + "name": "roles/os9_acl/meta/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_acl/vars", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "ef238bf54c409cb4adce143ce09d457e00c60f6c59b6d7e1aee588ed6151cc7f", + "name": "roles/os9_acl/vars/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "40edb7024f466d237d8d32f1f5085e48359a3e178c035bc0fd0430b58e84990b", + "name": "roles/os9_acl/README.md", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_acl/defaults", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "4206de44d73c0016a24aa118927f90e4de3099612b386424eed651b33a28ad50", + "name": "roles/os9_acl/defaults/main.yml", + "chksum_type": "sha256", + "format": 1 + }, + { + "ftype": "dir", + "chksum_sha256": null, + "name": "roles/os9_acl/tasks", + "chksum_type": null, + "format": 1 + }, + { + "ftype": "file", + "chksum_sha256": "82b059098882a03cf7486e95d81a275c6d1cb89050e1330264864068d515a256", + "name": "roles/os9_acl/tasks/main.yml", + "chksum_type": "sha256", + "format": 1 + } + ], + "format": 1 +}
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/LICENSE b/ansible_collections/dellemc/os9/LICENSE new file mode 100644 index 000000000..2c9b8e1fd --- /dev/null +++ b/ansible_collections/dellemc/os9/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/> + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (c) 2020, Dell Inc. All rights reserved. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <https://www.gnu.org/licenses/>. + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + <program> Copyright (c) 2020, Dell Inc. All rights reserved. + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +<https://www.gnu.org/licenses/>. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +<https://www.gnu.org/licenses/why-not-lgpl.html>. diff --git a/ansible_collections/dellemc/os9/MANIFEST.json b/ansible_collections/dellemc/os9/MANIFEST.json new file mode 100644 index 000000000..546d3f173 --- /dev/null +++ b/ansible_collections/dellemc/os9/MANIFEST.json @@ -0,0 +1,37 @@ +{ + "collection_info": { + "description": "Ansible Network Collections for Dell EMC OS9", + "repository": "https://github.com/ansible-collections/dellemc.os9", + "tags": [ + "dell", + "dellemc", + "os9", + "emc", + "networking" + ], + "dependencies": { + "ansible.netcommon": ">=1.0.0" + }, + "authors": [ + "Senthil Ganesan Ganesan <Senthil_Kumar_Ganesa@Dell.com>", + "Komal Patil <Komal_uttamrao_Patil@dell.com>" + ], + "issues": "https://github.com/ansible-collections/dellemc.os9/issues", + "name": "os9", + "license": [], + "documentation": "https://github.com/ansible-collections/dellemc.os9/tree/master/docs", + "namespace": "dellemc", + "version": "1.0.4", + "readme": "README.md", + "license_file": "LICENSE", + "homepage": "https://github.com/ansible-collections/dellemc.os9" + }, + "file_manifest_file": { + "format": 1, + "ftype": "file", + "chksum_sha256": "7666ea3d71e26d56fcb8d90a06ea28c4e634ea9a3618f96e7ab99cd276ea67fb", + "name": "FILES.json", + "chksum_type": "sha256" + }, + "format": 1 +}
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/README.md b/ansible_collections/dellemc/os9/README.md new file mode 100644 index 000000000..0ed967442 --- /dev/null +++ b/ansible_collections/dellemc/os9/README.md @@ -0,0 +1,96 @@ +# Ansible Network Collection for Dell EMC OS9 + +## Collection contents + +This collection includes the Ansible modules, plugins and roles needed to provision and manage Dell EMC PowerSwitch platforms running Dell EMC OS9. Sample playbooks and documentation are also included to show how the collection can be used. + +### Collection core modules + +- **os9_command.py** — Run commands on devices running OS9 + +- **os9_config.py** — Manage configuration sections on devices running OS9 + +- **os9_facts.py** — Collect facts from devices running OS9 + +### Collection roles + +These roles facilitate provisioning and administration of devices running Dell EMC OS9. There are over 22 roles available that provide a comprehensive coverage of most OS9 resources, including os9_aaa, os9_bgp and os9_ecmp. The documentation for each role is at [OS9 roles](https://github.com/ansible-collections/dellemc.os9/blob/master/docs/roles.rst). + +### Sample use case playbooks + +This collection includes the following sample playbooks that illustrate end to end use cases: + +- [CLOS Fabric](https://github.com/ansible-collections/dellemc.os9/blob/master/playbooks/clos_fabric_ebgp/README.md) — Example playbook to build a Layer 3 Leaf-Spine fabric + +## Installation + +Use this command to install the latest version of the OS9 collection from Ansible Galaxy: + +``` + ansible-galaxy collection install dellemc.os9 + +``` + +To install a specific version, a version range identifier must be specified. For example, to install the most recent version that is greater than or equal to 1.0.0 and less than 2.0.0: + +``` + ansible-galaxy collection install 'dellemc.os9:>=1.0.0,<2.0.0' + +``` + +## Version compatibility + +* Ansible version 2.10 or higher +* Python 2.7 or higher and Python 3.5 or higher + +> **NOTE**: For Ansible versions lower than 2.10, use the legacy [dellos9 modules](https://ansible-dellos-docs.readthedocs.io/en/latest/modules.html#os9-modules) and [dellos roles](https://ansible-dellos-docs.readthedocs.io/en/latest/roles.html). + + +## Sample playbook + +**playbook.yaml** + +``` +- hosts: os9_switches + connection: network_cli + collections: + - dellemc.os9 + roles: + - os9_vlan +``` + +**host_vars/os9_sw1.yaml** + +``` +hostname: os9_sw1 +# Parameters for connection type network_cli +ansible_ssh_user: xxxx +ansible_ssh_pass: xxxx +ansible_network_os: dellemc.os9.os9 + +# Create vlan100 and delete vlan888 +os9_vlan: + vlan 100: + description: "Blue" + state: present + vlan 888: + state: absent + +``` + +**inventory.yaml** + +``` +[os9_sw1] +os9_sw1 ansible_host=100.104.28.119 + +[os9_sw2] +os9_sw2 ansible_host=100.104.28.118 + +[os9_switches:children] +os9_sw1 +os9_sw2 + +``` + +(c) 2017-2020 Dell Inc. or its subsidiaries. All rights reserved. diff --git a/ansible_collections/dellemc/os9/changelogs/CHANGELOG.rst b/ansible_collections/dellemc/os9/changelogs/CHANGELOG.rst new file mode 100644 index 000000000..e91c0ed13 --- /dev/null +++ b/ansible_collections/dellemc/os9/changelogs/CHANGELOG.rst @@ -0,0 +1,76 @@ +====================================================================== +Ansible Network Collection for Dell EMC OS9 Release Notes +====================================================================== + +.. contents:: Topics + +v1.0.4 +====== + +Release Summary +--------------- + +- Fixed sanity error found during the sanity tst of automation hub upload +- Fix issue in using list of strings for commands argument for os10_command module (https://github.com/ansible-collections/dellemc.os9/issues/15) + +v1.0.3 +====== + +Release Summary +--------------- + +Added bug fixes for bugs found during System Test. + +v1.0.2 +====== + +Release Summary +--------------- + +Added changelogs. + +v1.0.1 +====== + +Release Summary +--------------- + +Updated documentation review comments. + +v1.0.0 +====== + +New Modules +----------- + +- os9_command - Run commands on devices running Dell EMC os9. +- os9_config - Manage configuration on devices running os9. +- os9_facts - Collect facts from devices running os9. + +New Roles +--------- + +- os9_aaa - Facilitates the configuration of Authentication Authorization and Accounting (AAA), TACACS and RADIUS server. +- os9_acl - Facilitates the configuration of Access Control lists. +- os9_bgp - Facilitates the configuration of border gateway protocol (BGP) attributes. +- os9_copy_config - This role pushes the backup running configuration into a os9 device. +- os9_dcb - Facilitates the configuration of data center bridging (DCB). +- os9_dns - Facilitates the configuration of domain name service (DNS). +- os9_ecmp - Facilitates the configuration of equal cost multi-path (ECMP) for IPv4. +- os9_interface - Facilitates the configuration of interface attributes. +- os9_lag - Facilitates the configuration of link aggregation group (LAG) attributes. +- os9_lldp - Facilitates the configuration of link layer discovery protocol (LLDP) attributes at global and interface level. +- os9_logging - Facilitates the configuration of global logging attributes and logging servers. +- os9_ntp - Facilitates the configuration of network time protocol (NTP) attributes. +- os9_prefix_list - Facilitates the configuration of IP prefix-list. +- os9_sflow - Facilitates the configuration of global and interface level sFlow attributes. +- os9_snmp - Facilitates the configuration of global SNMP attributes. +- os9_system - Facilitates the configuration of hostname and hashing algorithm. +- os9_users - Facilitates the configuration of global system user attributes. +- os9_vlan - Facilitates the configuration of virtual LAN (VLAN) attributes. +- os9_vlt - Facilitates the configuration of virtual link trunking (VLT). +- os9_vrf - Facilitates the configuration of virtual routing and forwarding (VRF). +- os9_vrrp - Facilitates the configuration of virtual router redundancy protocol (VRRP) attributes. +- os9_xstp - Facilitates the configuration of xSTP attributes. + +\(c) 2020 Dell Inc. or its subsidiaries. All Rights Reserved. diff --git a/ansible_collections/dellemc/os9/changelogs/changelog.yaml b/ansible_collections/dellemc/os9/changelogs/changelog.yaml new file mode 100644 index 000000000..82ea60c2e --- /dev/null +++ b/ansible_collections/dellemc/os9/changelogs/changelog.yaml @@ -0,0 +1,107 @@ +ancestor: null +releases: + 1.0.0: + modules: + - description: Run commands on devices running Dell EMC os9. + name: os9_command + namespace: '' + - description: Manage configuration on devices running os9. + name: os9_config + namespace: '' + - description: Collect facts from devices running os9. + name: os9_facts + namespace: '' + roles: + - description: Facilitates the configuration of Authentication Authorization and Accounting (AAA), TACACS and RADIUS server. + name: os9_aaa + namespace: '' + - description: Facilitates the configuration of Access Control lists. + name: os9_acl + namespace: '' + - description: Facilitates the configuration of border gateway protocol (BGP) attributes. + name: os9_bgp + namespace: '' + - description: This role pushes the backup running configuration into a OS9 device. + name: os9_copy_config + namespace: '' + - description: Facilitates the configuration of data center bridging (DCB). + name: os9_dcb + namespace: '' + - description: Facilitates the configuration of domain name service (DNS). + name: os9_dns + namespace: '' + - description: Facilitates the configuration of equal cost multi-path (ECMP) for IPv4. + name: os9_ecmp + namespace: '' + - description: Facilitates the configuration of interface attributes. + name: os9_interface + namespace: '' + - description: Facilitates the configuration of link aggregation group (LAG) attributes. + name: os9_lag + namespace: '' + - description: Facilitates the configuration of link layer discovery protocol (LLDP) attributes at global and interface level. + name: os9_lldp + namespace: '' + - description: Facilitates the configuration of global logging attributes and logging servers. + name: os9_logging + namespace: '' + - description: Facilitates the configuration of network time protocol (NTP) attributes. + name: os9_ntp + namespace: '' + - description: Facilitates the configuration of IP prefix-list. + name: os9_prefix_list + namespace: '' + - description: Facilitates the configuration of global and interface level sFlow attributes. + name: os9_sflow + namespace: '' + - description: Facilitates the configuration of global SNMP attributes. + name: os9_snmp + namespace: '' + - description: Facilitates the configuration of hostname and hashing algorithm. + name: os9_system + namespace: '' + - description: Facilitates the configuration of global system user attributes. + name: os9_users + namespace: '' + - description: Facilitates the configuration of virtual LAN (VLAN) attributes. + name: os9_vlan + namespace: '' + - description: Facilitates the configuration of virtual link trunking (VLT). + name: os9_vlt + namespace: '' + - description: Facilitates the configuration of virtual routing and forwarding (VRF). + name: os9_vrf + namespace: '' + - description: Facilitates the configuration of virtual router redundancy protocol (VRRP) attributes. + name: os9_vrrp + namespace: '' + - description: Facilitates the configuration of xSTP attributes. + name: os9_xstp + namespace: '' + release_date: '2020-07-31' + 1.0.1: + changes: + release_summary: Updated documentation review comments + fragments: + - 1.0.1.yaml + release_date: '2020-08-04' + 1.0.2: + changes: + release_summary: Added changelogs. + fragments: + - 1.0.2.yaml + release_date: '2020-08-18' + 1.0.3: + changes: + release_summary: Added bug fixes for bugs found during System Test. + fragments: + - 1.0.3.yaml + release_date: '2020-10-09' + 1.0.4: + changes: + bugfixes: + - Fixed sanity error found during the sanity tst of automation hub upload + - Fix issue in using list of strings for commands argument for os10_command module (https://github.com/ansible-collections/dellemc.os9/issues/15) + fragments: + - 1.0.4.yaml + release_date: '2021-02-15'
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/changelogs/config.yaml b/ansible_collections/dellemc/os9/changelogs/config.yaml new file mode 100644 index 000000000..d536811c3 --- /dev/null +++ b/ansible_collections/dellemc/os9/changelogs/config.yaml @@ -0,0 +1,30 @@ +changelog_filename_template: CHANGELOG.rst +changelog_filename_version_depth: 0 +changes_file: changelog.yaml +changes_format: combined +keep_fragments: false +mention_ancestor: true +new_plugins_after_name: removed_features +notesdir: fragments +prelude_section_name: release_summary +prelude_section_title: Release Summary +flatmap: true +sections: +- - major_changes + - Major Changes +- - minor_changes + - Minor Changes +- - breaking_changes + - Breaking Changes / Porting Guide +- - deprecated_features + - Deprecated Features +- - removed_features + - Removed Features (previously deprecated) +- - security_fixes + - Security Fixes +- - bugfixes + - Bugfixes +- - known_issues + - Known Issues +title: Ansible Network Collection for Dell EMC OS9 +trivial_section_name: trivial diff --git a/ansible_collections/dellemc/os9/docs/os9_aaa.md b/ansible_collections/dellemc/os9/docs/os9_aaa.md new file mode 100644 index 000000000..276bb7667 --- /dev/null +++ b/ansible_collections/dellemc/os9/docs/os9_aaa.md @@ -0,0 +1 @@ +../roles/os9_aaa/README.md
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/docs/os9_acl.md b/ansible_collections/dellemc/os9/docs/os9_acl.md new file mode 100644 index 000000000..e2a0fe662 --- /dev/null +++ b/ansible_collections/dellemc/os9/docs/os9_acl.md @@ -0,0 +1 @@ +../roles/os9_acl/README.md
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/docs/os9_bgp.md b/ansible_collections/dellemc/os9/docs/os9_bgp.md new file mode 100644 index 000000000..dc6b754cd --- /dev/null +++ b/ansible_collections/dellemc/os9/docs/os9_bgp.md @@ -0,0 +1 @@ +../roles/os9_bgp/README.md
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/docs/os9_copy_config.md b/ansible_collections/dellemc/os9/docs/os9_copy_config.md new file mode 100644 index 000000000..d9342bc2a --- /dev/null +++ b/ansible_collections/dellemc/os9/docs/os9_copy_config.md @@ -0,0 +1 @@ +../roles/os9_copy_config/README.md
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/docs/os9_dcb.md b/ansible_collections/dellemc/os9/docs/os9_dcb.md new file mode 100644 index 000000000..7199f1f64 --- /dev/null +++ b/ansible_collections/dellemc/os9/docs/os9_dcb.md @@ -0,0 +1 @@ +../roles/os9_dcb/README.md
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/docs/os9_dns.md b/ansible_collections/dellemc/os9/docs/os9_dns.md new file mode 100644 index 000000000..011470824 --- /dev/null +++ b/ansible_collections/dellemc/os9/docs/os9_dns.md @@ -0,0 +1 @@ +../roles/os9_dns/README.md
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/docs/os9_ecmp.md b/ansible_collections/dellemc/os9/docs/os9_ecmp.md new file mode 100644 index 000000000..b3281d802 --- /dev/null +++ b/ansible_collections/dellemc/os9/docs/os9_ecmp.md @@ -0,0 +1 @@ +../roles/os9_ecmp/README.md
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/docs/os9_interface.md b/ansible_collections/dellemc/os9/docs/os9_interface.md new file mode 100644 index 000000000..1fc7f06e1 --- /dev/null +++ b/ansible_collections/dellemc/os9/docs/os9_interface.md @@ -0,0 +1 @@ +../roles/os9_interface/README.md
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/docs/os9_lag.md b/ansible_collections/dellemc/os9/docs/os9_lag.md new file mode 100644 index 000000000..3621b7a1f --- /dev/null +++ b/ansible_collections/dellemc/os9/docs/os9_lag.md @@ -0,0 +1 @@ +../roles/os9_lag/README.md
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/docs/os9_lldp.md b/ansible_collections/dellemc/os9/docs/os9_lldp.md new file mode 100644 index 000000000..619667acc --- /dev/null +++ b/ansible_collections/dellemc/os9/docs/os9_lldp.md @@ -0,0 +1 @@ +../roles/os9_lldp/README.md
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/docs/os9_logging.md b/ansible_collections/dellemc/os9/docs/os9_logging.md new file mode 100644 index 000000000..eb996e012 --- /dev/null +++ b/ansible_collections/dellemc/os9/docs/os9_logging.md @@ -0,0 +1 @@ +../roles/os9_logging/README.md
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/docs/os9_ntp.md b/ansible_collections/dellemc/os9/docs/os9_ntp.md new file mode 100644 index 000000000..6e6800f07 --- /dev/null +++ b/ansible_collections/dellemc/os9/docs/os9_ntp.md @@ -0,0 +1 @@ +../roles/os9_ntp/README.md
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/docs/os9_prefix_list.md b/ansible_collections/dellemc/os9/docs/os9_prefix_list.md new file mode 100644 index 000000000..53760cec9 --- /dev/null +++ b/ansible_collections/dellemc/os9/docs/os9_prefix_list.md @@ -0,0 +1 @@ +../roles/os9_prefix_list/README.md
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/docs/os9_sflow.md b/ansible_collections/dellemc/os9/docs/os9_sflow.md new file mode 100644 index 000000000..293434466 --- /dev/null +++ b/ansible_collections/dellemc/os9/docs/os9_sflow.md @@ -0,0 +1 @@ +../roles/os9_sflow/README.md
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/docs/os9_snmp.md b/ansible_collections/dellemc/os9/docs/os9_snmp.md new file mode 100644 index 000000000..c698c4a73 --- /dev/null +++ b/ansible_collections/dellemc/os9/docs/os9_snmp.md @@ -0,0 +1 @@ +../roles/os9_snmp/README.md
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/docs/os9_system.md b/ansible_collections/dellemc/os9/docs/os9_system.md new file mode 100644 index 000000000..350df9ae7 --- /dev/null +++ b/ansible_collections/dellemc/os9/docs/os9_system.md @@ -0,0 +1 @@ +../roles/os9_system/README.md
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/docs/os9_users.md b/ansible_collections/dellemc/os9/docs/os9_users.md new file mode 100644 index 000000000..893584bba --- /dev/null +++ b/ansible_collections/dellemc/os9/docs/os9_users.md @@ -0,0 +1 @@ +../roles/os9_users/README.md
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/docs/os9_vlan.md b/ansible_collections/dellemc/os9/docs/os9_vlan.md new file mode 100644 index 000000000..62b37f32c --- /dev/null +++ b/ansible_collections/dellemc/os9/docs/os9_vlan.md @@ -0,0 +1 @@ +../roles/os9_vlan/README.md
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/docs/os9_vlt.md b/ansible_collections/dellemc/os9/docs/os9_vlt.md new file mode 100644 index 000000000..e492ad7a1 --- /dev/null +++ b/ansible_collections/dellemc/os9/docs/os9_vlt.md @@ -0,0 +1 @@ +../roles/os9_vlt/README.md
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/docs/os9_vrf.md b/ansible_collections/dellemc/os9/docs/os9_vrf.md new file mode 100644 index 000000000..3c1c4488f --- /dev/null +++ b/ansible_collections/dellemc/os9/docs/os9_vrf.md @@ -0,0 +1 @@ +../roles/os9_vrf/README.md
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/docs/os9_vrrp.md b/ansible_collections/dellemc/os9/docs/os9_vrrp.md new file mode 100644 index 000000000..3ba26515d --- /dev/null +++ b/ansible_collections/dellemc/os9/docs/os9_vrrp.md @@ -0,0 +1 @@ +../roles/os9_vrrp/README.md
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/docs/os9_xstp.md b/ansible_collections/dellemc/os9/docs/os9_xstp.md new file mode 100644 index 000000000..85137fd47 --- /dev/null +++ b/ansible_collections/dellemc/os9/docs/os9_xstp.md @@ -0,0 +1 @@ +../roles/os9_xstp/README.md
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/docs/roles.rst b/ansible_collections/dellemc/os9/docs/roles.rst new file mode 100644 index 000000000..b87901d9c --- /dev/null +++ b/ansible_collections/dellemc/os9/docs/roles.rst @@ -0,0 +1,136 @@ +############################################################## +Ansible Network Collection Roles for Dell EMC OS9 +############################################################## + +The roles facilitate provisioning of devices running Dell EMC OS9. This document describes each of the roles. + +AAA role +-------- + +The `os9_aaa <https://github.com/ansible-collections/dellemc.os9/blob/master/roles/os9_aaa/README.md>`_ role facilitates the configuration of authentication, authorization, and acccounting (AAA). It supports the configuration of TACACS and RADIUS server and AAA. + + +ACL role +-------- + +The `os9_acl <https://github.com/ansible-collections/dellemc.os9/blob/master/roles/os9_acl/README.md>`_ role facilitates the configuration of an Access Control list (ACL). It supports the configuration of different types of ACLs (standard and extended) for both IPv4 and IPv6, and assigns the access-class to line terminals. + + +BGP role +-------- + +The `os9_bgp <https://github.com/ansible-collections/dellemc.os9/blob/master/roles/os9_bgp/README.md>`_ role facilitates the configuration of border gateway protocol (BGP) attributes. It supports the configuration of router ID, networks, neighbors, and maximum path. + + +Copy configuration role +----------------------- + +The `os9_copy_config <https://github.com/ansible-collections/dellemc.os9/blob/master/roles/os9_copy_config/README.md>`_ role pushes the backup running configuration into a device. This role merges the configuration in the template file with the running configuration of the Dell EMC Networking OS9 device. + + +DCB role +-------- + +The `os9_dcb <https://github.com/ansible-collections/dellemc.os9/blob/master/roles/os9_dcb/README.md>`_ role facilitates the configuration of data center bridging (DCB). It supports the configuration of the DCB map and the DCB buffer, and assigns them to interfaces. + + +DNS role +-------- + +The `os9_dns <https://github.com/ansible-collections/dellemc.os9/blob/master/roles/os9_dns/README.md>`_ role facilitates the configuration of domain name service (DNS). + + +ECMP role +--------- + +The `os9_ecmp <https://github.com/ansible-collections/dellemc.os9/blob/master/roles/os9_ecmp/README.md>`_ role facilitates the configuration of equal cost multi-path (ECMP). It supports the configuration of ECMP for IPv4. + + +Interface role +-------------- + +The `os9_interface <https://github.com/ansible-collections/dellemc.os9/blob/master/roles/os9_interface/README.md>`_ role facilitates the configuration of interface attributes. It supports the configuration of administrative state, description, MTU, IP address, IP helper, suppress_ra and port mode. + + +LAG role +-------- + +The `os9_lag <https://github.com/ansible-collections/dellemc.os9/blob/master/roles/os9_lag/README.md>`_ role facilitates the configuration of link aggregation group (LAG) attributes, and supports the creation and deletion of a LAG and its member ports. It also supports the configuration of an interface type (static/dynamic) and minimum required link. + + +LLDP role +--------- + +The `os9_lldp <https://github.com/ansible-collections/dellemc.os9/blob/master/roles/os9_lldp/README.md>`_ role facilitates the configuration of link layer discovery protocol (LLDP) attributes at global and interface level. This role supports the configuration of hello, mode, multiplier, advertise tlvs, management interface, fcoe, iscsi at global and interface levels. + + +Logging role +------------ + +The `os9_logging <https://github.com/ansible-collections/dellemc.os9/blob/master/roles/os9_logging/README.md>`_ role facilitates the configuration of global logging attributes, and supports the configuration of logging servers. + + +NTP role +-------- + +The `os9_ntp <https://github.com/ansible-collections/dellemc.os9/blob/master/roles/os9_ntp/README.md>`_ role facilitates the configuration of network time protocol attributes. + + +Prefix-list role +---------------- + +The `os9_prefix_list <https://github.com/ansible-collections/dellemc.os9/blob/master/roles/os9_prefix_list/README.md>`_ role facilitates the configuration of a prefix-list, supports the configuration of IP prefix-list, and assigns the prefix-list to line terminals. + + +sFlow role +---------- + +The `os9_sflow <https://github.com/ansible-collections/dellemc.os9/blob/master/roles/os9_sflow/README.md>`_ role facilitates the configuration of global and interface level sFlow attributes. It supports the configuration of sFlow collectors at the global level, enable/disable, and specification of sFlow polling-interval, sample-rate, max-datagram size, and so on are supported at the interface and global level. + + +SNMP role +--------- + +The `os9_snmp <https://github.com/ansible-collections/dellemc.os9/blob/master/roles/os9_snmp/README.md>`_ role facilitates the configuration of global snmp attributes. It supports the configuration of SNMP server attributes like users, group, community, location, and traps. + + +System role +----------- + +The `os9_system <https://github.com/ansible-collections/dellemc.os9/blob/master/roles/os9_system/README.md>`_ role facilitates the configuration of global system attributes. This role specifically enables configuration of hostname and enable password for os9. It also supports the configuration of management route, hash alogrithm, clock, line terminal, banner, and reload type. + + +Users role +---------- + +The `os9_users <https://github.com/ansible-collections/dellemc.os9/blob/master/roles/os9_users/README.md>`_ role facilitates the configuration of global system user attributes. This role supports the configuration of CLI users. + + +VLAN role +--------- + +The `os9_vlan <https://github.com/ansible-collections/dellemc.os9/blob/master/roles/os9_vlan/README.md>`_ role facilitates configuring virtual LAN (VLAN) attributes. This role supports the creation and deletion of a VLAN and its member ports. + + +VLT role +-------- + +The `os9_vlt <https://github.com/ansible-collections/dellemc.os9/blob/master/roles/os9_vlt/README.md>`_ role facilitates the configuration of the basics of virtual link trunking (VLT) to provide a loop-free topology. + + +VRF role +-------- + +The `os9_vrf <https://github.com/ansible-collections/dellemc.os9/blob/master/roles/os9_vrf/README.md>`_ role facilitates the configuration of basic virtual routing and forwarding (VRF) that helps in the partition of physical routers to multiple virtual routers. + + +VRRP role +--------- + +The `os9_vrrp <https://github.com/ansible-collections/dellemc.os9/blob/master/roles/os9_vrrp/README.md>`_ role facilitates configuration of virtual router redundancy protocol (VRRP) attributes. This role supports the creation of VRRP groups for interfaces, and setting the VRRP group attributes. + + +xSTP role +--------- + +The `os9_xstp <https://github.com/ansible-collections/dellemc.os9/blob/master/roles/os9_xstp/README.md>`_ role facilitates the configuration of xSTP attributes. This role supports multiple version of spanning-tree protocol (STP), rapid spanning-tree (RSTP) protocol, multiple spanning-tree (MST), and per-VLAN spanning-tree (PVST). This role supports the configuration of bridge priority, enabling and disabling spanning-tree, creating and deleting instances, and mapping virtual LAN (VLAN) to instances. diff --git a/ansible_collections/dellemc/os9/meta/runtime.yml b/ansible_collections/dellemc/os9/meta/runtime.yml new file mode 100644 index 000000000..ad1562588 --- /dev/null +++ b/ansible_collections/dellemc/os9/meta/runtime.yml @@ -0,0 +1,8 @@ +plugin_routing: + action: + os9_config: + redirect: dellemc.os9.os9 + os9_command: + redirect: dellemc.os9.os9 + os9_facts: + redirect: dellemc.os9.os9 diff --git a/ansible_collections/dellemc/os9/playbooks/clos_fabric_ebgp/README.md b/ansible_collections/dellemc/os9/playbooks/clos_fabric_ebgp/README.md new file mode 100644 index 000000000..410147db9 --- /dev/null +++ b/ansible_collections/dellemc/os9/playbooks/clos_fabric_ebgp/README.md @@ -0,0 +1,35 @@ +# Provision CLOS fabric using the Ansible collection for Dell EMC OS9 + +This example describes how to use Ansible to build a CLOS fabric with a Dell EMC PowerSwitch platform running Dell EMC OS9 device. The sample topology is a two-tier CLOS fabric with two spines and four leaves connected as mesh. eBGP is running between the two tiers. All switches in spine have the same AS number, and each leaf switch has a unique AS number. All AS numbers used are private. + +For application load-balancing purposes, the same prefix is advertised from multiple leaf switches and uses _BGP multipath relax_ feature. + +![CLOS FABRIC Topology](https://ansible-dellos-docs.readthedocs.io/en/latest/_images/topo.png) + +## Create a simple Ansible playbook + +**1**. Create an inventory file called `inventory.yaml`, then specify the device IP address. + +**2**. Create a group variable file called `group_vars/all`, then define credentials and SNMP variables. + +**3**. Create a group variable file called `group_vars/spine.yaml`, then define credentials, hostname, and BGP neighbors of spine group. + +**4**. Create a host variable file called `host_vars/spine1.yaml`, then define the host, credentials, and transport. + +**5**. Create a host variable file called `host_vars/spine2.yaml`, then define the host, credentials, and transport. + +**6**. Create a host variable file called `host_vars/leaf1.yaml`, then define the host, credentials, and transport. + +**7**. Create a host variable file called `host_vars/leaf2.yaml`, then define the host, credentials, and transport. + +**8**. Create a host variable file called `host_vars/leaf3.yaml`, then define the host, credentials, and transport. + +**9**. Create a host variable file called `host_vars/leaf4.yaml`, then define the host, credentials, and transport. + +**10**. Create a playbook called `datacenter.yaml`. + +**11**. Run the playbook. + + ansible-playbook -i inventory.yaml datacenter.yaml + +(c) 2017-2020 Dell Inc. or its subsidiaries. All rights reserved.
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/playbooks/clos_fabric_ebgp/datacenter.yaml b/ansible_collections/dellemc/os9/playbooks/clos_fabric_ebgp/datacenter.yaml new file mode 100644 index 000000000..f17ebd143 --- /dev/null +++ b/ansible_collections/dellemc/os9/playbooks/clos_fabric_ebgp/datacenter.yaml @@ -0,0 +1,11 @@ +--- +- hosts: datacenter + gather_facts: no + connection: network_cli + collections: + - dellemc.os9 + roles: + - os9_interface + - os9_bgp + - os9_snmp + - os9_system diff --git a/ansible_collections/dellemc/os9/playbooks/clos_fabric_ebgp/group_vars/all b/ansible_collections/dellemc/os9/playbooks/clos_fabric_ebgp/group_vars/all new file mode 100644 index 000000000..c3e4398b6 --- /dev/null +++ b/ansible_collections/dellemc/os9/playbooks/clos_fabric_ebgp/group_vars/all @@ -0,0 +1,10 @@ +ansible_ssh_user: xxxxx +ansible_ssh_pass: xxxxx +ansible_network_os: dellemc.os9.os9 +build_dir: ../tmp/tmp_os9 + +os9_snmp: + snmp_community: + - name: public + access_mode: ro + state: present diff --git a/ansible_collections/dellemc/os9/playbooks/clos_fabric_ebgp/group_vars/spine.yaml b/ansible_collections/dellemc/os9/playbooks/clos_fabric_ebgp/group_vars/spine.yaml new file mode 100644 index 000000000..175687251 --- /dev/null +++ b/ansible_collections/dellemc/os9/playbooks/clos_fabric_ebgp/group_vars/spine.yaml @@ -0,0 +1,64 @@ +ansible_ssh_user: xxxxx +ansible_ssh_pass: xxxxx +ansible_network_os: dellemc.os9.os9 + +os9_system: + hostname: "{{ spine_hostname }}" + +os9_bgp: + asn: 64901 + router_id: "{{ bgp_router_id }}" + best_path: + as_path: ignore + as_path_state: present + med: + - attribute: confed + state: present + neighbor: + - type: ipv4 + remote_asn: "{{ bgp_neigh1_remote_asn }}" + ip: "{{ bgp_neigh1_ip }}" + admin: up + state: present + - type: ipv4 + remote_asn: "{{ bgp_neigh2_remote_asn }}" + ip: "{{ bgp_neigh2_ip }}" + admin: up + state: present + - type: ipv4 + remote_asn: "{{ bgp_neigh3_remote_asn }}" + ip: "{{ bgp_neigh3_ip }}" + admin: up + state: present + - type: ipv4 + remote_asn: "{{ bgp_neigh4_remote_asn }}" + ip: "{{ bgp_neigh4_ip }}" + admin: up + state: present + - type: ipv6 + remote_asn: "{{ bgp_neigh5_remote_asn }}" + ip: "{{ bgp_neigh5_ip }}" + admin: up + state: present + - type: ipv6 + remote_asn: "{{ bgp_neigh6_remote_asn }}" + ip: "{{ bgp_neigh6_ip }}" + admin: up + address_family: + - type: ipv4 + activate: false + state: present + - type: ipv6 + activate: true + state: present + state: present + - type: ipv6 + remote_asn: "{{ bgp_neigh7_remote_asn }}" + ip: "{{ bgp_neigh7_ip }}" + admin: up + state: present + - type: ipv6 + remote_asn: "{{ bgp_neigh8_remote_asn }}" + ip: "{{ bgp_neigh8_ip }}" + admin: up + state: present diff --git a/ansible_collections/dellemc/os9/playbooks/clos_fabric_ebgp/host_vars/leaf1.yaml b/ansible_collections/dellemc/os9/playbooks/clos_fabric_ebgp/host_vars/leaf1.yaml new file mode 100644 index 000000000..2244418ef --- /dev/null +++ b/ansible_collections/dellemc/os9/playbooks/clos_fabric_ebgp/host_vars/leaf1.yaml @@ -0,0 +1,61 @@ +ansible_ssh_user: xxxxx +ansible_ssh_pass: xxxxx +ansible_network_os: dellemc.os9.os9 +leaf_hostname: "leaf-1" +os9_system: + hostname: "{{ leaf_hostname }}" + hash_algo: + algo: + - name: ecmp + mode: xor1 + state: present +os9_interface: + TenGigabitEthernet 0/0: + desc: "Connected to Spine 1" + mtu: 9216 + portmode: + admin: up + switchport: False + ip_and_mask: 100.1.1.2/24 + ipv6_and_mask: 2001:100:1:1::2/64 + state_ipv6: present + TenGigabitEthernet 0/1: + desc: "Connected to Spine 2" + mtu: 9216 + portmode: + admin: up + switchport: False + ip_and_mask: 100.2.1.2/24 + ipv6_and_mask: 2001:100:2:1::2/64 + state_ipv6: present +os9_bgp: + asn: 64801 + router_id: 100.0.2.1 + best_path: + as_path: ignore + as_path_state: present + med: + - attribute: confed + state: present + neighbor: + - type: ipv4 + remote_asn: 64901 + ip: 100.1.1.1 + admin: up + state: present + - type: ipv4 + remote_asn: 64901 + ip: 100.2.1.1 + admin: up + state: present + - type: ipv6 + remote_asn: 64901 + ip: 2001:100:1:1::1 + admin: up + state: present + - type: ipv6 + remote_asn: 64901 + ip: 2001:100:2:1::1 + admin: up + state: present + state: present diff --git a/ansible_collections/dellemc/os9/playbooks/clos_fabric_ebgp/host_vars/leaf2.yaml b/ansible_collections/dellemc/os9/playbooks/clos_fabric_ebgp/host_vars/leaf2.yaml new file mode 100644 index 000000000..2e5cc580d --- /dev/null +++ b/ansible_collections/dellemc/os9/playbooks/clos_fabric_ebgp/host_vars/leaf2.yaml @@ -0,0 +1,65 @@ +hostname: leaf2 +ansible_ssh_user: xxxxx +ansible_ssh_pass: xxxxx +ansible_network_os: dellemc.os9.os9 +leaf_hostname: "leaf-2" +os9_system: + hostname: "{{ leaf_hostname }}" + hash_algo: + algo: + - name: ecmp + mode: xor1 + state: present +os9_interface: + TenGigabitEthernet 0/0: + desc: "Connected to Spine 1" + mtu: 9216 + portmode: + admin: up + switchport: False + ip_and_mask: 100.1.17.2/24 + ipv6_and_mask: 2001:100:1:11::2/64 + state_ipv6: present + TenGigabitEthernet 0/1: + desc: "Connected to Spine 2" + mtu: 9216 + portmode: + admin: up + switchport: False + ip_and_mask: 100.2.17.2/24 + ipv6_and_mask: 2001:100:2:11::2/64 +os9_bgp: + asn: 64802 + router_id: 100.0.2.2 + best_path: + as_path: ignore + as_path_state: present + med: + - attribute: confed + state: present + neighbor: + - type: ipv4 + remote_asn: 64901 + ip: 100.1.18.1 + admin: up + state: present + - type: ipv4 + remote_asn: 64901 + ip: 100.1.17.1 + admin: up + state: present + - type: ipv4 + remote_asn: 64901 + ip: 100.2.17.1 + admin: up + state: present + - type: ipv6 + remote_asn: 64901 + ip: 2001:100:1:11::1 + admin: up + state: present + - type: ipv6 + remote_asn: 64901 + ip: 2001:100:2:11::1 + admin: up + state: present diff --git a/ansible_collections/dellemc/os9/playbooks/clos_fabric_ebgp/host_vars/leaf3.yaml b/ansible_collections/dellemc/os9/playbooks/clos_fabric_ebgp/host_vars/leaf3.yaml new file mode 100644 index 000000000..f14f44e0c --- /dev/null +++ b/ansible_collections/dellemc/os9/playbooks/clos_fabric_ebgp/host_vars/leaf3.yaml @@ -0,0 +1,65 @@ +hostname: leaf3 +ansible_ssh_user: xxxxx +ansible_ssh_pass: xxxxx +ansible_network_os: dellemc.os9.os9 +leaf_hostname: "leaf-3" +os9_system: + hostname: "{{ leaf_hostname }}" + hash_algo: + algo: + - name: ecmp + mode: xor1 + state: present +os9_interface: + TenGigabitEthernet 0/0: + desc: "Connected to Spine 1" + mtu: 9216 + portmode: + admin: up + switchport: False + ip_and_mask: 100.1.33.2/24 + ipv6_and_mask: 2001:100:1:21::2/64 + state_ipv6: present + TenGigabitEthernet 0/1: + desc: "Connected to Spine 2" + mtu: 9216 + portmode: + admin: up + switchport: False + ip_and_mask: 100.2.33.2/24 + ipv6_and_mask: 2001:100:2:21::2/64 +os9_bgp: + asn: 64803 + router_id: 100.0.2.3 + best_path: + as_path: ignore + as_path_state: present + med: + - attribute: confed + state: present + neighbor: + - type: ipv4 + remote_asn: 64901 + ip: 100.1.33.1 + admin: up + state: present + - type: ipv4 + remote_asn: 64901 + ip: 100.2.33.1 + admin: up + state: present + - type: ipv6 + remote_asn: 64901 + ip: 2001:100:1:21::1 + admin: up + state: present + - type: ipv6 + remote_asn: 64901 + ip: 2001:100:1:22::1 + admin: up + state: present + - type: ipv6 + remote_asn: 64901 + ip: 2001:100:2:21::1 + admin: up + state: present diff --git a/ansible_collections/dellemc/os9/playbooks/clos_fabric_ebgp/host_vars/leaf4.yaml b/ansible_collections/dellemc/os9/playbooks/clos_fabric_ebgp/host_vars/leaf4.yaml new file mode 100644 index 000000000..9fc8ca87d --- /dev/null +++ b/ansible_collections/dellemc/os9/playbooks/clos_fabric_ebgp/host_vars/leaf4.yaml @@ -0,0 +1,61 @@ +hostname: leaf4 +ansible_ssh_user: xxxxx +ansible_ssh_pass: xxxxx +ansible_network_os: dellemc.os9.os9 +leaf_hostname: "leaf-4" +os9_system: + hostname: "{{ leaf_hostname }}" + hash_algo: + algo: + - name: ecmp + mode: xor1 + state: present +os9_interface: + TenGigabitEthernet 0/0: + desc: "Connected to Spine 1" + mtu: 9216 + portmode: + admin: up + switchport: False + ip_and_mask: 100.1.49.2/24 + ipv6_and_mask: 2001:100:1:31::2/64 + state_ipv6: present + TenGigabitEthernet 0/1: + desc: "Connected to Spine 2" + mtu: 9216 + portmode: + admin: up + switchport: False + ip_and_mask: 100.2.49.2/24 + ipv6_and_mask: 2001:100:2:31::2/64 + state_ipv6: present +os9_bgp: + asn: 64804 + router_id: 100.0.2.4 + best_path: + as_path: ignore + as_path_state: present + med: + - attribute: confed + state: present + neighbor: + - type: ipv4 + remote_asn: 64901 + ip: 100.1.49.1 + admin: up + state: present + - type: ipv4 + remote_asn: 64901 + ip: 100.2.49.1 + admin: up + state: present + - type: ipv6 + remote_asn: 64901 + ip: 2001:100:1:31::1 + admin: up + state: present + - type: ipv6 + remote_asn: 64901 + ip: 2001:100:2:31::1 + admin: up + state: present diff --git a/ansible_collections/dellemc/os9/playbooks/clos_fabric_ebgp/host_vars/spine1.yaml b/ansible_collections/dellemc/os9/playbooks/clos_fabric_ebgp/host_vars/spine1.yaml new file mode 100644 index 000000000..9967d338b --- /dev/null +++ b/ansible_collections/dellemc/os9/playbooks/clos_fabric_ebgp/host_vars/spine1.yaml @@ -0,0 +1,61 @@ +hostname: spine1 +ansible_ssh_user: xxxxx +ansible_ssh_pass: xxxxx +ansible_network_os: dellemc.os9.os9 +spine_hostname: "spine-1" + +os9_interface: + TenGigabitEthernet 0/2: + desc: "Connected to leaf 1" + mtu: 9216 + portmode: + admin: up + switchport: False + ip_and_mask: 100.1.1.1/24 + ipv6_and_mask: 2001:100:1:1::1/64 + state_ipv6: present + TenGigabitEthernet 0/3: + desc: "Connected to leaf 2" + mtu: 9216 + portmode: + admin: up + switchport: False + ip_and_mask: 100.1.33.1/24 + ipv6_and_mask: 2001:100:1:21::1/64 + state_ipv6: present + TenGigabitEthernet 0/4: + desc: "Connected to leaf 3" + mtu: 9216 + portmode: + admin: up + switchport: False + ip_and_mask: 100.1.17.1/24 + ipv6_and_mask: 2001:100:1:11::1/64 + state_ipv6: present + TenGigabitEthernet 0/5: + desc: "Connected to leaf 4" + mtu: 9216 + portmode: + admin: up + switchport: False + ip_and_mask: 100.1.49.1/24 + ipv6_and_mask: 2001:100:1:31::1/64 + state_ipv6: present + +bgp_router_id: "100.0.1.1" +bgp_neigh1_remote_asn: 64801 +bgp_neigh1_ip: "100.1.1.2" +bgp_neigh2_remote_asn: 64803 +bgp_neigh2_ip: "100.1.33.2" +bgp_neigh3_remote_asn: 64802 +bgp_neigh3_ip: "100.1.17.2" +bgp_neigh4_remote_asn: 64804 +bgp_neigh4_ip: "100.1.49.2" +bgp_neigh5_remote_asn: 64801 +bgp_neigh5_ip: "2001:100:1:1::2" +bgp_neigh6_remote_asn: 64802 +bgp_neigh6_ip: "2001:100:1:11::2" +bgp_neigh7_remote_asn: 64803 +bgp_neigh7_ip: "2001:100:1:21::2" +bgp_neigh8_remote_asn: 64804 +bgp_neigh8_ip: "2001:100:1:31::2" diff --git a/ansible_collections/dellemc/os9/playbooks/clos_fabric_ebgp/host_vars/spine2.yaml b/ansible_collections/dellemc/os9/playbooks/clos_fabric_ebgp/host_vars/spine2.yaml new file mode 100644 index 000000000..218d6478a --- /dev/null +++ b/ansible_collections/dellemc/os9/playbooks/clos_fabric_ebgp/host_vars/spine2.yaml @@ -0,0 +1,60 @@ +hostname: spine2 +ansible_ssh_user: xxxxx +ansible_ssh_pass: xxxxx +ansible_network_os: dellemc.os9.os9 +spine_hostname: "spine-2" +os9_interface: + TenGigabitEthernet 0/6: + desc: "Connected to leaf 1" + mtu: 9216 + portmode: + admin: up + switchport: False + ip_and_mask: 100.2.1.1/24 + ipv6_and_mask: 2001:100:2:1::1/64 + state_ipv6: present + TenGigabitEthernet 0/7: + desc: "Connected to leaf 2" + mtu: 9216 + portmode: + admin: up + switchport: False + ip_and_mask: 100.2.17.1/24 + ipv6_and_mask: 2001:100:2:11::1/64 + state_ipv6: present + TenGigabitEthernet 0/8: + desc: "Connected to leaf 3" + mtu: 9216 + portmode: + admin: up + switchport: False + ip_and_mask: 100.2.33.1/24 + ipv6_and_mask: 2001:100:2:21::1/64 + state_ipv6: present + TenGigabitEthernet 0/9: + desc: "Connected to leaf 4" + mtu: 9216 + portmode: + admin: up + switchport: False + ip_and_mask: 100.2.49.1/24 + ipv6_and_mask: 2001:100:2:31::1/64 + state_ipv6: present + +bgp_router_id: "100.0.1.2" +bgp_neigh1_remote_asn: 64801 +bgp_neigh1_ip: "100.2.1.2" +bgp_neigh2_remote_asn: 64802 +bgp_neigh2_ip: "100.2.33.2" +bgp_neigh3_remote_asn: 64803 +bgp_neigh3_ip: "100.2.17.2" +bgp_neigh4_remote_asn: 64804 +bgp_neigh4_ip: "100.2.49.2" +bgp_neigh5_remote_asn: 64801 +bgp_neigh5_ip: "2001:100:2:1::2" +bgp_neigh6_remote_asn: 64802 +bgp_neigh6_ip: "2001:100:2:11::2" +bgp_neigh7_remote_asn: 64803 +bgp_neigh7_ip: "2001:100:2:21::2" +bgp_neigh8_remote_asn: 64804 +bgp_neigh8_ip: "2001:100:2:31::2" diff --git a/ansible_collections/dellemc/os9/playbooks/clos_fabric_ebgp/inventory.yaml b/ansible_collections/dellemc/os9/playbooks/clos_fabric_ebgp/inventory.yaml new file mode 100644 index 000000000..5fd33c945 --- /dev/null +++ b/ansible_collections/dellemc/os9/playbooks/clos_fabric_ebgp/inventory.yaml @@ -0,0 +1,20 @@ +spine1 ansible_host=100.94.210.44 +spine2 ansible_host=10.11.182.26 +leaf1 ansible_host=10.11.182.27 +leaf2 ansible_host=10.11.182.28 +leaf3 ansible_host=10.11.182.29 +leaf4 ansible_host=10.11.182.30 + +[spine] +spine1 +spine2 + +[leaf] +leaf1 +leaf2 +leaf3 +leaf4 + +[datacenter:children] +spine +leaf diff --git a/ansible_collections/dellemc/os9/plugins/action/__init__.py b/ansible_collections/dellemc/os9/plugins/action/__init__.py new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/ansible_collections/dellemc/os9/plugins/action/__init__.py diff --git a/ansible_collections/dellemc/os9/plugins/action/os9.py b/ansible_collections/dellemc/os9/plugins/action/os9.py new file mode 100644 index 000000000..0cbfa910c --- /dev/null +++ b/ansible_collections/dellemc/os9/plugins/action/os9.py @@ -0,0 +1,95 @@ +# +# (c) 2020 Red Hat Inc. +# +# Copyright (c) 2020 Dell Inc. +# +# This file is part of Ansible +# +# Ansible is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# Ansible is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Ansible. If not, see <http://www.gnu.org/licenses/>. +# +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + +import sys +import copy + +from ansible import constants as C +from ansible.module_utils._text import to_text +from ansible.module_utils.connection import Connection +from ansible_collections.ansible.netcommon.plugins.action.network import ActionModule as ActionNetworkModule +from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import load_provider +from ansible_collections.dellemc.os9.plugins.module_utils.network.os9 import os9_provider_spec +from ansible.utils.display import Display + +display = Display() + + +class ActionModule(ActionNetworkModule): + + def run(self, tmp=None, task_vars=None): + del tmp # tmp no longer has any effect + + module_name = self._task.action.split('.')[-1] + self._config_module = True if module_name == 'os9_config' else False + socket_path = None + persistent_connection = self._play_context.connection.split('.')[-1] + + if persistent_connection == 'network_cli': + provider = self._task.args.get('provider', {}) + if any(provider.values()): + display.warning('provider is unnecessary when using network_cli and will be ignored') + del self._task.args['provider'] + elif self._play_context.connection == 'local': + provider = load_provider(os9_provider_spec, self._task.args) + pc = copy.deepcopy(self._play_context) + pc.connection = 'network_cli' + pc.network_os = 'dellemc.os9.os9' + pc.remote_addr = provider['host'] or self._play_context.remote_addr + pc.port = int(provider['port'] or self._play_context.port or 22) + pc.remote_user = provider['username'] or self._play_context.connection_user + pc.password = provider['password'] or self._play_context.password + pc.private_key_file = provider['ssh_keyfile'] or self._play_context.private_key_file + command_timeout = int(provider['timeout'] or C.PERSISTENT_COMMAND_TIMEOUT) + pc.become = provider['authorize'] or False + if pc.become: + pc.become_method = 'enable' + pc.become_pass = provider['auth_pass'] + + display.vvv('using connection plugin %s' % pc.connection, pc.remote_addr) + connection = self._shared_loader_obj.connection_loader.get('persistent', pc, sys.stdin) + connection.set_options(direct={'persistent_command_timeout': command_timeout}) + + socket_path = connection.run() + display.vvvv('socket_path: %s' % socket_path, pc.remote_addr) + if not socket_path: + return {'failed': True, + 'msg': 'unable to open shell. Please see: ' + + 'https://docs.ansible.com/ansible/network_debug_troubleshooting.html#unable-to-open-shell'} + + task_vars['ansible_socket'] = socket_path + + # make sure we are in the right cli context which should be + # enable mode and not config module + if socket_path is None: + socket_path = self._connection.socket_path + + conn = Connection(socket_path) + out = conn.get_prompt() + while to_text(out, errors='surrogate_then_replace').strip().endswith(')#'): + display.vvvv('wrong context, sending exit to device', self._play_context.remote_addr) + conn.send_command('exit') + out = conn.get_prompt() + + result = super(ActionModule, self).run(task_vars=task_vars) + return result diff --git a/ansible_collections/dellemc/os9/plugins/cliconf/__init__.py b/ansible_collections/dellemc/os9/plugins/cliconf/__init__.py new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/ansible_collections/dellemc/os9/plugins/cliconf/__init__.py diff --git a/ansible_collections/dellemc/os9/plugins/cliconf/os9.py b/ansible_collections/dellemc/os9/plugins/cliconf/os9.py new file mode 100644 index 000000000..95334bfdb --- /dev/null +++ b/ansible_collections/dellemc/os9/plugins/cliconf/os9.py @@ -0,0 +1,88 @@ +# +# (c) 2020 Red Hat Inc. +# +# (c) 2020 Dell Inc. +# +# This file is part of Ansible +# +# Ansible is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# Ansible is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Ansible. If not, see <http://www.gnu.org/licenses/>. +# +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + +DOCUMENTATION = """ +--- +cliconf: os9 +short_description: Use os9 cliconf to run command on Dell OS9 platform +description: + - This os9 plugin provides low level abstraction apis for + sending and receiving CLI commands from Dell OS9 network devices. +""" + +import re +import json + +from itertools import chain + +from ansible.module_utils._text import to_bytes, to_text +from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import to_list +from ansible.plugins.cliconf import CliconfBase, enable_mode + + +class Cliconf(CliconfBase): + + def get_device_info(self): + device_info = {} + + device_info['network_os'] = 'dellemc.os9.os9' + reply = self.get('show version') + data = to_text(reply, errors='surrogate_or_strict').strip() + + match = re.search(r'Software Version (\S+)', data) + if match: + device_info['network_os_version'] = match.group(1) + + match = re.search(r'System Type (\S+)', data, re.M) + if match: + device_info['network_os_model'] = match.group(1) + + reply = self.get('show running-config | grep hostname') + data = to_text(reply, errors='surrogate_or_strict').strip() + match = re.search(r'^hostname (.+)', data, re.M) + if match: + device_info['network_os_hostname'] = match.group(1) + + return device_info + + @enable_mode + def get_config(self, source='running', format='text', flags=None): + if source not in ('running', 'startup'): + return self.invalid_params("fetching configuration from %s is not supported" % source) +# if source == 'running': +# cmd = 'show running-config all' + else: + cmd = 'show startup-config' + return self.send_command(cmd) + + @enable_mode + def edit_config(self, command): + for cmd in chain(['configure terminal'], to_list(command), ['end']): + self.send_command(cmd) + + def get(self, command, prompt=None, answer=None, sendonly=False, newline=True, check_all=False): + return self.send_command(command=command, prompt=prompt, answer=answer, sendonly=sendonly, newline=newline, check_all=check_all) + + def get_capabilities(self): + result = super(Cliconf, self).get_capabilities() + return json.dumps(result) diff --git a/ansible_collections/dellemc/os9/plugins/doc_fragments/__init__.py b/ansible_collections/dellemc/os9/plugins/doc_fragments/__init__.py new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/ansible_collections/dellemc/os9/plugins/doc_fragments/__init__.py diff --git a/ansible_collections/dellemc/os9/plugins/doc_fragments/os9.py b/ansible_collections/dellemc/os9/plugins/doc_fragments/os9.py new file mode 100644 index 000000000..35ec6725a --- /dev/null +++ b/ansible_collections/dellemc/os9/plugins/doc_fragments/os9.py @@ -0,0 +1,73 @@ +# -*- coding: utf-8 -*- + +# Copyright: (c) 2020, Peter Sprygada <psprygada@ansible.com> +# Copyright: (c) 2020, Dell Inc. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import absolute_import, division, print_function +__metaclass__ = type + + +class ModuleDocFragment(object): + + # Standard files documentation fragment + DOCUMENTATION = r''' +options: + provider: + description: + - A dict object containing connection details. + type: dict + suboptions: + host: + description: + - Specifies the DNS host name or address for connecting to the remote + device over the specified transport. The value of host is used as + the destination address for the transport. + type: str + port: + description: + - Specifies the port to use when building the connection to the remote + device. + type: int + username: + description: + - User to authenticate the SSH session to the remote device. If the + value is not specified in the task, the value of environment variable + C(ANSIBLE_NET_USERNAME) will be used instead. + type: str + password: + description: + - Password to authenticate the SSH session to the remote device. If the + value is not specified in the task, the value of environment variable + C(ANSIBLE_NET_PASSWORD) will be used instead. + type: str + ssh_keyfile: + description: + - Path to an ssh key used to authenticate the SSH session to the remote + device. If the value is not specified in the task, the value of + environment variable C(ANSIBLE_NET_SSH_KEYFILE) will be used instead. + type: path + timeout: + description: + - Specifies idle timeout (in seconds) for the connection. Useful if the + console freezes before continuing. For example when saving + configurations. + type: int + authorize: + description: + - Instructs the module to enter privileged mode on the remote device before + sending any commands. If not specified, the device will attempt to execute + all commands in non-privileged mode. If the value is not specified in the + task, the value of environment variable C(ANSIBLE_NET_AUTHORIZE) will be + used instead. + type: bool + auth_pass: + description: + - Specifies the password to use if required to enter privileged mode on the + remote device. If I(authorize) is false, then this argument does nothing. + If the value is not specified in the task, the value of environment variable + C(ANSIBLE_NET_AUTH_PASS) will be used instead. + type: str +notes: + - For more information on using Ansible to manage Dell EMC Network devices see U(https://www.ansible.com/ansible-dell-networking). +''' diff --git a/ansible_collections/dellemc/os9/plugins/module_utils/__init__.py b/ansible_collections/dellemc/os9/plugins/module_utils/__init__.py new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/ansible_collections/dellemc/os9/plugins/module_utils/__init__.py diff --git a/ansible_collections/dellemc/os9/plugins/module_utils/network/__init__.py b/ansible_collections/dellemc/os9/plugins/module_utils/network/__init__.py new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/ansible_collections/dellemc/os9/plugins/module_utils/network/__init__.py diff --git a/ansible_collections/dellemc/os9/plugins/module_utils/network/os9.py b/ansible_collections/dellemc/os9/plugins/module_utils/network/os9.py new file mode 100644 index 000000000..14c777734 --- /dev/null +++ b/ansible_collections/dellemc/os9/plugins/module_utils/network/os9.py @@ -0,0 +1,146 @@ +# +# (c) 2020 Peter Sprygada, <psprygada@ansible.com> +# (c) 2020 Red Hat, Inc +# +# Copyright (c) 2020 Dell Inc. +# +# This code is part of Ansible, but is an independent component. +# This particular file snippet, and this file snippet only, is BSD licensed. +# Modules you write using this snippet, which is embedded dynamically by Ansible +# still belong to the author of the module, and may assign their own license +# to the complete work. +# +# Redistribution and use in source and binary forms, with or without modification, +# are permitted provided that the following conditions are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE +# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# + + +from __future__ import absolute_import, division, print_function +__metaclass__ = type + + +import re + +from ansible.module_utils._text import to_text +from ansible.module_utils.basic import env_fallback +from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import to_list, ComplexList +from ansible.module_utils.connection import exec_command +from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.config import NetworkConfig, ConfigLine + +_DEVICE_CONFIGS = {} + +WARNING_PROMPTS_RE = [ + r"[\r\n]?\[confirm yes/no\]:\s?$", + r"[\r\n]?\[y/n\]:\s?$", + r"[\r\n]?\[yes/no\]:\s?$" +] + +os9_provider_spec = { + 'host': dict(), + 'port': dict(type='int'), + 'username': dict(fallback=(env_fallback, ['ANSIBLE_NET_USERNAME'])), + 'password': dict(fallback=(env_fallback, ['ANSIBLE_NET_PASSWORD']), no_log=True), + 'ssh_keyfile': dict(fallback=(env_fallback, ['ANSIBLE_NET_SSH_KEYFILE']), type='path'), + 'authorize': dict(fallback=(env_fallback, ['ANSIBLE_NET_AUTHORIZE']), type='bool'), + 'auth_pass': dict(fallback=(env_fallback, ['ANSIBLE_NET_AUTH_PASS']), no_log=True), + 'timeout': dict(type='int'), +} +os9_argument_spec = { + 'provider': dict(type='dict', options=os9_provider_spec), +} + + +def check_args(module, warnings): + pass + + +def get_config(module, flags=None): + flags = [] if flags is None else flags + + cmd = 'show running-config ' + cmd += ' '.join(flags) + cmd = cmd.strip() + + try: + return _DEVICE_CONFIGS[cmd] + except KeyError: + rc, out, err = exec_command(module, cmd) + if rc != 0: + module.fail_json(msg='unable to retrieve current config', stderr=to_text(err, errors='surrogate_or_strict')) + cfg = to_text(out, errors='surrogate_or_strict').strip() + _DEVICE_CONFIGS[cmd] = cfg + return cfg + + +def to_commands(module, commands): + spec = { + 'command': dict(key=True), + 'prompt': dict(), + 'answer': dict() + } + transform = ComplexList(spec, module) + return transform(commands) + + +def run_commands(module, commands, check_rc=True): + responses = list() + commands = to_commands(module, to_list(commands)) + for cmd in commands: + cmd = module.jsonify(cmd) + rc, out, err = exec_command(module, cmd) + if check_rc and rc != 0: + module.fail_json(msg=to_text(err, errors='surrogate_or_strict'), rc=rc) + responses.append(to_text(out, errors='surrogate_or_strict')) + return responses + + +def load_config(module, commands): + rc, out, err = exec_command(module, 'configure terminal') + if rc != 0: + module.fail_json(msg='unable to enter configuration mode', err=to_text(err, errors='surrogate_or_strict')) + + for command in to_list(commands): + if command == 'end': + continue + rc, out, err = exec_command(module, command) + if rc != 0: + module.fail_json(msg=to_text(err, errors='surrogate_or_strict'), command=command, rc=rc) + + exec_command(module, 'end') + + +def get_sublevel_config(running_config, module): + contents = list() + current_config_contents = list() + running_config = NetworkConfig(contents=running_config, indent=1) + obj = running_config.get_object(module.params['parents']) + if obj: + contents = obj.children + contents[:0] = module.params['parents'] + + indent = 0 + for c in contents: + if isinstance(c, str): + current_config_contents.append(c.rjust(len(c) + indent, ' ')) + if isinstance(c, ConfigLine): + current_config_contents.append(c.raw) + indent = 1 + sublevel_config = '\n'.join(current_config_contents) + + return sublevel_config diff --git a/ansible_collections/dellemc/os9/plugins/modules/__init__.py b/ansible_collections/dellemc/os9/plugins/modules/__init__.py new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/ansible_collections/dellemc/os9/plugins/modules/__init__.py diff --git a/ansible_collections/dellemc/os9/plugins/modules/os9_command.py b/ansible_collections/dellemc/os9/plugins/modules/os9_command.py new file mode 100644 index 000000000..20e3cc581 --- /dev/null +++ b/ansible_collections/dellemc/os9/plugins/modules/os9_command.py @@ -0,0 +1,232 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- + +# Copyright: (c) 2020, Peter Sprygada <psprygada@ansible.com> +# Copyright: (c) 2020, Dell Inc. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + + +from __future__ import absolute_import, division, print_function +__metaclass__ = type + + +ANSIBLE_METADATA = {'metadata_version': '1.1', + 'status': ['preview'], + 'supported_by': 'community'} + +DOCUMENTATION = """ +--- +module: os9_command +author: "Dhivya P (@dhivyap)" +short_description: Run commands on remote devices running Dell OS9 +description: + - Sends arbitrary commands to a Dell OS9 node and returns the results + read from the device. This module includes an + argument that will cause the module to wait for a specific condition + before returning or timing out if the condition is not met. + - This module does not support running commands in configuration mode. + Please use M(dellemc_os9_os9_config) to configure Dell OS9 devices. +extends_documentation_fragment: dellemc.os9.os9 +options: + commands: + description: + - List of commands to send to the remote os9 device over the + configured provider. The resulting output from the command + is returned. If the I(wait_for) argument is provided, the + module is not returned until the condition is satisfied or + the number of retries has expired. + type: list + required: true + wait_for: + description: + - List of conditions to evaluate against the output of the + command. The task will wait for each condition to be true + before moving forward. If the conditional is not true + within the configured number of I(retries), the task fails. + See examples. + type: list + elements: str + match: + description: + - The I(match) argument is used in conjunction with the + I(wait_for) argument to specify the match policy. Valid + values are C(all) or C(any). If the value is set to C(all) + then all conditionals in the wait_for must be satisfied. If + the value is set to C(any) then only one of the values must be + satisfied. + type: str + default: all + choices: [ all, any ] + retries: + description: + - Specifies the number of retries a command should be tried + before it is considered failed. The command is run on the + target device every retry and evaluated against the + I(wait_for) conditions. + type: int + default: 10 + interval: + description: + - Configures the interval in seconds to wait between retries + of the command. If the command does not pass the specified + conditions, the interval indicates how long to wait before + trying the command again. + type: int + default: 1 +notes: + - This module requires Dell OS9 version 9.10.0.1P13 or above. + - This module requires to increase the ssh connection rate limit. + Use the following command I(ip ssh connection-rate-limit 60) + to configure the same. This can be done via M(os9_config) module + as well. +""" + +EXAMPLES = """ +tasks: + - name: run show version on remote devices + os9_command: + commands: show version + - name: run show version and check to see if output contains OS9 + os9_command: + commands: show version + wait_for: result[0] contains OS9 + - name: run multiple commands on remote nodes + os9_command: + commands: + - show version + - show interfaces + - name: run multiple commands and evaluate the output + os9_command: + commands: + - show version + - show interfaces + wait_for: + - result[0] contains OS9 + - result[1] contains Loopback +""" + +RETURN = """ +stdout: + description: The set of responses from the commands + returned: always apart from low level errors (such as action plugin) + type: list + sample: ['...', '...'] +stdout_lines: + description: The value of stdout split into a list + returned: always apart from low level errors (such as action plugin) + type: list + sample: [['...', '...'], ['...'], ['...']] +failed_conditions: + description: The list of conditionals that have failed + returned: failed + type: list + sample: ['...', '...'] +warnings: + description: The list of warnings (if any) generated by module based on arguments + returned: always + type: list + sample: ['...', '...'] +""" +import time + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.dellemc.os9.plugins.module_utils.network.os9 import run_commands +from ansible_collections.dellemc.os9.plugins.module_utils.network.os9 import os9_argument_spec, check_args +from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import ComplexList +from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.parsing import Conditional +from ansible.module_utils.six import string_types + + +def to_lines(stdout): + for item in stdout: + if isinstance(item, string_types): + item = str(item).split('\n') + yield item + + +def parse_commands(module, warnings): + command = ComplexList(dict( + command=dict(key=True), + prompt=dict(), + answer=dict() + ), module) + commands = command(module.params['commands']) + for index, item in enumerate(commands): + if module.check_mode and not item['command'].startswith('show'): + warnings.append( + 'only show commands are supported when using check mode, not ' + 'executing `%s`' % item['command'] + ) + elif item['command'].startswith('conf'): + module.fail_json( + msg='os9_command does not support running config mode ' + 'commands. Please use os9_config instead' + ) + return commands + + +def main(): + """main entry point for module execution + """ + argument_spec = dict( + # { command: <str>, prompt: <str>, response: <str> } + commands=dict(type='list', required=True), + + wait_for=dict(type='list', elements='str'), + match=dict(default='all', choices=['all', 'any']), + + retries=dict(default=10, type='int'), + interval=dict(default=1, type='int') + ) + + argument_spec.update(os9_argument_spec) + + module = AnsibleModule(argument_spec=argument_spec, + supports_check_mode=True) + + result = {'changed': False} + + warnings = list() + check_args(module, warnings) + commands = parse_commands(module, warnings) + result['warnings'] = warnings + + wait_for = module.params['wait_for'] or list() + conditionals = [Conditional(c) for c in wait_for] + + retries = module.params['retries'] + interval = module.params['interval'] + match = module.params['match'] + + while retries > 0: + responses = run_commands(module, commands) + + for item in list(conditionals): + if item(responses): + if match == 'any': + conditionals = list() + break + conditionals.remove(item) + + if not conditionals: + break + + time.sleep(interval) + retries -= 1 + + if conditionals: + failed_conditions = [item.raw for item in conditionals] + msg = 'One or more conditional statements have not been satisfied' + module.fail_json(msg=msg, failed_conditions=failed_conditions) + + result.update({ + 'changed': False, + 'stdout': responses, + 'stdout_lines': list(to_lines(responses)) + }) + + module.exit_json(**result) + + +if __name__ == '__main__': + main() diff --git a/ansible_collections/dellemc/os9/plugins/modules/os9_config.py b/ansible_collections/dellemc/os9/plugins/modules/os9_config.py new file mode 100644 index 000000000..a6d20ed00 --- /dev/null +++ b/ansible_collections/dellemc/os9/plugins/modules/os9_config.py @@ -0,0 +1,350 @@ +#!/usr/bin/python +# +# (c) 2020 Peter Sprygada, <psprygada@ansible.com> +# Copyright (c) 2020 Dell Inc. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import absolute_import, division, print_function +__metaclass__ = type + + +ANSIBLE_METADATA = {'metadata_version': '1.1', + 'status': ['preview'], + 'supported_by': 'community'} + + +DOCUMENTATION = """ +--- +module: os9_config +author: "Dhivya P (@dhivyap)" +short_description: Manage Dell EMC Networking OS9 configuration sections +description: + - OS9 configurations use a simple block indent file syntax + for segmenting configuration into sections. This module provides + an implementation for working with OS9 configuration sections in + a deterministic way. +extends_documentation_fragment: dellemc.os9.os9 +options: + lines: + description: + - The ordered set of commands that should be configured in the + section. The commands must be the exact same commands as found + in the device running-config. Be sure to note the configuration + command syntax as some commands are automatically modified by the + device config parser. This argument is mutually exclusive with I(src). + type: list + aliases: ['commands'] + parents: + description: + - The ordered set of parents that uniquely identify the section or hierarchy + the commands should be checked against. If the parents argument + is omitted, the commands are checked against the set of top + level or global commands. + type: list + src: + description: + - Specifies the source path to the file that contains the configuration + or configuration template to load. The path to the source file can + either be the full path on the Ansible control host or a relative + path from the playbook or role root directory. This argument is + mutually exclusive with I(lines). + type: path + before: + description: + - The ordered set of commands to push on to the command stack if + a change needs to be made. This allows the playbook designer + the opportunity to perform configuration commands prior to pushing + any changes without affecting how the set of commands are matched + against the system. + type: list + after: + description: + - The ordered set of commands to append to the end of the command + stack if a change needs to be made. Just like with I(before) this + allows the playbook designer to append a set of commands to be + executed after the command set. + type: list + match: + description: + - Instructs the module on the way to perform the matching of + the set of commands against the current device config. If + match is set to I(line), commands are matched line by line. If + match is set to I(strict), command lines are matched with respect + to position. If match is set to I(exact), command lines + must be an equal match. Finally, if match is set to I(none), the + module will not attempt to compare the source configuration with + the running configuration on the remote device. + type: str + default: line + choices: ['line', 'strict', 'exact', 'none'] + replace: + description: + - Instructs the module on the way to perform the configuration + on the device. If the replace argument is set to I(line) then + the modified lines are pushed to the device in configuration + mode. If the replace argument is set to I(block) then the entire + command block is pushed to the device in configuration mode if any + line is not correct. + type: str + default: line + choices: ['line', 'block'] + update: + description: + - The I(update) argument controls how the configuration statements + are processed on the remote device. Valid choices for the I(update) + argument are I(merge) and I(check). When you set this argument to + I(merge), the configuration changes merge with the current + device running configuration. When you set this argument to I(check) + the configuration updates are determined but not actually configured + on the remote device. + type: str + default: merge + choices: ['merge', 'check'] + save: + description: + - The C(save) argument instructs the module to save the running- + config to the startup-config at the conclusion of the module + running. If check mode is specified, this argument is ignored. + type: bool + default: no + config: + description: + - The module, by default, will connect to the remote device and + retrieve the current running-config to use as a base for comparing + against the contents of source. There are times when it is not + desirable to have the task get the current running-config for + every task in a playbook. The I(config) argument allows the + implementer to pass in the configuration to use as the base + config for comparison. + type: str + backup: + description: + - This argument will cause the module to create a full backup of + the current C(running-config) from the remote device before any + changes are made. If the C(backup_options) value is not given, + the backup file is written to the C(backup) folder in the playbook + root directory. If the directory does not exist, it is created. + type: bool + default: 'no' + backup_options: + description: + - This is a dict object containing configurable options related to backup file path. + The value of this option is read only when C(backup) is set to I(yes), if C(backup) is set + to I(no) this option will be silently ignored. + suboptions: + filename: + description: + - The filename to be used to store the backup configuration. If the the filename + is not given it will be generated based on the hostname, current time and date + in format defined by <hostname>_config.<current-date>@<current-time> + type: str + dir_path: + description: + - This option provides the path ending with directory name in which the backup + configuration file will be stored. If the directory does not exist it will be first + created and the filename is either the value of C(filename) or default filename + as described in C(filename) options description. If the path value is not given + in that case a I(backup) directory will be created in the current working directory + and backup configuration will be copied in C(filename) within I(backup) directory. + type: path + type: dict +notes: + - This module requires Dell OS9 version 9.10.0.1P13 or above. + - This module requires to increase the ssh connection rate limit. + Use the following command I(ip ssh connection-rate-limit 60) + to configure the same. This can also be done with the + M(os9_config) module. +""" + +EXAMPLES = """ +- os9_config: + lines: ['hostname {{ inventory_hostname }}'] + provider: "{{ cli }}" +- os9_config: + lines: + - 10 permit ip host 1.1.1.1 any log + - 20 permit ip host 2.2.2.2 any log + - 30 permit ip host 3.3.3.3 any log + - 40 permit ip host 4.4.4.4 any log + - 50 permit ip host 5.5.5.5 any log + parents: ['ip access-list extended test'] + before: ['no ip access-list extended test'] + match: exact +- os9_config: + lines: + - 10 permit ip host 1.1.1.1 any log + - 20 permit ip host 2.2.2.2 any log + - 30 permit ip host 3.3.3.3 any log + - 40 permit ip host 4.4.4.4 any log + parents: ['ip access-list extended test'] + before: ['no ip access-list extended test'] + replace: block +- os9_config: + lines: ['hostname {{ inventory_hostname }}'] + provider: "{{ cli }}" + backup: yes + backup_options: + filename: backup.cfg + dir_path: /home/user +""" + +RETURN = """ +updates: + description: The set of commands that will be pushed to the remote device. + returned: always + type: list + sample: ['hostname foo', 'router bgp 1', 'bgp router-id 1.1.1.1'] +commands: + description: The set of commands that will be pushed to the remote device + returned: always + type: list + sample: ['hostname foo', 'router bgp 1', 'bgp router-id 1.1.1.1'] +saved: + description: Returns whether the configuration is saved to the startup + configuration or not. + returned: When not check_mode. + type: bool + sample: True +backup_path: + description: The full path to the backup file + returned: when backup is yes + type: str + sample: /playbooks/ansible/backup/os9_config.2016-07-16@22:28:34 +""" +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.dellemc.os9.plugins.module_utils.network.os9 import get_config, get_sublevel_config +from ansible_collections.dellemc.os9.plugins.module_utils.network.os9 import os9_argument_spec, check_args +from ansible_collections.dellemc.os9.plugins.module_utils.network.os9 import load_config, run_commands +from ansible_collections.dellemc.os9.plugins.module_utils.network.os9 import WARNING_PROMPTS_RE +from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.config import NetworkConfig, dumps + + +def get_candidate(module): + candidate = NetworkConfig(indent=1) + if module.params['src']: + candidate.load(module.params['src']) + elif module.params['lines']: + parents = module.params['parents'] or list() + commands = module.params['lines'][0] + if (isinstance(commands, dict)) and (isinstance(commands['command'], list)): + candidate.add(commands['command'], parents=parents) + elif (isinstance(commands, dict)) and (isinstance(commands['command'], str)): + candidate.add([commands['command']], parents=parents) + else: + candidate.add(module.params['lines'], parents=parents) + return candidate + + +def get_running_config(module): + contents = module.params['config'] + if not contents: + contents = get_config(module) + return contents + + +def main(): + + backup_spec = dict( + filename=dict(), + dir_path=dict(type='path') + ) + argument_spec = dict( + lines=dict(aliases=['commands'], type='list'), + parents=dict(type='list'), + + src=dict(type='path'), + + before=dict(type='list'), + after=dict(type='list'), + + match=dict(default='line', + choices=['line', 'strict', 'exact', 'none']), + replace=dict(default='line', choices=['line', 'block']), + + update=dict(choices=['merge', 'check'], default='merge'), + save=dict(type='bool', default=False), + config=dict(), + backup=dict(type='bool', default=False), + backup_options=dict(type='dict', options=backup_spec) + ) + + argument_spec.update(os9_argument_spec) + + mutually_exclusive = [('lines', 'src'), + ('parents', 'src')] + module = AnsibleModule(argument_spec=argument_spec, + mutually_exclusive=mutually_exclusive, + supports_check_mode=True) + + parents = module.params['parents'] or list() + + match = module.params['match'] + replace = module.params['replace'] + + warnings = list() + check_args(module, warnings) + + result = dict(changed=False, saved=False, warnings=warnings) + + candidate = get_candidate(module) + + if module.params['backup']: + if not module.check_mode: + result['__backup__'] = get_config(module) + commands = list() + + if any((module.params['lines'], module.params['src'])): + if match != 'none': + config = get_running_config(module) + if parents: + contents = get_sublevel_config(config, module) + config = NetworkConfig(contents=contents, indent=1) + else: + config = NetworkConfig(contents=config, indent=1) + configobjs = candidate.difference(config, match=match, replace=replace) + else: + configobjs = candidate.items + + if configobjs: + commands = dumps(configobjs, 'commands') + if ((isinstance(module.params['lines'], list)) and + (isinstance(module.params['lines'][0], dict)) and + set(['prompt', 'answer']).issubset(module.params['lines'][0])): + + cmd = {'command': commands, + 'prompt': module.params['lines'][0]['prompt'], + 'answer': module.params['lines'][0]['answer']} + commands = [module.jsonify(cmd)] + else: + commands = commands.split('\n') + + if module.params['before']: + commands[:0] = module.params['before'] + + if module.params['after']: + commands.extend(module.params['after']) + + if not module.check_mode and module.params['update'] == 'merge': + load_config(module, commands) + + result['changed'] = True + result['commands'] = commands + result['updates'] = commands + + if module.params['save']: + result['changed'] = True + if not module.check_mode: + cmd = {'command': 'copy running-config startup-config', + 'prompt': r'\[confirm yes/no\]:\s?$', 'answer': 'yes'} + run_commands(module, [cmd]) + result['saved'] = True + else: + module.warn('Skipping command `copy running-config startup-config`' + 'due to check_mode. Configuration not copied to ' + 'non-volatile storage') + + module.exit_json(**result) + + +if __name__ == '__main__': + main() diff --git a/ansible_collections/dellemc/os9/plugins/modules/os9_facts.py b/ansible_collections/dellemc/os9/plugins/modules/os9_facts.py new file mode 100644 index 000000000..fe04afc04 --- /dev/null +++ b/ansible_collections/dellemc/os9/plugins/modules/os9_facts.py @@ -0,0 +1,578 @@ +#!/usr/bin/python +# +# (c) 2020 Peter Sprygada, <psprygada@ansible.com> +# Copyright (c) 2020 Dell Inc. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import absolute_import, division, print_function +__metaclass__ = type + + +ANSIBLE_METADATA = {'metadata_version': '1.1', + 'status': ['preview'], + 'supported_by': 'community'} + + +DOCUMENTATION = """ +--- +module: os9_facts +author: "Dhivya P (@dhivyap)" +short_description: Collect facts from remote devices running Dell EMC Networking OS9 +description: + - Collects a base set of device facts from a remote device that + is running OS9. This module prepends all of the + base network fact keys with C(ansible_net_<fact>). The facts + module will always collect a base set of facts from the device + and can enable or disable collection of additional facts. +extends_documentation_fragment: dellemc.os9.os9 +options: + gather_subset: + description: + - When supplied, this argument will restrict the facts collected + to a given subset. Possible values for this argument include + all, hardware, config, and interfaces. Can specify a list of + values to include a larger subset. Values can also be used + with an initial C(M(!)) to specify that a specific subset should + not be collected. + type: list + default: [ '!config' ] +notes: + - This module requires OS9 version 9.10.0.1P13 or above. + - This module requires an increase of the SSH connection rate limit. + Use the following command I(ip ssh connection-rate-limit 60) + to configure the same. This can be also be done with the M(os9_config) module. +""" + +EXAMPLES = """ +# Collect all facts from the device +- os9_facts: + gather_subset: all +# Collect only the config and default facts +- os9_facts: + gather_subset: + - config +# Do not collect hardware facts +- os9_facts: + gather_subset: + - "!hardware" +""" + +RETURN = """ +ansible_net_gather_subset: + description: The list of fact subsets collected from the device + returned: always + type: list +# default +ansible_net_model: + description: The model name returned from the device + returned: always + type: str +ansible_net_serialnum: + description: The serial number of the remote device + returned: always + type: str +ansible_net_servicetags: + description: The servicetags from remote device + returned: always + type: list +ansible_net_version: + description: The operating system version running on the remote device + returned: always + type: str +ansible_net_hostname: + description: The configured hostname of the device + returned: always + type: str +ansible_net_image: + description: The image file the device is running + returned: always + type: str +# hardware +ansible_net_filesystems: + description: All file system names available on the device + returned: when hardware is configured + type: list +ansible_net_memfree_mb: + description: The available free memory on the remote device in Mb + returned: when hardware is configured + type: int +ansible_net_memtotal_mb: + description: The total memory on the remote device in Mb + returned: when hardware is configured + type: int +# config +ansible_net_config: + description: The current active config from the device + returned: when config is configured + type: str +# interfaces +ansible_net_all_ipv4_addresses: + description: All IPv4 addresses configured on the device + returned: when interfaces is configured + type: list +ansible_net_all_ipv6_addresses: + description: All IPv6 addresses configured on the device + returned: when interfaces is configured + type: list +ansible_net_interfaces: + description: A hash of all interfaces running on the system + returned: when interfaces is configured + type: dict +ansible_net_neighbors: + description: The list of LLDP neighbors from the remote device + returned: when interfaces is configured + type: dict +""" +import re +try: + from itertools import izip +except ImportError: + izip = zip + +from ansible.module_utils.basic import AnsibleModule +from ansible_collections.dellemc.os9.plugins.module_utils.network.os9 import run_commands +from ansible_collections.dellemc.os9.plugins.module_utils.network.os9 import os9_argument_spec, check_args +from ansible.module_utils.six import iteritems + + +class FactsBase(object): + + COMMANDS = list() + + def __init__(self, module): + self.module = module + self.facts = dict() + self.responses = None + + def populate(self): + self.responses = run_commands(self.module, self.COMMANDS, check_rc=False) + + def run(self, cmd): + return run_commands(self.module, cmd, check_rc=False) + + +class Default(FactsBase): + + COMMANDS = [ + 'show version', + 'show inventory', + 'show running-config | grep hostname' + ] + + def populate(self): + super(Default, self).populate() + data = self.responses[0] + self.facts['version'] = self.parse_version(data) + self.facts['model'] = self.parse_model(data) + self.facts['image'] = self.parse_image(data) + + data = self.responses[1] + self.facts['serialnum'] = self.parse_serialnum(data) + self.facts['servicetags'] = self.parse_servicetags(data) + + data = self.responses[2] + self.facts['hostname'] = self.parse_hostname(data) + + def parse_version(self, data): + match = re.search(r'Software Version:\s*(.+)', data) + if match: + return match.group(1) + + def parse_hostname(self, data): + match = re.search(r'^hostname (.+)', data, re.M) + if match: + return match.group(1) + + def parse_model(self, data): + match = re.search(r'^System Type:\s*(.+)', data, re.M) + if match: + return match.group(1) + + def parse_image(self, data): + match = re.search(r'image file is "(.+)"', data) + if match: + return match.group(1) + + def parse_serialnum(self, data): + for line in data.split('\n'): + if line.startswith('*'): + match = re.search( + r'\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)', line, re.M) + if match: + return match.group(3) + + def parse_servicetags(self, data): + tags = [] + for line in data.split('\n'): + match = re.match(r'\**\s+[0-9]+\s+.*(\b[A-Z0-9]{7}\b)', line) + if match: + tags.append(match.group(1)) + return tags + + +class Hardware(FactsBase): + + COMMANDS = [ + 'show file-systems', + 'show memory | except Processor' + ] + + def populate(self): + super(Hardware, self).populate() + data = self.responses[0] + self.facts['filesystems'] = self.parse_filesystems(data) + + data = self.responses[1] + match = re.findall(r'\s(\d+)\s', data) + if match: + self.facts['memtotal_mb'] = int(match[0]) // 1024 + self.facts['memfree_mb'] = int(match[2]) // 1024 + + def parse_filesystems(self, data): + return re.findall(r'\s(\S+):$', data, re.M) + + +class Config(FactsBase): + + COMMANDS = ['show running-config'] + + def populate(self): + super(Config, self).populate() + self.facts['config'] = self.responses[0] + + +class Interfaces(FactsBase): + + COMMANDS = [ + 'show interfaces', + 'show ipv6 interface', + 'show lldp neighbors detail', + 'show inventory' + ] + + def populate(self): + super(Interfaces, self).populate() + self.facts['all_ipv4_addresses'] = list() + self.facts['all_ipv6_addresses'] = list() + + data = self.responses[0] + interfaces = self.parse_interfaces(data) + + for key in list(interfaces.keys()): + if "ManagementEthernet" in key: + temp_parsed = interfaces[key] + del interfaces[key] + interfaces.update(self.parse_mgmt_interfaces(temp_parsed)) + + for key in list(interfaces.keys()): + if "Vlan" in key: + temp_parsed = interfaces[key] + del interfaces[key] + interfaces.update(self.parse_vlan_interfaces(temp_parsed)) + + self.facts['interfaces'] = self.populate_interfaces(interfaces) + + data = self.responses[1] + if len(data) > 0: + data = self.parse_ipv6_interfaces(data) + self.populate_ipv6_interfaces(data) + + data = self.responses[3] + if 'LLDP' in self.get_protocol_list(data): + neighbors = self.responses[2] + self.facts['neighbors'] = self.parse_neighbors(neighbors) + + def get_protocol_list(self, data): + start = False + protocol_list = list() + for line in data.split('\n'): + match = re.search(r'Software Protocol Configured\s*', line) + if match: + start = True + continue + if start: + line = line.strip() + if line.isalnum(): + protocol_list.append(line) + return protocol_list + + def populate_interfaces(self, interfaces): + facts = dict() + for key, value in interfaces.items(): + intf = dict() + intf['description'] = self.parse_description(value) + intf['macaddress'] = self.parse_macaddress(value) + ipv4 = self.parse_ipv4(value) + intf['ipv4'] = self.parse_ipv4(value) + if ipv4: + self.add_ip_address(ipv4['address'], 'ipv4') + + intf['mtu'] = self.parse_mtu(value) + intf['bandwidth'] = self.parse_bandwidth(value) + intf['mediatype'] = self.parse_mediatype(value) + intf['duplex'] = self.parse_duplex(value) + intf['lineprotocol'] = self.parse_lineprotocol(value) + intf['operstatus'] = self.parse_operstatus(value) + intf['type'] = self.parse_type(value) + + facts[key] = intf + return facts + + def populate_ipv6_interfaces(self, data): + for key, value in data.items(): + if key in self.facts['interfaces']: + self.facts['interfaces'][key]['ipv6'] = list() + addresses = re.findall(r'\s+(.+), subnet', value, re.M) + subnets = re.findall(r', subnet is (\S+)', value, re.M) + for addr, subnet in izip(addresses, subnets): + ipv6 = dict(address=addr.strip(), subnet=subnet.strip()) + self.add_ip_address(addr.strip(), 'ipv6') + self.facts['interfaces'][key]['ipv6'].append(ipv6) + + def add_ip_address(self, address, family): + if family == 'ipv4': + self.facts['all_ipv4_addresses'].append(address) + else: + self.facts['all_ipv6_addresses'].append(address) + + def parse_neighbors(self, neighbors): + facts = dict() + + for entry in neighbors.split( + '========================================================================'): + if entry == '': + continue + + intf = self.parse_lldp_intf(entry) + if intf not in facts: + facts[intf] = list() + fact = dict() + fact['host'] = self.parse_lldp_host(entry) + fact['port'] = self.parse_lldp_port(entry) + facts[intf].append(fact) + return facts + + def parse_interfaces(self, data): + parsed = dict() + newline_count = 0 + interface_start = True + + for line in data.split('\n'): + if interface_start: + newline_count = 0 + if len(line) == 0: + newline_count += 1 + if newline_count == 2: + interface_start = True + else: + match = re.match(r'^(\S+) (\S+)', line) + if match and interface_start: + interface_start = False + key = match.group(0) + parsed[key] = line + else: + parsed[key] += '\n%s' % line + return parsed + + def parse_mgmt_interfaces(self, data): + parsed = dict() + interface_start = True + for line in data.split('\n'): + match = re.match(r'^(\S+) (\S+)', line) + if "Time since" in line: + interface_start = True + parsed[key] += '\n%s' % line + elif match and interface_start: + interface_start = False + key = match.group(0) + parsed[key] = line + else: + parsed[key] += '\n%s' % line + return parsed + + def parse_vlan_interfaces(self, data): + parsed = dict() + interface_start = True + line_before_end = False + for line in data.split('\n'): + match = re.match(r'^(\S+) (\S+)', line) + match_endline = re.match(r'^\s*\d+ packets, \d+ bytes$', line) + + if "Output Statistics" in line: + line_before_end = True + parsed[key] += '\n%s' % line + elif match_endline and line_before_end: + line_before_end = False + interface_start = True + parsed[key] += '\n%s' % line + elif match and interface_start: + interface_start = False + key = match.group(0) + parsed[key] = line + else: + parsed[key] += '\n%s' % line + return parsed + + def parse_ipv6_interfaces(self, data): + parsed = dict() + for line in data.split('\n'): + if len(line) == 0: + continue + if line[0] == ' ': + parsed[key] += '\n%s' % line + else: + match = re.match(r'^(\S+) (\S+)', line) + if match: + key = match.group(0) + parsed[key] = line + return parsed + + def parse_description(self, data): + match = re.search(r'Description: (.+)$', data, re.M) + if match: + return match.group(1) + + def parse_macaddress(self, data): + match = re.search(r'address is (\S+)', data) + if match: + if match.group(1) != "not": + return match.group(1) + + def parse_ipv4(self, data): + match = re.search(r'Internet address is (\S+)', data) + if match: + if match.group(1) != "not": + addr, masklen = match.group(1).split('/') + return dict(address=addr, masklen=int(masklen)) + + def parse_mtu(self, data): + match = re.search(r'MTU (\d+)', data) + if match: + return int(match.group(1)) + + def parse_bandwidth(self, data): + match = re.search(r'LineSpeed (\d+)', data) + if match: + return int(match.group(1)) + + def parse_duplex(self, data): + match = re.search(r'(\w+) duplex', data, re.M) + if match: + return match.group(1) + + def parse_mediatype(self, data): + media = re.search(r'(.+) media present, (.+)', data, re.M) + if media: + match = re.search(r'type is (.+)$', media.group(0), re.M) + return match.group(1) + + def parse_type(self, data): + match = re.search(r'Hardware is (.+),', data, re.M) + if match: + return match.group(1) + + def parse_lineprotocol(self, data): + match = re.search(r'line protocol is (\w+[ ]?\w*)\(?.*\)?$', data, re.M) + if match: + return match.group(1) + + def parse_operstatus(self, data): + match = re.search(r'^(?:.+) is (.+),', data, re.M) + if match: + return match.group(1) + + def parse_lldp_intf(self, data): + match = re.search(r'^\sLocal Interface (\S+\s\S+)', data, re.M) + if match: + return match.group(1) + + def parse_lldp_host(self, data): + match = re.search(r'Remote System Name: (.+)$', data, re.M) + if match: + return match.group(1) + + def parse_lldp_port(self, data): + match = re.search(r'Remote Port ID: (.+)$', data, re.M) + if match: + return match.group(1) + + +FACT_SUBSETS = dict( + default=Default, + hardware=Hardware, + interfaces=Interfaces, + config=Config, +) + +VALID_SUBSETS = frozenset(FACT_SUBSETS.keys()) + + +def main(): + """main entry point for module execution + """ + argument_spec = dict( + gather_subset=dict(default=['!config'], type='list') + ) + + argument_spec.update(os9_argument_spec) + + module = AnsibleModule(argument_spec=argument_spec, + supports_check_mode=True) + + gather_subset = module.params['gather_subset'] + + runable_subsets = set() + exclude_subsets = set() + + for subset in gather_subset: + if subset == 'all': + runable_subsets.update(VALID_SUBSETS) + continue + + if subset.startswith('!'): + subset = subset[1:] + if subset == 'all': + exclude_subsets.update(VALID_SUBSETS) + continue + exclude = True + else: + exclude = False + + if subset not in VALID_SUBSETS: + module.fail_json(msg='Bad subset') + + if exclude: + exclude_subsets.add(subset) + else: + runable_subsets.add(subset) + + if not runable_subsets: + runable_subsets.update(VALID_SUBSETS) + + runable_subsets.difference_update(exclude_subsets) + runable_subsets.add('default') + + facts = dict() + facts['gather_subset'] = list(runable_subsets) + + instances = list() + for key in runable_subsets: + instances.append(FACT_SUBSETS[key](module)) + + for inst in instances: + inst.populate() + facts.update(inst.facts) + + ansible_facts = dict() + for key, value in iteritems(facts): + key = 'ansible_net_%s' % key + ansible_facts[key] = value + + warnings = list() + check_args(module, warnings) + + module.exit_json(ansible_facts=ansible_facts, warnings=warnings) + + +if __name__ == '__main__': + main() diff --git a/ansible_collections/dellemc/os9/plugins/terminal/__init__.py b/ansible_collections/dellemc/os9/plugins/terminal/__init__.py new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/ansible_collections/dellemc/os9/plugins/terminal/__init__.py diff --git a/ansible_collections/dellemc/os9/plugins/terminal/os9.py b/ansible_collections/dellemc/os9/plugins/terminal/os9.py new file mode 100644 index 000000000..e0052fc46 --- /dev/null +++ b/ansible_collections/dellemc/os9/plugins/terminal/os9.py @@ -0,0 +1,83 @@ +# +# (c) 2020 Red Hat Inc. +# +# Copyright (c) 2020 Dell Inc. +# +# This file is part of Ansible +# +# Ansible is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# Ansible is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Ansible. If not, see <http://www.gnu.org/licenses/>. +# +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + +import re +import json + +from ansible.module_utils._text import to_text, to_bytes +from ansible.plugins.terminal import TerminalBase +from ansible.errors import AnsibleConnectionFailure + + +class TerminalModule(TerminalBase): + + terminal_stdout_re = [ + re.compile(br"[\r\n]?[\w+\-\.:\/\[\]]+(?:\([^\)]+\)){,3}(?:>|#) ?$"), + re.compile(br"\[\w+\@[\w\-\.]+(?: [^\]])\] ?[>#\$] ?$") + ] + + terminal_stderr_re = [ + re.compile(br"% ?Error: (?:(?!\bdoes not exist\b)(?!\balready exists\b)(?!\bHost not found\b)(?!\bnot active\b).)*\n"), + re.compile(br"% ?Bad secret"), + re.compile(br"invalid input", re.I), + re.compile(br"(?:incomplete|ambiguous) command", re.I), + re.compile(br"connection timed out", re.I), + re.compile(br"'[^']' +returned error code: ?\d+"), + ] + + terminal_initial_prompt = br"\[y/n\]:" + + terminal_initial_answer = b"y" + + def on_open_shell(self): + try: + self._exec_cli_command(b'terminal length 0') + except AnsibleConnectionFailure: + raise AnsibleConnectionFailure('unable to set terminal parameters') + + def on_become(self, passwd=None): + if self._get_prompt().endswith(b'#'): + return + + cmd = {u'command': u'enable'} + if passwd: + cmd[u'prompt'] = to_text(r"[\r\n]?password: $", errors='surrogate_or_strict') + cmd[u'answer'] = passwd + + try: + self._exec_cli_command(to_bytes(json.dumps(cmd), errors='surrogate_or_strict')) + except AnsibleConnectionFailure: + raise AnsibleConnectionFailure('unable to elevate privilege to enable mode') + + def on_unbecome(self): + prompt = self._get_prompt() + if prompt is None: + # if prompt is None most likely the terminal is hung up at a prompt + return + + if prompt.strip().endswith(b')#'): + self._exec_cli_command(b'end') + self._exec_cli_command(b'disable') + + elif prompt.endswith(b'#'): + self._exec_cli_command(b'disable') diff --git a/ansible_collections/dellemc/os9/roles/os9_aaa/LICENSE b/ansible_collections/dellemc/os9/roles/os9_aaa/LICENSE new file mode 100644 index 000000000..2c9b8e1fd --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_aaa/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/> + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (c) 2020, Dell Inc. All rights reserved. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <https://www.gnu.org/licenses/>. + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + <program> Copyright (c) 2020, Dell Inc. All rights reserved. + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +<https://www.gnu.org/licenses/>. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +<https://www.gnu.org/licenses/why-not-lgpl.html>. diff --git a/ansible_collections/dellemc/os9/roles/os9_aaa/README.md b/ansible_collections/dellemc/os9/roles/os9_aaa/README.md new file mode 100644 index 000000000..849950900 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_aaa/README.md @@ -0,0 +1,331 @@ +AAA role +======== + +This role facilitates the configuration of authentication, authorization, and acccounting (AAA), and supports the configuration of RADIUS and TACACS servers. This role is abstracted for Dell EMC PowerSwitch platforms running Dell EMC OS9. + +The AAA role requires an SSH connection for connectivity to a Dell EMC OS9 device. You can use any of the built-in OS connection variables. + + +Role variables +-------------- + +- Role is abstracted using the `ansible_network_os` variable that can take `dellemc.os9.os9` as the value +- If `os9_cfg_generate` is set to true, the variable generates the role configuration commands in a file +- Any role variable with a corresponding state variable set to absent negates the configuration of that variable +- Setting an empty value for any variable negates the corresponding configuration +- Variables and values are case-sensitive + +**os9_aaa keys** + +| Key | Type | Description | Support | +|------------|---------------------------|---------------------------------------------------------|-----------------------| +| ``radius_server`` | dictionary | Configures the RADIUS server (see ``radius_server.*``) | os9 | +| ``radius_server.key`` | string (required): 0,7,LINE | Configures the authentication key for the RADIUS server | os9 | +| ``radius_server.key_string`` | string | Configures the user key string; variable takes the hidden user key string if value is 7; variable takes the unencrypted user key (clear-text) if value is 0; variable supported only if *radius_server.key* is 7 or 0 | os9 | +| ``radius_server.retransmit`` | integer | Configures the number of retransmissions | os9 | +| ``radius_server.timeout`` | integer | Configures the timeout for retransmissions | os9 | +| ``radius_server.deadtime`` | integer | Configures the server dead time | os9 | +| ``radius_server.group`` | dictionary | Configures the RADIUS servers group (see ``group.*``) | os9 | +| ``group.name`` | string (required) | Configures the group name of the RADIUS servers | os9 | +| ``group.host`` | dictionary | Configures the RADIUS server host in the group (see ``host.*``) | os9 | +| ``host.ip`` | string | Configures the RADIUS server host address in the group | os9 | +| ``host.key`` | string (required): 0,7,LINE | Configures the authentication key | os9 | +| ``host.key_string`` | string: 7,0 | Configures the user key string; variable takes the hidden user key string if value is 7; variable takes the unencrypted user key (clear-text) if value is 0; variable supported only if *host.key* is 7 or 0 | os9 | +| ``host.retransmit`` | integer | Configures the number of retransmissions | os9 | +| ``host.auth_port`` | integer | Configures the authentication port (0 to 65535) | os9 | +| ``host.timeout`` | integer | Configures the timeout for retransmissions | os9 | +| ``host.state`` | string: present,absent | Removes the host from group of RADIUS server if set to absent | os9 | +| ``group.vrf`` | dictionary | Configures the VRF for RADIUS servers in the group (see ``vrf.*``) | os9 | +| ``vrf.vrf_name`` | string (required) | Configures the name of VRF for the RADIUS server group | os9 | +| ``vrf.source_intf`` | integer | Configures the source interface for outgoing packets from servers in the group | os9 | +| ``vrf.state`` | string: present,absent | Removes the VRF from group of RADIUS servers if set to absent | os9 | +| ``group.state`` | string: present,absent | Removes the RADIUS server group if set to absent | os9 | +| ``radius_server.host`` | dictionary | Configures the RADIUS server host (see ``host.*``) | os9 | +| ``host.ip`` | string | Configures the RADIUS server host address | os9 | +| ``host.key`` | string (required); 0,7,LINE | Configures the authentication key | os9 | +| ``host.key_string`` | string | Configures the user key string; variable takes the hidden user key string if value is 7; variable takes the unencrypted user key (clear-text) if value is 0; variable supported only if *host.key* is 7 or 0 | os9 | +| ``host.retransmit`` | integer | Configures the number of retransmissions | os9 | +| ``host.auth_port`` | integer | Configures the authentication port (0 to 65535) | os9 | +| ``host.timeout`` | integer | Configures timeout for retransmissions | os9 | +| ``host.state`` | string: present,absent | Removes the RADIUS server host if set to absent | os9 | +| ``auth.key`` | string (required); 0,7,LINE | Configures the authentication key | os9 | +| ``tacacs_server`` | dictionary | Configures the TACACS server (see ``tacacs_server.*``)| os9 | +| ``tacacs_server.key`` | string (required): 0,7,LINE | Configures the authentication key for TACACS server | os9 | +| ``tacacs_server.key_string`` | string | Configures the user key string; variable takes the hidden user key string if value is 7; variable takes the unencrypted user key (clear-text) if value is 0; variable supported only if *tacacs_server.key* is 7 or 0 | os9 | +| ``tacacs_server.group`` | dictionary | Configures the group of TACACS servers (see ``group.*``) | os9 | +| ``group.name`` | string (required) | Configures the group name of the TACACS servers | os9 | +| ``group.host`` | dictionary | Configures the TACACS server host in the group (see ``host.*``) | os9 | +| ``host.ip`` | string | Configures the TACACS server host address in the group | os9 | +| ``host.key`` | string (required): 0,7,LINE | Configures the authentication key of the TACACS server host | os9 | +| ``host.key_string`` | string | Configures the user key string; variable takes the hidden user key string if value is 7; variable takes the unencrypted user key (clear-text) if value is 0; variable supported only *host.key* is 7 or 0 | os9 | +| ``host.retransmit`` | integer | Configures the number of retransmissions | os9 | +| ``host.auth_port`` | integer | Configures the authentication port (0 to 65535) | os9 | +| ``host.timeout`` | integer | Configures timeout for retransmissions | os9 | +| ``host.state`` | string: present,absent | Removes the host from group of TACACS server if set to absent | os9 | +| ``group.vrf`` | dictionary | Configures VRF for TACACS servers in the group (see ``vrf.*``) | os9 | +| ``vrf.vrf_name`` | string (required) | Configures the name of VRF for TACACS server group | os9 | +| ``vrf.source_intf`` | integer | Configures source interface for outgoing packets from servers in the group | os9 | +| ``vrf.state`` | string: present,absent | Removes the VRF from group of TACACS server if set to absent | os9 | +| ``group.state`` | string: present,absent | Removes the TACACS server group if set to absent | os9 | +| ``tacacs_server.host`` | dictionary | Configures the TACACS server host (see ``host.*``) | os9 | +| ``host.ip`` | string | Configures the TACACS sever host address | os9 | +| ``host.key`` | string (required): 0,7,LINE | Configures the authentication key | os9 | +| ``host.key_string`` | string | Configures the user key string; variable takes the hidden user key string if value is 7; variable takes the unencrypted user key (clear-text) if value is 0; variable supported only if *host.key* is 7 or 0 | os9 | +| ``host.retransmit`` | integer | Configures the number of retransmissions | os9 | +| ``host.auth_port`` | integer | Configures the authentication port (0 to 65535) | os9 | +| ``host.timeout`` | integer | Configures the timeout for retransmissions | os9 | +| ``host.state`` | string: present,absent | Removes the TACACS server host if set to absent | os9 | +| ``aaa_accounting`` | dictionary | Configures accounting parameters (see ``aaa_accounting.*``) | os9 | +| ``aaa_accounting.commands`` | list | Configures accounting for EXEC (shell) and config commands (see ``commands.*``) | os9 | +| ``commands.enable_level`` | integer | Configures enable level for accounting of commands | os9 | +| ``commands.role_name`` | string | Configures user role for accounting of commands; variable is mutually exclusive with ``enable_level`` | os9 | +| ``commands.accounting_list_name`` | integer | Configures named accounting list for commands | os9 | +| ``commands.no_accounting`` | boolean | Configures no accounting of commands | os9 | +| ``commands.record_option`` | string: start-stop,stop-only,wait-start | Configures options to record data | os9 | +| ``commands.state`` | string: present,absent | Removes the named accounting list for the commands if set to absent | os9 | +| ``aaa_accounting.exec`` | list | Configures accounting for EXEC (shell) commands (see ``exec.*``) | os9 | +| ``exec.accounting_list_name`` | string | Configures named accounting list for EXEC (shell) commands | os9 | +| ``exec.no_accounting`` | boolean | Configures no accounting of EXEC (shell) commands | os9 | +| ``exec.record_option`` | string: start-stop,stop-only,wait-start | Configures options to record data | os9 | +| ``exec.state`` | string: present,absent | Removes the named accounting list for the EXEC (shell) commands if set to absent | os9 | +| ``aaa_accounting.suppress`` | boolean | Suppresses accounting for users with NULL username | os9| +| ``aaa_accounting.dot1x`` | string: none,start-stop,stop-only,wait-start | Configures accounting for dot1x events | os9 | +| ``aaa_accounting.rest`` | string:none,start-stop,stop-only,wait-start | Configures accounting for REST interface events | os9 | +| ``aaa_authorization`` | dictionary | Configures authorization parameters (see ``aaa_authorization.*``) | os9 | +| ``aaa_authorization.commands`` | list | Configures authorization for EXEC (shell) and config commands (see ``commands.*``)| os9 | +| ``commands.enable_level`` | integer | Configures enable level for authorization of commands | os9 | +| ``commands.role_name`` | string | Configures user role for authorization of commands; mutually exclusive with ``enable_level`` | os9 | +| ``commands.authorization_list_name`` | string | Configures named authorization list for commands | os9 | +| ``commands.authorization_method`` | string: none | Configures no authorization of commands | os9 | +| ``commands.use_data`` | string: local,tacacs+ | Configures data used for authorization | os9 | +| ``commands.state`` | string: present,absent | Removes the named authorization list for the commands if set to absent | os9 | +| ``aaa_authorization.config_commands`` | boolean | Configures authorization for configuration mode commands | os9 | +| ``aaa_authorization.role_only`` | boolean | Configures validation of authentication mode for user role | os9 | +| ``aaa_authorization.exec`` | list | Configures authorization for EXEC (shell) commands (see ``exec.*``) | os9 | +| ``exec.authorization_list_name`` | string | Configures named authorization list for EXEC (shell) commands | os9 | +| ``exec.authorization_method`` | string: none | Configures no authorization of EXEC (shell) commands | os9 | +| ``exec.use_data`` | string: local,tacacs+ | Configures data used for authorization | os9 | +| ``exec.state`` | string: present,absent | Removes the named authorization list for the EXEC (shell) commands if set to absent | os9 | +| ``aaa_authorization.network`` | string: none,radius,ias | Configures authorization for network events | os9 | +| ``aaa_authentication`` | dictionary | Configures authentication parameters (see ``aaa_authentication.*``) | os9 | +| ``aaa_radius`` | dictionary | Configures AAA for RADIUS group of servers (see ``aaa_radius.*``) | os9 | +| ``aaa_radius.group`` | string | Configures name of the RADIUS group of servers for AAA | os9 | +| ``aaa_radius.auth_method`` | string: pap,mschapv2 | Configures authentication method of RADIUS group of servers for AAA | os9 | +| ``aaa_tacacs`` | dictionary | Configures AAA for TACACS group of servers (see ``aaa_tacacs.*``) | os9 | +| ``aaa_tacacs.group`` | string | Configures name of the TACACS group of servers for AAA | os9 | +| ``aaa_authentication.auth_list`` | list | Configures named authentication list for hosts (see ``host.*``) | os9 | +| ``auth_list.name`` | string | Configures named authentication list | os9 | +| ``auth_list.login_or_enable`` | string: enable,login | Configures authentication list for login or enable | os9 | +| ``auth_list.server`` | string: radius,tacacs+ | Configures AAA to use this list of all server hosts | os9 | +| ``auth_list.use_password`` | string: line,local,enable,none | Configures password to use for authentication | os9 | +| ``auth_list.state`` | string: present,absent | Removes the named authentication list if set to absent | os9 | +| ``aaa_authentication.dot1x`` | string: none,radius,ias | Configures authentication for dot1x events | os9 | +| ``line_terminal`` | dictionary | Configures the terminal line (see ``line_terminal.*``) | os9 | +| ``line_terminal.<terminal>`` | dictionary | Configures the primary or virtual terminal line (see ``<terminal>.*``); value can be console <line_number>, vty <line_number> | os9 | +| ``<terminal>.authorization`` | dictionary | Configures authorization parameters of line terminal (see ``authorization.*``) | os9 | +| ``authorization.commands`` | list | Configures authorization for EXEC (shell) and config commands (see ``commands.*``) | os9 | +| ``commands.enable_level`` | integer | Configures enable level for authorization of commands at line terminal | os9 | +| ``commands.role_name`` | string | Configures user role for authorization of commands at line terminal; mutually exclusive with `enable_level` | os9 | +| ``commands.authorization_list_name`` | string | Configures named authorization list for commands | os9 | +| ``commands.state`` | string: present,absent | Removes the authorization of commands from line terminal if set to absent | os9 | +| ``authorization.exec`` | list | Configures authorization for EXEC (shell) commands at line terminal (see ``exec.*``) | os9 | +| ``exec.authorization_list_name`` | string | Configures named authorization list for EXEC (shell) commands | os9 | +| ``exec.state`` | string: present,absent | Removes the authorization of EXEC (shell) from line terminal if set to absent | os9 | +| ``<terminal>.accounting`` | dictionary | Configures accounting parameters of line terminal (see ``accounting.*``) | os9 | +| ``accounting.commands`` | list | Configures accounting for EXEC (shell) and config commands (see ``commands.*``) | os9 | +| ``commands.enable_level`` | integer | Configures enable level for accounting of commands at line terminal | os9| +| ``commands.role_name`` | string | Configures user role for accounting of commands at line terminal; mutually exclusive with ``enable_level`` | os9 | +| ``commands.accounting_list_name`` | string | Configures named accounting list for commands | os9 | +| ``commands.state`` | string: present,absent | Removes the accounting of commands from line terminal if set to absent | os9| +| ``accounting.exec`` | list | Configures accounting for EXEC (shell) commands at line terminal (see ``exec.*``) | os9 | +| ``exec.accounting_list_name`` | string | Configures named accounting list for EXEC (shell) commands | os9 | +| ``exec.state`` | string: present,absent | Removes the accounting of EXEC (shell) from line terminal if set to absent | os9 | +| ``<terminal>.authentication`` | dictionary | Configures authentication parameters of line terminal (see ``authentication.*``) | os9 | +| ``authentication.enable`` | string | Configures the authentication list for privilege-level password authentication | os9 | +| ``authentication.login`` | string | Configures the authentication list for password checking | os9 | +| ``client.ip`` | string | Configures the client IP for the radius server | os9 | +| ``client.key`` | string (required): 0,7,LINE | Configures the authentication key for the RADIUS server | os9 | +> **NOTE**: Asterisk (*) denotes the default value if none is specified. + +Connection variables +-------------------- + +Ansible Dell EMC network roles require connection information to establish communication with the nodes in your inventory. This information can exist in the Ansible *group_vars* or *host_vars* directories or inventory, or in the playbook itself. + +| Key | Required | Choices | Description | +|-------------|----------|------------|-----------------------------------------------------| +| ``ansible_host`` | yes | | Specifies the hostname or address for connecting to the remote device over the specified transport | +| ``ansible_port`` | no | | Specifies the port used to build the connection to the remote device; if value is unspecified, the `ANSIBLE_REMOTE_PORT` option is used; it defaults to 22 | +| ``ansible_ssh_user`` | no | | Specifies the username that authenticates the CLI login for the connection to the remote device; if value is unspecified, the `ANSIBLE_REMOTE_USER` environment variable value is used | +| ``ansible_ssh_pass`` | no | | Specifies the password that authenticates the connection to the remote device. | +| ``ansible_become`` | no | yes, no\* | Instructs the module to enter privileged mode on the remote device before sending any commands; if value is unspecified, the `ANSIBLE_BECOME` environment variable value is used, and the device attempts to execute all commands in non-privileged mode | +| ``ansible_become_method`` | no | enable, sudo\* | Instructs the module to allow the become method to be specified for handling privilege escalation; if value is unspecified, the `ANSIBLE_BECOME_METHOD` environment variable value is used | +| ``ansible_become_pass`` | no | | Specifies the password to use if required to enter privileged mode on the remote device; if ``ansible_become`` is set to no this key is not applicable | +| ``ansible_network_os`` | yes | os9, null\* | Loads the correct terminal and cliconf plugins to communicate with the remote device | + +> **NOTE**: Asterisk (*) denotes the default value if none is specified. + +Example playbook +---------------- + +This example uses the *os9_aaa* role to configure AAA for RADIUS and TACACS servers. It creates a *hosts* file with the switch details and corresponding variables. The hosts file should define the `ansible_network_os` variable with the corresponding Dell EMC OS0 name. + +When `os9_cfg_generate` is set to true, the variable generates the configuration commands as a .part file in the *build_dir* path. By default, it is set to false and it writes a simple playbook that only references the *os9_aaa* role. + +**Sample hosts file** + + leaf1 ansible_host= <ip_address> + +**Sample host_vars/leaf1** + + hostname: leaf1 + ansible_become: yes + ansible_become_method: xxxxx + ansible_become_pass: xxxxx + ansible_ssh_user: xxxxx + ansible_ssh_pass: xxxxx + ansible_network_os: dellemc.os9.os9 + build_dir: ../temp/os9 + + os9_aaa: + radius_server: + key: radius + retransmit: 5 + timeout: 40 + deadtime: 2300 + group: + - name: RADIUS + host: + - ip: 2001:4898:f0:f09b::1002 + key: 0 + key_string: aaaa + retransmit: 5 + auth_port: 3 + timeout: 2 + state: present + vrf: + vrf_name: test + source_intf: fortyGigE 1/2 + state: absent + state: present + host: + - ip: 2001:4898:f0:f09b::1002 + key: xxx + retransmit: 5 + auth_port: 3 + timeout: 2 + state: present + tacacs_server: + key: 7 + key_string: 9ea8ec421c2e2e5bec757f44205015f6d81e83a4f0aa52fa + group: + - name: TACACS + host: + - ip: 2001:4898:f0:f09b::1000 + key: 0 + key_string: aaa + retransmit: 6 + auth_port: 3 + timeout: 2 + state: present + vrf: + vrf_name: tes + source_intf: fortyGigE 1/3 + state: present + state: present + host: + - ip: 2001:4898:f0:f09b::1000 + key: 0 + key_string: aa + retransmit: 5 + auth_port: 3 + timeout: 2 + state: present + aaa_accounting: + commands: + - enable_level: 2 + accounting_list_name: aa + record_option: start-stop + state: present + - role_name: netadmin + accounting_list_name: aa + no_accounting: none + suppress: True + exec: + - accounting_list_name: aaa + no_accounting: true + state: present + dot1x: none + rest: none + aaa_authorization: + commands: + - enable_level: 2 + authorization_list_name: aa + use_data: local + state: present + - role_name: netadmin + authorization_list_name: aa + authorization_method: none + use_data: local + config_commands: True + role_only: + exec: + - authorization_list_name: aaa + authorization_method: if-authenticated + use_data: local + state: present + aaa_authentication: + auth_list: + - name: default + login_or_enable: login + server: radius + use_password: local + state: present + - name: console + server: tacacs+ + login_or_enable: login + use_password: local + aaa_radius: + group: RADIUS + auth_method: pap + aaa_tacacs: + group: TACACS + line_terminal: + vty 0: + authorization: + commands: + - enable_level: 2 + authorization_list_name: aa + state: present + - role_name: netadmin + authorization_list_name: aa + state: present + exec: + - authorization_list_name: aa + state: present + accounting: + commands: + - enable_level: 2 + accounting_list_name: aa + state: present + - role_name: netadmin + accounting_list_name: aa + state: absent + exec: + accounting_list_name: aa + state: present + authentication: + enable: + login: console + +**Simple playbook to setup system — leaf.yaml** + + - hosts: leaf1 + roles: + - dellemc.os9.os9_aaa + +**Run** + + ansible-playbook -i hosts leaf.yaml + +(c) 2017-2020 Dell Inc. or its subsidiaries. All rights reserved. diff --git a/ansible_collections/dellemc/os9/roles/os9_aaa/defaults/main.yml b/ansible_collections/dellemc/os9/roles/os9_aaa/defaults/main.yml new file mode 100644 index 000000000..8fce00350 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_aaa/defaults/main.yml @@ -0,0 +1,16 @@ +--- +# defaults file for dellemc.os9.os9_aaa +attribute_type: + mandatory: mandatory + on_for_login_auth: on-for-login-auth + include_in_access_req: include-in-access-req + mac: "mac format" + mac_ietf: "mac format ietf" + mac_ietf_lower_case: "mac format ietf lower-case" + mac_ietf_upper_case: "mac format ietf upper-case" + mac_legacy: "mac format legacy" + mac_legacy_lower_case: "mac format legacy lower-case" + mac_legacy_upper_case: "mac format legacy upper-case" + mac_unformatted: "mac format unformatted" + mac_unformatted_lower_case: "mac format unformatted lower-case" + mac_unformatted_upper_case: "mac format unformatted upper-case"
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_aaa/handlers/main.yml b/ansible_collections/dellemc/os9/roles/os9_aaa/handlers/main.yml new file mode 100644 index 000000000..ad771c4fa --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_aaa/handlers/main.yml @@ -0,0 +1,2 @@ +--- +# handlers file for dellemc.os9.os9_aaa
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_aaa/meta/main.yml b/ansible_collections/dellemc/os9/roles/os9_aaa/meta/main.yml new file mode 100644 index 000000000..2f94f923f --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_aaa/meta/main.yml @@ -0,0 +1,19 @@ +# copyright (c) 2017-2020 Dell Inc. or its subsidiaries. All Rights Reserved. +--- +galaxy_info: + author: Dell EMC Networking Engineering + description: > + The os9_aaa role facilitates the configuration of Authentication Authorization Acccounting (AAA) attributes + in devices running Dell EMC Networking Operating Systems. + license: GPLv3 + min_ansible_version: 2.9.6 + + platforms: + - name: os9 + + galaxy_tags: + - networking + - dell + - emc + - dellemc + - os9 diff --git a/ansible_collections/dellemc/os9/roles/os9_aaa/tasks/main.yml b/ansible_collections/dellemc/os9/roles/os9_aaa/tasks/main.yml new file mode 100644 index 000000000..5ffba7b6b --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_aaa/tasks/main.yml @@ -0,0 +1,17 @@ +--- +# tasks file for os9 + + - name: "Generating AAA configuration for os9" + template: + src: os9_aaa.j2 + dest: "{{ build_dir }}/aaa9_{{ hostname }}.conf.part" + when: (ansible_network_os is defined and ansible_network_os == "dellemc.os9.os9") and ((os9_cfg_generate | default('False')) | bool) +# notify: save config os9 + register: generate_output + + - name: "Provisioning AAA configuration for os9" + dellemc.os9.os9_config: + src: os9_aaa.j2 + when: (ansible_network_os is defined and ansible_network_os == "dellemc.os9.os9") +# notify: save config os9 + register: output diff --git a/ansible_collections/dellemc/os9/roles/os9_aaa/templates/os9_aaa.j2 b/ansible_collections/dellemc/os9/roles/os9_aaa/templates/os9_aaa.j2 new file mode 100644 index 000000000..0d4aa9f4a --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_aaa/templates/os9_aaa.j2 @@ -0,0 +1,680 @@ +#jinja2: trim_blocks: True,lstrip_blocks: True +{############################################# +Purpose: +Configure AAA commands for os9 Devices +os9_aaa: + tacacs_server: + key: 7 + key_string: 9ea8ec421c2e2e5bec757f44205015f6d81e83a4f0aa52fa + group: + - name: TACACS + host: + - ip: 2001:4898:f0:f09b::1000 + key: 0 + key_string: aaa + auth_port: 3 + timeout: 2 + state: present + vrf: + vrf_name: test + source_intf: fortyGigE 1/2 + state: present + state: present + host: + - ip: 2001:4898:f0:f09b::1000 + key: 0 + key_string: aaa + auth_port: 3 + timeout: 2 + state: present + radius_server: + key: 7 + key_string: 9ea8ec421c2e2e5bec757f44205015f6d81e83a4f0aa52fb + retransmit: 5 + timeout: 10 + deadtime: 2000 + group: + - name: Radius + host: + - ip: 2001:4898:f0:f09b::1001 + key: 0 + key_string: aaa + retransmit: 5 + auth_port: 3 + timeout: 2 + state: present + vrf: + vrf_name: test + source_intf: fortyGigE 1/3 + state: present + state: present + host: + - ip: 2001:4898:f0:f09b::1001 + key: 0 + key_string: aaa + retransmit: 5 + auth_port: 3 + timeout: 2 + state: present + aaa_accounting: + commands: + - enable_level: 2 + accounting_list_name: aa + no_accounting: true + record_option: start-stop + state: present + suppress: True + exec: + - accounting_list_name: aaa + no_accounting: true + state: present + dot1x: none + rest: none + aaa_authorization: + commands: + - enable_level: 2 + authorization_list_name: aa + use_data: local + state: present + - role_name: netadmin + authorization_list_name: aa + authorization_method: none + use_data: local + config_commands: True + role_only: True + exec: + - authorization_list_name: aaa + authorization_method: if-authenticated + use_data: local + state: present + aaa_radius: + group: RADIUS + auth_method: pap + aaa_tacacs: + group: TACACS + aaa_authentication: + auth_list: + - name: default + login_or_enable: login + server: tacacs+ + use_password: local + state: present + - name: console + server: radius + login_or_enable: login + use_password: local + line_terminal: + vty 0: + authorization: + commands: + - enable_level: 2 + authorization_list_name: aa + state: present + - enable_level: 2 + authorization_list_name: aa + state: present + exec: + - authorization_list_name: aa + state: present + accounting: + commands: + - enable_level: 2 + accounting_list_name: aa + state: present + - enable_level: 2 + accounting_list_name: aa + state: present + exec: + - accounting_list_name: aa + state: present + authentication: + enable: aa + login: console +##################################################} +{% if os9_aaa is defined and os9_aaa %} +{% for key in os9_aaa.keys() %} + {% set aaa_vars = os9_aaa[key] %} + {% if key == "tacacs_server" %} + {% set server = "tacacs-server" %} + {% endif %} + {% if key == "radius_server" %} + {% set server = "radius-server" %} + {% endif %} + {% if server is defined and server %} + {% if aaa_vars %} + {% set item = aaa_vars %} + {% if item.retransmit is defined %} + {% if item.retransmit %} +{{ server }} retransmit {{ item.retransmit }} + {% else %} +no {{ server }} retransmit + {% endif %} + {% endif %} + {% if item.timeout is defined %} + {% if item.timeout %} +{{ server }} timeout {{ item.timeout }} + {% else %} +no {{ server }} timeout + {% endif %} + {% endif %} + {% if item.deadtime is defined %} + {% if item.deadtime %} +{{ server }} deadtime {{ item.deadtime }} + {% else %} +no {{ server }} deadtime + {% endif %} + {% endif %} + {% if item.key is defined %} + {% if item.key == 0 or item.key == 7 %} + {% if item.key_string is defined and item.key_string%} +{{ server }} key {{ item.key }} {{ item.key_string }} + {% endif %} + {% elif item.key %} +{{ server }} key {{ item.key }} + {% else %} +no {{ server }} key + {% endif %} + {% endif %} + {% if item.host is defined and item.host %} + {% for hostlist in item.host %} + {% if hostlist.ip is defined and hostlist.ip %} + {% if hostlist.state is defined and hostlist.state == "absent" %} + {% if (hostlist.key is defined and (hostlist.key == 0 or hostlist.key == 7) ) and (hostlist.key_string is defined and hostlist.key_string) and (hostlist.timeout is defined and hostlist.timeout) and (hostlist.auth_port is defined and hostlist.auth_port) and (hostlist.retransmit is defined and hostlist.retransmit) and server == "radius-server" %} + {% if server == "radius-server" %}{%set port = "auth-port" %}{%else %}{% set port = "port" %}{% endif %} +no {{ server }} host {{ hostlist.ip }} key {{ hostlist.key }} {{ hostlist.key_string }} timeout {{ hostlist.timeout }} {{ port }} {{ hostlist.auth_port }} retransmit {{ hostlist.retransmit }} + {% elif (hostlist.key is defined and (hostlist.key == 0 or hostlist.key == 7)) and (hostlist.key_string is defined and hostlist.key_string) and (hostlist.timeout is defined and hostlist.timeout) and (hostlist.auth_port is defined and hostlist.auth_port) %} + {% if server == "radius-server" %}{%set port = "auth-port" %}{%else %}{% set port = "port" %}{% endif %} +no {{ server }} host {{ hostlist.ip }} key {{ hostlist.key }} {{ hostlist.key_string }} timeout {{ hostlist.timeout }} {{ port }} {{ hostlist.auth_port }} + {% elif (hostlist.key is defined and (hostlist.key == 0 or hostlist.key == 7)) and (hostlist.key_string is defined and hostlist.key_string) and (hostlist.timeout is defined and hostlist.timeout) %} +no {{ server }} host {{ hostlist.ip }} key {{ hostlist.key }} {{ hostlist.key_string }} timeout {{ hostlist.timeout }} + {% elif (hostlist.key is defined and (hostlist.key == 0 or hostlist.key == 7)) and (hostlist.key_string is defined and hostlist.key_string) %} +no {{ server }} host {{ hostlist.ip }} key {{ hostlist.key }} {{ hostlist.key_string }} + {% elif (hostlist.key is defined and hostlist.key) and (hostlist.timeout is defined and hostlist.timeout) and (hostlist.auth_port is defined and hostlist.auth_port) and (hostlist.retransmit is defined and hostlist.retransmit) and server == "radius-server" %} + {% if server == "radius-server" %}{%set port = "auth-port" %}{%else %}{% set port = "port" %}{% endif %} +no {{ server }} host {{ hostlist.ip }} key {{ hostlist.key }} timeout {{ hostlist.timeout }} {{ port }} {{ hostlist.auth_port }} retransmit {{ hostlist.retransmit }} + {% elif (hostlist.key is defined and hostlist.key) and (hostlist.timeout is defined and hostlist.timeout) and (hostlist.auth_port is defined and hostlist.auth_port) %} + {% if server == "radius-server" %}{%set port = "auth-port" %}{%else %}{% set port = "port" %}{% endif %} +no {{ server }} host {{ hostlist.ip }} key {{ hostlist.key }} timeout {{ hostlist.timeout }} {{ port }} {{ hostlist.auth_port }} + {% elif (hostlist.key is defined and hostlist.key) and (hostlist.timeout is defined and hostlist.timeout) %} +no {{ server }} host {{ hostlist.ip }} key {{ hostlist.key }} timeout {{ hostlist.timeout }} + {% elif (hostlist.timeout is defined and hostlist.timeout) and (hostlist.auth_port is defined and hostlist.auth_port) and (hostlist.retransmit is defined and hostlist.retransmit) and server == "radius-server" %} + {% if server == "radius-server" %}{%set port = "auth-port" %}{%else %}{% set port = "port" %}{% endif %} +no {{ server }} host {{ hostlist.ip }} timeout {{ hostlist.timeout }} {{ port }} {{ hostlist.auth_port }} retransmit {{ hostlist.retransmit }} + {% elif (hostlist.timeout is defined and hostlist.timeout) and (hostlist.auth_port is defined and hostlist.auth_port) %} + {% if server == "radius-server" %}{%set port = "auth-port" %}{%else %}{% set port = "port" %}{% endif %} +no {{ server }} host {{ hostlist.ip }} timeout {{ hostlist.timeout }} {{ port }} {{ hostlist.auth_port }} + {% elif (hostlist.auth_port is defined and hostlist.auth_port) and (hostlist.retransmit is defined and hostlist.retransmit) and server == "radius-server" %} + {% if server == "radius-server" %}{%set port = "auth-port" %}{%else %}{% set port = "port" %}{% endif %} +no {{ server }} host {{ hostlist.ip }} {{ port }} {{ hostlist.auth_port }} retransmit {{ hostlist.retransmit }} + {% elif (hostlist.timeout is defined and hostlist.timeout) %} +no {{ server }} host {{ hostlist.ip }} timeout {{ hostlist.timeout }} + {% elif (hostlist.auth_port is defined and hostlist.auth_port) %} + {% if server == "radius-server" %}{%set port = "auth-port" %}{%else %}{% set port = "port" %}{% endif %} +no {{ server }} host {{ hostlist.ip }} {{ port }} {{ hostlist.auth_port }} + {% elif (hostlist.retransmit is defined and hostlist.retransmit) and server == "radius-server" %} +no {{ server }} host {{ hostlist.ip }} retransmit {{ hostlist.retransmit }} + {% elif (hostlist.key is defined and (hostlist.key == 0 or hostlist.key == 7) )%} +no {{ server }} host {{ hostlist.ip }} key {{ hostlist.key }} {{ hostlist.key_string }} + {% elif (hostlist.key is defined and hostlist.key) %} +no {{ server }} host {{ hostlist.ip }} key {{ hostlist.key }} + {% else %} +no {{ server }} host {{ hostlist.ip }} + {% endif %} + {% else %} + {% if (hostlist.key is defined and (hostlist.key == 0 or hostlist.key == 7)) and (hostlist.key_string is defined and hostlist.key_string) and (hostlist.timeout is defined and hostlist.timeout) and (hostlist.auth_port is defined and hostlist.auth_port) and (hostlist.retransmit is defined and hostlist.retransmit) and server == "radius-server" %} + {% if server == "radius-server" %}{%set port = "auth-port" %}{%else %}{% set port = "port" %}{% endif %} +{{ server }} host {{ hostlist.ip }} key {{ hostlist.key }} {{ hostlist.key_string }} timeout {{ hostlist.timeout }} {{ port }} {{ hostlist.auth_port }} retransmit {{ hostlist.retransmit }} + {% elif (hostlist.key is defined and (hostlist.key== 0 or hostlist.key == 7)) and (hostlist.key_string is defined and hostlist.key_string) and (hostlist.timeout is defined and hostlist.timeout) and (hostlist.auth_port is defined and hostlist.auth_port) %} + {% if server == "radius-server" %}{%set port = "auth-port" %}{%else %}{% set port = "port" %}{% endif %} +{{ server }} host {{ hostlist.ip }} key {{ hostlist.key }} {{ hostlist.key_string }} timeout {{ hostlist.timeout }} {{ port }} {{ hostlist.auth_port }} + {% elif (hostlist.key is defined and (hostlist.key == 0 or hostlist.key == 7)) and (hostlist.key_string is defined and hostlist.key_string) and (hostlist.timeout is defined and hostlist.timeout) %} +{{ server }} host {{ hostlist.ip }} key {{ hostlist.key }} {{ hostlist.key_string }} timeout {{ hostlist.timeout }} + {% elif (hostlist.key is defined and (hostlist.key == 0 or hostlist.key == 7)) and (hostlist.key_string is defined and hostlist.key_string) %} +{{ server }} host {{ hostlist.ip }} key {{ hostlist.key }} {{ hostlist.key_string }} + {% elif (hostlist.key is defined and hostlist.key) and (hostlist.timeout is defined and hostlist.timeout) and (hostlist.auth_port is defined and hostlist.auth_port) and (hostlist.retransmit is defined and hostlist.retransmit) and server == "radius-server" %} + {% if server == "radius-server" %}{%set port = "auth-port" %}{%else %}{% set port = "port" %}{% endif %} +{{ server }} host {{ hostlist.ip }} key {{ hostlist.key }} timeout {{ hostlist.timeout }} {{ port }} {{ hostlist.auth_port }} retransmit {{ hostlist.retransmit }} + {% elif (hostlist.key is defined and hostlist.key) and (hostlist.timeout is defined and hostlist.timeout) and (hostlist.auth_port is defined and hostlist.auth_port) %} + {% if server == "radius-server" %}{%set port = "auth-port" %}{%else %}{% set port = "port" %}{% endif %} +{{ server }} host {{ hostlist.ip }} key {{ hostlist.key }} timeout {{ hostlist.timeout }} {{ port }} {{ hostlist.auth_port }} + {% elif (hostlist.key is defined and hostlist.key) and (hostlist.timeout is defined and hostlist.timeout) %} +{{ server }} host {{ hostlist.ip }} key {{ hostlist.key }} timeout {{ hostlist.timeout }} + {% elif (hostlist.timeout is defined and hostlist.timeout) and (hostlist.auth_port is defined and hostlist.auth_port) and (hostlist.retransmit is defined and hostlist.retransmit) and server == "radius-server" %} + {% if server == "radius-server" %}{%set port = "auth-port" %}{%else %}{% set port = "port" %}{% endif %} +{{ server }} host {{ hostlist.ip }} timeout {{ hostlist.timeout }} {{ port }} {{ hostlist.auth_port }} retransmit {{ hostlist.retransmit }} + {% elif (hostlist.timeout is defined and hostlist.timeout) and (hostlist.auth_port is defined and hostlist.auth_port) %} + {% if server == "radius-server" %}{%set port = "auth-port" %}{%else %}{% set port = "port" %}{% endif %} +{{ server }} host {{ hostlist.ip }} timeout {{ hostlist.timeout }} {{ port }} {{ hostlist.auth_port }} + {% elif (hostlist.auth_port is defined and hostlist.auth_port) and (hostlist.retransmit is defined and hostlist.retransmit) and server == "radius-server" %} + {% if server == "radius-server" %}{%set port = "auth-port" %}{%else %}{% set port = "port" %}{% endif %} +{{ server }} host {{ hostlist.ip }} {{ port }} {{ hostlist.auth_port }} retransmit {{ hostlist.retransmit }} + {% elif (hostlist.timeout is defined and hostlist.timeout) %} +{{ server }} host {{ hostlist.ip }} timeout {{ hostlist.timeout }} + {% elif (hostlist.auth_port is defined and hostlist.auth_port) %} + {% if server == "radius-server" %}{%set port = "auth-port" %}{%else %}{% set port = "port" %}{% endif %} +{{ server }} host {{ hostlist.ip }} {{ port }} {{ hostlist.auth_port }} + {% elif (hostlist.retransmit is defined and hostlist.retransmit) and server == "radius-server"%} +{{ server }} host {{ hostlist.ip }} retransmit {{ hostlist.retransmit }} + {% elif (hostlist.key is defined and (hostlist.key == 0 or hostlist.key == 7))%} +{{ server }} host {{ hostlist.ip }} key {{ hostlist.key }} {{ hostlist.key_string }} + {% elif (hostlist.key is defined and hostlist.key) %} +{{ server }} host {{ hostlist.ip }} key {{ hostlist.key }} + {% else %} +{{ server }} host {{ hostlist.ip }} + {% endif %} + {% endif %} + {% endif %} + {% endfor %} + {% endif %} + {% if item.group is defined and item.group %} + {% for groupitem in item.group %} + {% if groupitem.name is defined and groupitem.name %} + {% if groupitem.state is defined and groupitem.state == "absent" %} +no {{ server }} group {{ groupitem.name }} + {% else %} +{{ server }} group {{ groupitem.name }} + {% if groupitem.host is defined and groupitem.host %} + {% for hostlist in groupitem.host %} + {% if hostlist.ip is defined and hostlist.ip %} + {% if hostlist.state is defined and hostlist.state == "absent" %} + {% if (hostlist.key is defined and (hostlist.key or hostlist.key == 7)) and (hostlist.key_string is defined and hostlist.key_string) and (hostlist.timeout is defined and hostlist.timeout) and (hostlist.auth_port is defined and hostlist.auth_port) and (hostlist.retransmit is defined and hostlist.retransmit) and server == "radius-server" %} + {% if server == "radius-server" %}{%set port = "auth-port" %}{%else %}{% set port = "port" %}{% endif %} + no {{ server }} host {{ hostlist.ip }} key {{ hostlist.key }} {{ hostlist.key_string }} timeout {{ hostlist.timeout }} {{ port }} {{ hostlist.auth_port }} retransmit {{ hostlist.retransmit }} + {% elif (hostlist.key is defined and (hostlist.key or hostlist.key == 7)) and (hostlist.key_string is defined and hostlist.key_string) and (hostlist.timeout is defined and hostlist.timeout) and (hostlist.auth_port is defined and hostlist.auth_port) %} + {% if server == "radius-server" %}{%set port = "auth-port" %}{%else %}{% set port = "port" %}{% endif %} + no {{ server }} host {{ hostlist.ip }} key {{ hostlist.key }} {{ hostlist.key_string }} timeout {{ hostlist.timeout }} {{ port }} {{ hostlist.auth_port }} + {% elif (hostlist.key is defined and (hostlist.key or hostlist.key == 7)) and (hostlist.key_string is defined and hostlist.key_string) and (hostlist.timeout is defined and hostlist.timeout) %} + no {{ server }} host {{ hostlist.ip }} key {{ hostlist.key }} {{ hostlist.key_string }} timeout {{ hostlist.timeout }} + {% elif (hostlist.key is defined and (hostlist.key or hostlist.key == 7)) and (hostlist.key_string is defined and hostlist.key_string) %} + no {{ server }} host {{ hostlist.ip }} key {{ hostlist.key }} {{ hostlist.key_string }} + {% elif (hostlist.key is defined and hostlist.key) and (hostlist.timeout is defined and hostlist.timeout) and (hostlist.auth_port is defined and hostlist.auth_port) and (hostlist.retransmit is defined and hostlist.retransmit) and server == "radius-server" %} + {% if server == "radius-server" %}{%set port = "auth-port" %}{%else %}{% set port = "port" %}{% endif %} + no {{ server }} host {{ hostlist.ip }} key {{ hostlist.key }} timeout {{ hostlist.timeout }} {{ port }} {{ hostlist.auth_port }} retransmit {{ hostlist.retransmit }} + {% elif (hostlist.key is defined and hostlist.key) and (hostlist.timeout is defined and hostlist.timeout) and (hostlist.auth_port is defined and hostlist.auth_port) %} + {% if server == "radius-server" %}{%set port = "auth-port" %}{%else %}{% set port = "port" %}{% endif %} + no {{ server }} host {{ hostlist.ip }} key {{ hostlist.key }} timeout {{ hostlist.timeout }} {{ port }} {{ hostlist.auth_port }} + {% elif (hostlist.key is defined and hostlist.key) and (hostlist.timeout is defined and hostlist.timeout) %} + no {{ server }} host {{ hostlist.ip }} key {{ hostlist.key }} timeout {{ hostlist.timeout }} + {% elif (hostlist.timeout is defined and hostlist.timeout) and (hostlist.auth_port is defined and hostlist.auth_port) and (hostlist.retransmit is defined and hostlist.retransmit) and server == "radius-server" %} + {% if server == "radius-server" %}{%set port = "auth-port" %}{%else %}{% set port = "port" %}{% endif %} + no {{ server }} host {{ hostlist.ip }} timeout {{ hostlist.timeout }} {{ port }} {{ hostlist.auth_port }} retransmit {{ hostlist.retransmit }} + {% elif (hostlist.timeout is defined and hostlist.timeout) and (hostlist.auth_port is defined and hostlist.auth_port) %} + {% if server == "radius-server" %}{%set port = "auth-port" %}{%else %}{% set port = "port" %}{% endif %} + no {{ server }} host {{ hostlist.ip }} timeout {{ hostlist.timeout }} {{ port }} {{ hostlist.auth_port }} + {% elif (hostlist.auth_port is defined and hostlist.auth_port) and (hostlist.retransmit is defined and hostlist.retransmit) and server == "radius-server" %} + {% if server == "radius-server" %}{%set port = "auth-port" %}{%else %}{% set port = "port" %}{% endif %} + no {{ server }} host {{ hostlist.ip }} {{ port }} {{ hostlist.auth_port }} retransmit {{ hostlist.retransmit }} + {% elif (hostlist.timeout is defined and hostlist.timeout) %} + no {{ server }} host {{ hostlist.ip }} timeout {{ hostlist.timeout }} + {% elif (hostlist.auth_port is defined and hostlist.auth_port) %} + {% if server == "radius-server" %}{%set port = "auth-port" %}{%else %}{% set port = "port" %}{% endif %} + no {{ server }} host {{ hostlist.ip }} {{ port }} {{ hostlist.auth_port }} + {% elif (hostlist.retransmit is defined and hostlist.retransmit) and server == "radius-server" %} + no {{ server }} host {{ hostlist.ip }} retransmit {{ hostlist.retransmit }} + {% elif (hostlist.key is defined and (hostlist.key == 0 or hostlist.key == 7)) %} + no {{ server }} host {{ hostlist.ip }} key {{ hostlist.key }} {{ hostlist.key_string }} + {% elif (hostlist.key is defined and hostlist.key) %} + no {{ server }} host {{ hostlist.ip }} key {{ hostlist.key }} + {% else %} + no {{ server }} host {{ hostlist.ip }} + {% endif %} + {% else %} + {% if (hostlist.key is defined and (hostlist.key== 0 or hostlist.key == 7)) and (hostlist.key_string is defined and hostlist.key_string) and (hostlist.timeout is defined and hostlist.timeout) and (hostlist.auth_port is defined and hostlist.auth_port) and (hostlist.retransmit is defined and hostlist.retransmit) and server == "radius-server" %} + {% if server == "radius-server" %}{%set port = "auth-port" %}{%else %}{% set port = "port" %}{% endif %} + {{ server }} host {{ hostlist.ip }} key {{ hostlist.key }} {{ hostlist.key_string }} timeout {{ hostlist.timeout }} {{ port }} {{ hostlist.auth_port }} retransmit {{ hostlist.retransmit }} + {% elif (hostlist.key is defined and (hostlist.key == 0 or hostlist.key == 7)) and (hostlist.key_string is defined and hostlist.key_string) and (hostlist.timeout is defined and hostlist.timeout) and (hostlist.auth_port is defined and hostlist.auth_port) %} + {% if server == "radius-server" %}{%set port = "auth-port" %}{%else %}{% set port = "port" %}{% endif %} + {{ server }} host {{ hostlist.ip }} key {{ hostlist.key }} {{ hostlist.key_string }} timeout {{ hostlist.timeout }} {{ port }} {{ hostlist.auth_port }} + {% elif (hostlist.key is defined and (hostlist.key == 0 or hostlist.key == 7)) and (hostlist.key_string is defined and hostlist.key_string) and (hostlist.timeout is defined and hostlist.timeout) %} + {{ server }} host {{ hostlist.ip }} key {{ hostlist.key }} {{ hostlist.key_string }} timeout {{ hostlist.timeout }} + {% elif (hostlist.key is defined and (hostlist.key == 0 or hostlist.key == 7)) and (hostlist.key_string is defined and hostlist.key_string) %} + {{ server }} host {{ hostlist.ip }} key {{ hostlist.key }} {{ hostlist.key_string }} + {% elif (hostlist.key is defined and hostlist.key) and (hostlist.timeout is defined and hostlist.timeout) and (hostlist.auth_port is defined and hostlist.auth_port) and (hostlist.retransmit is defined and hostlist.retransmit) and server == "radius-server" %} + {% if server == "radius-server" %}{%set port = "auth-port" %}{%else %}{% set port = "port" %}{% endif %} + {{ server }} host {{ hostlist.ip }} key {{ hostlist.key }} timeout {{ hostlist.timeout }} {{ port }} {{ hostlist.auth_port }} retransmit {{ hostlist.retransmit }} + {% elif (hostlist.key is defined and hostlist.key) and (hostlist.timeout is defined and hostlist.timeout) and (hostlist.auth_port is defined and hostlist.auth_port) %} + {% if server == "radius-server" %}{%set port = "auth-port" %}{%else %}{% set port = "port" %}{% endif %} + {{ server }} host {{ hostlist.ip }} key {{ hostlist.key }} timeout {{ hostlist.timeout }} {{ port }} {{ hostlist.auth_port }} + {% elif (hostlist.key is defined and hostlist.key) and (hostlist.timeout is defined and hostlist.timeout) %} + {{ server }} host {{ hostlist.ip }} key {{ hostlist.key }} timeout {{ hostlist.timeout }} + {% elif (hostlist.timeout is defined and hostlist.timeout) and (hostlist.auth_port is defined and hostlist.auth_port) and (hostlist.retransmit is defined and hostlist.retransmit) and server == "radius-server" %} + {% if server == "radius-server" %}{%set port = "auth-port" %}{%else %}{% set port = "port" %}{% endif %} + {{ server }} host {{ hostlist.ip }} timeout {{ hostlist.timeout }} {{ port }} {{ hostlist.auth_port }} retransmit {{ hostlist.retransmit }} + {% elif (hostlist.timeout is defined and hostlist.timeout) and (hostlist.auth_port is defined and hostlist.auth_port) %} + {% if server == "radius-server" %}{%set port = "auth-port" %}{%else %}{% set port = "port" %}{% endif %} + {{ server }} host {{ hostlist.ip }} timeout {{ hostlist.timeout }} {{ port }} {{ hostlist.auth_port }} + {% elif (hostlist.auth_port is defined and hostlist.auth_port) and (hostlist.retransmit is defined and hostlist.retransmit) and server == "radius-server" %} + {% if server == "radius-server" %}{%set port = "auth-port" %}{%else %}{% set port = "port" %}{% endif %} + {{ server }} host {{ hostlist.ip }} {{ port }} {{ hostlist.auth_port }} retransmit {{ hostlist.retransmit }} + {% elif (hostlist.timeout is defined and hostlist.timeout) %} + {{ server }} host {{ hostlist.ip }} timeout {{ hostlist.timeout }} + {% elif (hostlist.auth_port is defined and hostlist.auth_port) %} + {% if server == "radius-server" %}{%set port = "auth-port" %}{%else %}{% set port = "port" %}{% endif %} + {{ server }} host {{ hostlist.ip }} {{ port }} {{ hostlist.auth_port }} + {% elif (hostlist.retransmit is defined and hostlist.retransmit) and server == "radius-server"%} + {{ server }} host {{ hostlist.ip }} retransmit {{ hostlist.retransmit }} + {% elif (hostlist.key is defined and (hostlist.key == 0 or hostlist.key == 7)) %} + {{ server }} host {{ hostlist.ip }} key {{ hostlist.key }} {{ hostlist.key_string }} + {% elif (hostlist.key is defined and hostlist.key) %} + {{ server }} host {{ hostlist.ip }} key {{ hostlist.key }} + {% else %} + {{ server }} host {{ hostlist.ip }} + {% endif %} + {% endif %} + {% endif %} + {% endfor %} + {% endif %} + {% if groupitem.vrf is defined and groupitem.vrf %} + {% if groupitem.vrf.vrf_name is defined and groupitem.vrf.vrf_name %} + {% if groupitem.vrf.state is defined and groupitem.vrf.state == "absent" %} + no {{ server }} vrf {{ groupitem.vrf.vrf_name }} + {% else %} + {% if groupitem.vrf.source_intf is defined and groupitem.vrf.source_intf %} + {{ server }} vrf {{ groupitem.vrf.vrf_name }} source-interface {{ groupitem.vrf.source_intf }} + {% else %} + {{ server }} vrf {{ groupitem.vrf.vrf_name }} + {% endif %} + {% endif %} + {% endif %} + {% endif %} + {% endif %} + {% endif %} + {% endfor %} + {% endif %} + {% endif %} + {% endif %} +{% endfor %} + + {% if os9_aaa.aaa_accounting is defined and os9_aaa.aaa_accounting %} + {% set aaa_accounting = os9_aaa.aaa_accounting %} + {% if aaa_accounting.suppress is defined %} + {% if aaa_accounting.suppress %} +aaa accounting suppress null-username + {% else %} +no aaa accounting suppress null-username + {% endif %} + {% endif %} + {% if aaa_accounting.dot1x is defined %} + {% if aaa_accounting.dot1x == "none" %} +aaa accounting dot1x default none + {% elif aaa_accounting.dotx %} +aaa accounting dot1x default {{ aaa_accounting.dot1x }} tacacs+ + {% else %} +no aaa accounting dotx default + {% endif %} + {% endif %} + {% if aaa_accounting.rest is defined %} + {% if aaa_accounting.rest == "none" %} +aaa accounting rest default none + {% elif aaa_accounting.rest %} +aaa accounting rest default {{ aaa_accounting.rest }} tacacs+ + {% else %} +no aaa accounting rest default + {% endif %} + {% endif %} + {% if aaa_accounting.exec is defined and aaa_accounting.exec %} + {% for command in aaa_accounting.exec %} + {% if command.accounting_list_name is defined and command.accounting_list_name %} + {% if command.state is defined and command.state == "absent" %} +no aaa accounting exec {{ command.accounting_list_name }} + {% else %} + {% if command.record_option is defined and command.record_option %} +aaa accounting exec {{ command.accounting_list_name }} {{ command.record_option }} tacacs+ + {% elif command.no_accounting is defined and command.no_accounting %} +aaa accounting exec {{ command.accounting_list_name }} none + {% endif %} + {% endif %} + {% endif %} + {% endfor %} + {% endif %} + {% if aaa_accounting.commands is defined and aaa_accounting.commands %} + {% for command in aaa_accounting.commands %} + {% if command.enable_level is defined and command.enable_level %} + {% if command.accounting_list_name is defined and command.accounting_list_name %} + {% if command.state is defined and command.state == "absent" %} +no aaa accounting commands {{ command.enable_level }} {{ command.accounting_list_name }} + {% else %} + {% if command.record_option is defined and command.record_option %} +aaa accounting commands {{ command.enable_level }} {{ command.accounting_list_name }} {{ command.record_option }} tacacs+ + {% elif command.no_accounting is defined and command.no_accounting %} +aaa accounting commands {{ command.enable_level }} {{ command.accounting_list_name }} none + {% endif %} + {% endif %} + {% endif %} + {% elif command.role_name is defined and command.role_name %} + {% if command.accounting_list_name is defined and command.accounting_list_name %} + {% if command.state is defined and command.state == "absent" %} +no aaa accounting commands role {{ command.role_name }} {{ command.accounting_list_name }} + {% else %} + {% if command.record_option is defined and command.record_option %} +aaa accounting commands role {{ command.role_name }} {{ command.accounting_list_name }} {{ command.record_option }} tacacs+ + {% elif command.no_accounting is defined and command.no_accounting %} +aaa accounting commands role {{ command.role_name }} {{ command.accounting_list_name }} none + {% endif %} + {% endif %} + {% endif %} + {% endif %} + {% endfor %} + {% endif %} + {% endif %} + {% if os9_aaa.aaa_authorization is defined and os9_aaa.aaa_authorization %} + {% set aaa_authorization = os9_aaa.aaa_authorization %} + {% if aaa_authorization.config_commands is defined %} + {% if aaa_authorization.config_commands %} +aaa authorization config-commands + {% else %} +no aaa authorization config-commands + {% endif %} + {% endif %} + {% if aaa_authorization.role_only is defined %} + {% if aaa_authorization.role_only %} +aaa authorization role-only + {% else %} +no aaa authorization role-only + {% endif %} + {% endif %} + {% if aaa_authorization.exec is defined and aaa_authorization.exec %} + {% for command in aaa_authorization.exec %} + {% if command.authorization_list_name is defined and command.authorization_list_name %} + {% if command.state is defined and command.state == "absent" %} +no aaa authorization exec {{ command.authorization_list_name }} + {% else %} + {% if command.use_data is defined and command.use_data %} + {% if command.authorization_method is defined and command.authorization_method %} +aaa authorization exec {{ command.authorization_list_name }} {{ command.use_data }} {{ command.authorization_method }} + {% else %} +aaa authorization exec {{ command.authorization_list_name }} {{ command.use_data }} + {% endif %} + {% else %} + {% if command.authorization_method is defined and command.authorization_method %} +aaa authorization exec {{ command.authorization_list_name }} {{ command.authorization_method }} + {% endif %} + {% endif %} + {% endif %} + {% endif %} + {% endfor %} + {% endif %} + {% if aaa_authorization.commands is defined and aaa_authorization.commands %} + {% for command in aaa_authorization.commands %} + {% if command.enable_level is defined and command.enable_level %} + {% if command.authorization_list_name is defined and command.authorization_list_name %} + {% if command.state is defined and command.state == "absent" %} +no aaa authorization commands {{ command.enable_level }} {{ command.authorization_list_name }} + {% else %} + {% if command.use_data is defined and command.use_data %} + {% if command.authorization_method is defined and command.authorization_method %} +aaa authorization commands {{ command.enable_level }} {{ command.authorization_list_name }} {{ command.use_data }} {{ command.authorization_method }} + {% else %} +aaa authorization commands {{ command.enable_level }} {{ command.authorization_list_name }} {{ command.use_data }} + {% endif %} + {% else %} + {% if command.authorization_method is defined and command.authorization_method %} +aaa authorization commands {{ command.enable_level }} {{ command.authorization_list_name }} {{ command.authorization_method }} + {% endif %} + {% endif %} + {% endif %} + {% endif %} + {% elif command.role_name is defined and command.role_name %} + {% if command.authorization_list_name is defined and command.authorization_list_name %} + {% if command.state is defined and command.state == "absent" %} +no aaa authorization commands role {{ command.role_name }} {{ command.authorization_list_name }} + {% else %} + {% if command.use_data is defined and command.use_data %} + {% if command.authorization_method is defined and command.authorization_method %} +aaa authorization commands role {{ command.role_name }} {{ command.authorization_list_name }} {{ command.use_data }} {{ command.authorization_method }} + {% else %} +aaa authorization commands role {{ command.role_name }} {{ command.authorization_list_name }} {{ command.use_data }} + {% endif %} + {% else %} + {% if command.authorization_method is defined and command.authorization_method %} +aaa authorization commands role {{ command.role_name }} {{ command.authorization_list_name }} {{ command.authorization_method }} + {% endif %} + {% endif %} + {% endif %} + {% endif %} + {% endif %} + {% endfor %} + {% endif %} + {% endif %} + + {% if os9_aaa.aaa_radius is defined and os9_aaa.aaa_radius %} + {% if os9_aaa.aaa_radius.group is defined %} + {% if os9_aaa.aaa_radius.group %} +aaa radius group {{ os9_aaa.aaa_radius.group }} + {% else %} +no aaa radius group + {% endif %} + {% endif %} + {% if os9_aaa.aaa_radius.auth_method is defined %} + {% if os9_aaa.aaa_radius.auth_method %} +aaa radius auth-method {{ os9_aaa.aaa_radius.auth_method }} + {% else %} +no aaa radius auth-method + {% endif %} + {% endif %} + {% endif %} + {% if os9_aaa.aaa_tacacs is defined and os9_aaa.aaa_tacacs %} + {% if os9_aaa.aaa_tacacs.group is defined %} + {% if os9_aaa.aaa_tacacs.group %} +aaa tacacs group {{ os9_aaa.aaa_tacacs.group }} + {% else %} +no aaa tacacs group + {% endif %} + {% endif %} + {% endif %} + + {% if os9_aaa.aaa_authentication is defined and os9_aaa.aaa_authentication %} + {% if os9_aaa.aaa_authentication.auth_list is defined and os9_aaa.aaa_authentication.auth_list %} + {% for auth_list in os9_aaa.aaa_authentication.auth_list %} + {% if auth_list.login_or_enable is defined and auth_list.login_or_enable %} + {% if auth_list.name is defined and auth_list.name %} + {% if auth_list.state is defined and auth_list.state == "absent" %} +no aaa authentication {{ auth_list.login_or_enable }} {{ auth_list.name }} + {% else %} + {% if auth_list.server is defined and auth_list.server %} + {% if auth_list.use_password is defined and auth_list.use_password %} +aaa authentication {{ auth_list.login_or_enable }} {{ auth_list.name }} {{ auth_list.server }} {{ auth_list.use_password }} + {% else %} +aaa authentication {{ auth_list.login_or_enable }} {{ auth_list.name }} {{ auth_list.server }} + {% endif %} + {% else %} + {% if auth_list.use_password is defined and auth_list.use_password %} +aaa authentication {{ auth_list.login_or_enable }} {{ auth_list.name }} {{ auth_list.use_password }} + {% endif %} + {% endif %} + {% endif %} + {% endif %} + {% endif %} + {% endfor %} + {% endif %} + {% endif %} + + {% if os9_aaa.line_terminal is defined and os9_aaa.line_terminal %} + {% for terminal in os9_aaa.line_terminal.keys() %} + {% set terminal_vars = os9_aaa.line_terminal[terminal] %} +line {{ terminal }} + {% if terminal_vars.authorization is defined and terminal_vars.authorization %} + {% if terminal_vars.authorization.commands is defined and terminal_vars.authorization.commands %} + {% for commands in terminal_vars.authorization.commands %} + {% if commands.enable_level is defined and commands.enable_level %} + {% if commands.state is defined and commands.state == "absent" %} + no authorization commands {{ commands.enable_level }} + {% else %} + {% if commands.authorization_list_name is defined and commands.authorization_list_name %} + authorization commands {{ commands.enable_level }} {{ commands.authorization_list_name }} + {% endif %} + {% endif %} + {% elif commands.role_name is defined and commands.role_name %} + {% if commands.state is defined and commands.state == "absent" %} + no authorization commands role {{ commands.role_name }} + {% else %} + {% if commands.authorization_list_name is defined and commands.authorization_list_name %} + authorization commands role {{ commands.role_name }} {{ commands.authorization_list_name }} + {% endif %} + {% endif %} + {% endif %} + {% endfor %} + {% endif %} + {% if terminal_vars.authorization.exec is defined and terminal_vars.authorization.exec %} + {% set exec = terminal_vars.authorization.exec %} + {% if exec.state is defined and exec.state == "absent" %} + no authorization exec + {% else %} + {% if exec.authorization_list_name is defined and exec.authorization_list_name %} + authorization exec {{ exec.authorization_list_name }} + {% endif %} + {% endif %} + {% endif %} + {% endif %} + {% if terminal_vars.accounting is defined and terminal_vars.accounting %} + {% if terminal_vars.accounting.commands is defined and terminal_vars.accounting.commands %} + {% for commands in terminal_vars.accounting.commands %} + {% if commands.enable_level is defined and commands.enable_level %} + {% if commands.state is defined and commands.state == "absent" %} + no accounting commands {{ commands.enable_level }} + {% else %} + {% if commands.accounting_list_name is defined and commands.accounting_list_name %} + accounting commands {{ commands.enable_level }} {{ commands.accounting_list_name }} + {% endif %} + {% endif %} + {% elif commands.role_name is defined and commands.role_name %} + {% if commands.state is defined and commands.state == "absent" %} + no accounting commands role {{ commands.role_name }} + {% else %} + {% if commands.accounting_list_name is defined and commands.accounting_list_name %} + accounting commands role {{ commands.role_name }} {{ commands.accounting_list_name }} + {% endif %} + {% endif %} + {% endif %} + {% endfor %} + {% endif %} + {% if terminal_vars.accounting.exec is defined and terminal_vars.accounting.exec %} + {% set exec = terminal_vars.accounting.exec %} + {% if exec.state is defined and exec.state == "absent" %} + no accounting exec + {% else %} + {% if exec.accounting_list_name is defined and exec.accounting_list_name %} + authorization exec {{ exec.accounting_list_name }} + {% endif %} + {% endif %} + {% endif %} + {% endif %} + {% if terminal_vars.authentication is defined and terminal_vars.authentication %} + {% if terminal_vars.authentication.enable is defined %} + {% if terminal_vars.authentication.enable %} + enable authentication {{ terminal_vars.authentication.enable }} + {% else %} + no enable authentication + {% endif %} + {% endif %} + {% if terminal_vars.authentication.login is defined %} + {% if terminal_vars.authentication.login %} + login authentication {{ terminal_vars.authentication.login }} + {% else %} + no login authentication + {% endif %} + {% endif %} + {% endif %} + {% endfor %} + {% endif %} +{% endif %}
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_aaa/tests/inventory.yaml b/ansible_collections/dellemc/os9/roles/os9_aaa/tests/inventory.yaml new file mode 100644 index 000000000..5fd33c945 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_aaa/tests/inventory.yaml @@ -0,0 +1,20 @@ +spine1 ansible_host=100.94.210.44 +spine2 ansible_host=10.11.182.26 +leaf1 ansible_host=10.11.182.27 +leaf2 ansible_host=10.11.182.28 +leaf3 ansible_host=10.11.182.29 +leaf4 ansible_host=10.11.182.30 + +[spine] +spine1 +spine2 + +[leaf] +leaf1 +leaf2 +leaf3 +leaf4 + +[datacenter:children] +spine +leaf diff --git a/ansible_collections/dellemc/os9/roles/os9_aaa/tests/main.os6.yaml b/ansible_collections/dellemc/os9/roles/os9_aaa/tests/main.os6.yaml new file mode 100644 index 000000000..b4e871b81 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_aaa/tests/main.os6.yaml @@ -0,0 +1,133 @@ +--- +# vars file for dellemc.os9.os9_aaa, +# below gives a sample configuration +# Sample variables for OS9 device +os9_aaa: + radius_server: + key: radius + retransmit: 5 + timeout: 40 + deadtime: 2300 + group: + - name: RADIUS + host: + - ip: 2001:4898:f0:f09b::1002 + key: 0 + key_string: aaaa + retransmit: 5 + auth_port: 3 + timeout: 2 + state: present + vrf: + vrf_name: test + source_intf: fortyGigE 1/2 + state: absent + state: present + host: + - ip: 10.1.1.1 + key: 0 + key_string: aaa + retransmit: 6 + auth_port: 3 + timeout: 2 + state: present + tacacs_server: + key: 7 + key_string: 9ea8ec421c2e2e5bec757f44205015f6d81e83a4f0aa52fa + group: + - name: TACACS + host: + - ip: 2001:4898:f0:f09b::1000 + key: 0 + key_string: aaa + auth_port: 3 + timeout: 2 + state: present + vrf: + vrf_name: tes + source_intf: fortyGigE 1/3 + state: present + state: present + host: + - ip: 2001:4898:f0:f09b::1000 + key: 0 + key_string: aaa + auth_port: 3 + timeout: 2 + state: present + aaa_accounting: + commands: + - enable_level: 2 + accounting_list_name: aa + record_option: start-stop + state: present + - role_name: netadmin + accounting_list_name: aa + no_accounting: none + suppress: True + exec: + - accounting_list_name: aaa + no_accounting: true + state: present + dot1x: none + rest: none + aaa_authorization: + commands: + - enable_level: 2 + authorization_list_name: aa + use_data: local + state: present + - role_name: netadmin + authorization_list_name: aa + authorization_method: none + use_data: local + config_commands: True + role_only: + exec: + - authorization_list_name: aaa + authorization_method: if-authenticated + use_data: local + state: present + line_terminal: + vty 0: + authorization: + commands: + - enable_level: 2 + authorization_list_name: aa + state: present + - role_name: netadmin + authorization_list_name: aa + state: present + exec: + - authorization_list_name: aa + state: present + accounting: + commands: + - enable_level: 2 + accounting_list_name: aa + state: present + - role_name: netadmin + accounting_list_name: aa + state: absent + exec: + accounting_list_name: aa + state: present + authentication: + enable: + login: console + aaa_radius: + group: RADIUS + auth_method: pap + aaa_tacacs: + group: TACACS + aaa_authentication: + auth_list: + - name: default + login_or_enable: login + server: tacacs+ + use_password: local + state: present + - name: console + server: radius + login_or_enable: login + use_password: local
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_aaa/tests/test.yaml b/ansible_collections/dellemc/os9/roles/os9_aaa/tests/test.yaml new file mode 100644 index 000000000..e99880ca2 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_aaa/tests/test.yaml @@ -0,0 +1,5 @@ +--- +- hosts: datacenter + connection: network_cli + roles: + - dellemc.os9.os9_aaa
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_aaa/vars/main.yml b/ansible_collections/dellemc/os9/roles/os9_aaa/vars/main.yml new file mode 100644 index 000000000..e198e3ed6 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_aaa/vars/main.yml @@ -0,0 +1,2 @@ +--- +# vars file for dellemc.os9.os9_aaa
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_acl/LICENSE b/ansible_collections/dellemc/os9/roles/os9_acl/LICENSE new file mode 100644 index 000000000..2c9b8e1fd --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_acl/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/> + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (c) 2020, Dell Inc. All rights reserved. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <https://www.gnu.org/licenses/>. + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + <program> Copyright (c) 2020, Dell Inc. All rights reserved. + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +<https://www.gnu.org/licenses/>. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +<https://www.gnu.org/licenses/why-not-lgpl.html>. diff --git a/ansible_collections/dellemc/os9/roles/os9_acl/README.md b/ansible_collections/dellemc/os9/roles/os9_acl/README.md new file mode 100644 index 000000000..52ef4c552 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_acl/README.md @@ -0,0 +1,134 @@ +ACL role +======== + +This role facilitates the configuration of an access-control list (ACL). It supports the configuration of different types of ACLs (standard and extended) for both IPv4 and IPv6, and assigns the access-class to the line terminals. This role is abstracted for Dell EMC PowerSwitch platforms running Dell EMC OS9. + +The ACL role requires an SSH connection for connectivity to a Dell EMC OS9 device. You can use any of the built-in OS connection variables. + + +Role variables +-------------- + +- Role is abstracted using the `ansible_network_os` variable that can take `dellemc.os9.os9` as the value +- If `os9_cfg_generate` is set to true, the variable generates the role configuration commands in a file +- Any role variable with a corresponding state variable set to absent negates the configuration of that variable +- Setting an empty value for any variable negates the corresponding configuration +- Variables and values are case-sensitive + +**os9_acl keys** + +| Key | Type | Description | Support | +|------------|---------------------------|---------------------------------------------------------|-----------------------| +| ``type`` | string (required): ipv4, ipv6, mac | Configures the L3 (IPv4/IPv6) or L2 (MAC) access-control list | os9 | +| ``name`` | string (required) | Configures the name of the access-control list | os9 | +| ``description`` | string | Configures the description about the access-control list | os9 | +| ``remark`` | list | Configures the ACL remark (see ``remark.*``) | os9 | +| ``remark.number`` | integer (required) | Configures the remark sequence number | os9 | +| ``remark.description`` | string | Configures the remark description | os9 | +| ``remark.state`` | string: absent,present\* | Deletes the configured remark for an ACL entry if set to absent | os9 | +| ``extended`` | boolean: true,false | Configures an extended ACL type if set to true; configures a standard ACL if set to false | os9 | +| ``entries`` | list | Configures ACL rules (see ``seqlist.*``) | os9 | +| ``entries.number`` | integer (required) | Specifies the sequence number of the ACL rule | os9 | +| ``entries.permit`` | boolean (required): true,false | Specifies the rule to permit packets if set to true; specifies to reject packets if set to false | os9 | +| ``entries.protocol`` | string (required) | Specifies the type of protocol or the protocol number to filter | os9 | +| ``entries.source`` | string (required) | Specifies the source address to match in the packets | os9 | +| ``entries.src_condition`` | string | Specifies the condition to filter packets from the source address; ignored if MAC | os9 | +| ``entries.destination`` | string (required) | Specifies the destination address to match in the packets | os9 | +| ``entries.dest_condition`` | string | Specifies the condition to filter packets to the destination address | os9 | +| ``entries.other_options`` | string | Specifies the other options applied on packets (count, log, order, monitor, and so on) | os9 | +| ``entries.state`` | string: absent,present\* | Deletes the rule from the ACL if set to absent | os9 | +| ``stage_ingress`` | list | Configures ingress ACL to the interface (see ``stage_ingress.*``) | os9 | +| ``stage_ingress.name`` | string (required) | Configures the ingress ACL filter to the interface with this interface name | os9 | +| ``stage_ingress.state`` | string: absent,present\* | Deletes the configured ACL from the interface if set to absent | os9 | +| ``stage_ingress.seq_number`` | integer | Configure the sequence number (greater than 0) to rank precedence for this interface and direction | +| ``stage_egress`` | list | Configures egress ACL to the interface (see ``stage_egress.*``) | os9 | +| ``stage_egress.name`` | string (required) | Configures the egress ACL filter to the interface with this interface name | os9 | +| ``stage_egress.state`` | string: absent,present\* | Deletes the configured egress ACL from the interface if set to absent | os9 | +| ``lineterminal`` | list | Configures the terminal to apply the ACL (see ``lineterminal.*``) | os9 | +| ``lineterminal.line`` | string (required) | Configures access-class on the line terminal | os9 | +| ``lineterminal.state`` | string: absent,present\* | Deletes the access-class from line terminal if set to absent | os9 | +| ``state`` | string: absent,present\* | Deletes the ACL if set to absent | os9 | + +> **NOTE**: Asterisk (\*) denotes the default value if none is specified. + +Connection variables +-------------------- + +Ansible Dell EMC network roles require connection information to establish communication with the nodes in inventory. This information can exist in the Ansible *group_vars* or *host_vars* directories or inventory, or in the playbook itself. + +| Key | Required | Choices | Description | +|-------------|----------|------------|-------------------------------------------------------| +| ``ansible_host`` | yes | | Specifies the hostname or address for connecting to the remote device over the specified transport | +| ``ansible_port`` | no | | Specifies the port used to build the connection to the remote device; if value is unspecified, the `ANSIBLE_REMOTE_PORT` option is used; it defaults to 22 | +| ``ansible_ssh_user`` | no | | Specifies the username that authenticates the CLI login for the connection to the remote device; if value is unspecified, the `ANSIBLE_REMOTE_USER` environment variable value is used | +| ``ansible_ssh_pass`` | no | | Specifies the password that authenticates the connection to the remote device. | +| ``ansible_become`` | no | yes, no\* | Instructs the module to enter privileged mode on the remote device before sending any commands; if value is unspecified, the `ANSIBLE_BECOME` environment variable value is used, and the device attempts to execute all commands in non-privileged mode | +| ``ansible_become_method`` | no | enable, sudo\* | Instructs the module to allow the become method to be specified for handling privilege escalation; if value is unspecified, the `ANSIBLE_BECOME_METHOD` environment variable value is used | +| ``ansible_become_pass`` | no | | Specifies the password to use if required to enter privileged mode on the remote device; if ``ansible_become`` is set to no this key is not applicable | +| ``ansible_network_os`` | yes /os9, null\* | Loads the correct terminal and cliconf plugins to communicate with the remote device | + +> **NOTE**: Asterisk (_*_) denotes the default value if none is specified. + +Example playbook +---------------- + +This example uses the *os9_acl* role to configure different types of ACLs (standard and extended) for both IPv4 and IPv6 and assigns the access-class to the line terminals. The example creates a *hosts* file with the switch details and corresponding variables. The hosts file should define the `ansible_network_os` variable with the corresponding Dell EMC OS9 name. + +When `os9_cfg_generate` is set to true, it generates the configuration commands as a .part file in the *build_dir* path. By default it is set to false. It writes a simple playbook that only references the *os9_acl* role. + +**Sample hosts file** + + leaf1 ansible_host= <ip_address> + +**Sample host_vars/leaf1** + + hostname: leaf1 + ansible_become: yes + ansible_become_method: xxxxx + ansible_become_pass: xxxxx + ansible_ssh_user: xxxxx + ansible_ssh_pass: xxxxx + ansible_network_os: dellemc.os9.os9 + build_dir: ../temp/os9 + os9_acl: + - type: ipv4 + name: ssh-only + description: ipv4acl + extended: true + remark: + - number: 5 + description: "ipv4remark" + entries: + - number: 5 + permit: true + protocol: tcp + source: any + src_condition: ack + destination: any + dest_condition: eq 22 + other_options: count + state: present + stage_ingress: + - name: fortyGigE 1/28 + state: present + stage_egress: + - name: fortyGigE 1/28 + state: present + lineterminal: + - line: vty 1 + state: present + - line: vty 2 + state: absent + state: present + +**Simple playbook to setup system — leaf.yaml** + + - hosts: leaf1 + roles: + - dellemc.os9.os9_acl + +**Run** + + ansible-playbook -i hosts leaf.yaml + +(c) 2017-2020 Dell Inc. or its subsidiaries. All rights reserved. diff --git a/ansible_collections/dellemc/os9/roles/os9_acl/defaults/main.yml b/ansible_collections/dellemc/os9/roles/os9_acl/defaults/main.yml new file mode 100644 index 000000000..7c196010c --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_acl/defaults/main.yml @@ -0,0 +1,2 @@ +--- +# defaults file for dellemc.os9.os9_acl
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_acl/handlers/main.yml b/ansible_collections/dellemc/os9/roles/os9_acl/handlers/main.yml new file mode 100644 index 000000000..ad771c4fa --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_acl/handlers/main.yml @@ -0,0 +1,2 @@ +--- +# handlers file for dellemc.os9.os9_aaa
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_acl/meta/main.yml b/ansible_collections/dellemc/os9/roles/os9_acl/meta/main.yml new file mode 100644 index 000000000..dd418f870 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_acl/meta/main.yml @@ -0,0 +1,17 @@ +# Copyright (c) 2017-2020 Dell Inc. or its subsidiaries. All Rights Reserved. +--- +galaxy_info: + author: Dell EMC Networking Engineering + description: The os9_acl role facilitates the configuration of access control list (ACL) attributes in devices running Dell EMC Networking Operating Systems. + license: GPLv3 + min_ansible_version: 2.9.6 + + platforms: + - name: os9 + + galaxy_tags: + - networking + - dell + - emc + - dellemc + - os9 diff --git a/ansible_collections/dellemc/os9/roles/os9_acl/tasks/main.yml b/ansible_collections/dellemc/os9/roles/os9_acl/tasks/main.yml new file mode 100644 index 000000000..53612e5ec --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_acl/tasks/main.yml @@ -0,0 +1,16 @@ +--- +#tasks file for os9 + - name: "Generating ACL configuration for os9" + template: + src: os9_acl.j2 + dest: "{{ build_dir }}/acl9_{{ hostname }}.conf.part" + when: (ansible_network_os is defined and ansible_network_os == "dellemc.os9.os9") and ((os9_cfg_generate | default('False')) | bool) +# notify: save config os9 + register: generate_output + + - name: "Provisioning ACL configuration for os9" + dellemc.os9.os9_config: + src: os9_acl.j2 + when: (ansible_network_os is defined and ansible_network_os == "dellemc.os9.os9") +# notify: save config os9 + register: output diff --git a/ansible_collections/dellemc/os9/roles/os9_acl/templates/os9_acl.j2 b/ansible_collections/dellemc/os9/roles/os9_acl/templates/os9_acl.j2 new file mode 100644 index 000000000..b47a1c2c9 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_acl/templates/os9_acl.j2 @@ -0,0 +1,277 @@ +#jinja2: trim_blocks: True,lstrip_blocks: True +{#################################### + +Purpose: +Configure ACL commands for os9 devices + +os9_acl: + - name: ssh-only + type: ipv4 + description: acl + extended: true + remark: + - number: 1 + description: helloworld + state: present + entries: + - number: 10 + permit: true + protocol: tcp + source: any + destination: any + src_condition: eq 22 + dest_condition: ack + other_options: count + state: present + stage_ingress: + - name: fortyGigE 1/8 + state: present + - name: fortyGigE 1/9 + state: present + stage_egress: + - name: fortyGigE 1/19 + state: present + lineterminal: + - line: vty 0 + state: present + - line: vty 1 + state: present + state: present + - name: ipv6-ssh-only + type: ipv6 + entries: + - number: 10 + permit: true + protocol: ipv6 + source: 2001:4898::/32 + destination: any + - number: 20 + permit: true + protocol: tcp + source: any + src_condition: ack + destination: any + - number: 40 + permit: true + protocol: tcp + source: any + destination: any + state: present + lineterminal: + - line: vty 0 + state: present + - line: vty 1 + state: present +#####################################} +{% if os9_acl is defined and os9_acl %} + {% for val in os9_acl + %} + {% if val.name is defined and val.name %} + {% if val.state is defined and val.state == "absent" %} + {% if val.type is defined and val.type == "ipv4" %} + {% if val.extended is defined and val.extended %} +no ip access-list extended {{ val.name }} + {% else %} +no ip access-list standard {{ val.name }} + {% endif %} + {% elif val.type is defined and val.type == "ipv6" %} +no ipv6 access-list {{ val.name }} + {% elif val.type is defined and val.type == "mac" %} + {% if val.extended is defined and val.extended %} +no mac access-list extended {{ val.name }} + {% else %} +no mac access-list standard {{ val.name }} + {% endif %} + {% endif %} + {% else %} + {% if val.type is defined and val.type == "ipv4" %} + {% if val.extended is defined and val.extended %} +ip access-list extended {{ val.name }} + {% else %} +ip access-list standard {{ val.name }} + {% endif %} + {% elif val.type is defined and val.type == "ipv6" %} +ipv6 access-list {{ val.name }} + {% elif val.type is defined and val.type == "mac" %} + {% if val.extended is defined and val.extended %} +mac access-list extended {{ val.name }} + {% else %} +mac access-list standard {{ val.name }} + {% endif %} + {% endif %} + {% if val.description is defined %} + {% if val.description %} + description {{ val.description }} + {% else %} + no description a + {% endif %} + {% endif %} + {% if val.remark is defined and val.remark %} + {% for remark in val.remark %} + {% if remark.number is defined and remark.number %} + {% if remark.state is defined and remark.state == "absent" %} + no remark {{ remark.number }} + {% else %} + {% if remark.description is defined and remark.description %} + remark {{ remark.number }} {{ remark.description }} + {% endif %} + {% endif %} + {% endif %} + {% endfor %} + {% endif %} + {% if val.entries is defined and val.entries %} + {% for rule in val.entries %} + {% if rule.number is defined and rule.number %} + {% if rule.state is defined and rule.state == "absent" %} + no seq {{ rule.number }} + {% else %} + {% if rule.permit is defined %} + {% if rule.permit %} + {% set is_permit = "permit" %} + {% else %} + {% set is_permit = "deny" %} + {% endif %} + {% if val.type is defined and val.type == "mac" %} + {% if rule.source is defined and rule.source %} + {% if rule.destination is defined and rule.destination %} + {% if rule.other_options is defined and rule.other_options %} + {% if rule.other_options == "log" %} + {% set other_options = rule.other_options + ' threshold-in-msgs 10 interval 5' %} + {% else %} + {% set other_options = rule.other_options %} + {% endif %} + seq {{ rule.number }} {{ is_permit }} {{ rule.source }} {{ rule.destination }} {{ other_options }} + {% else %} + seq {{ rule.number }} {{ is_permit }} {{ rule.source }} {{ rule.destination }} + {% endif %} + {% endif %} + {% endif %} + {% else %} + {% if rule.protocol is defined and rule.protocol %} + {% if rule.source is defined and rule.source %} + {% if rule.destination is defined and rule.destination %} + {% if rule.src_condition is defined and rule.src_condition %} + {% if rule.dest_condition is defined and rule.dest_condition %} + {% if rule.other_options is defined and rule.other_options %} + {% if rule.other_options == "log" %} + {% set other_options = rule.other_options + ' threshold-in-msgs 10 interval 5' %} + {% else %} + {% set other_options = rule.other_options %} + {% endif %} + seq {{ rule.number }} {{ is_permit }} {{ rule.protocol }} {{ rule.source }} {{ rule.src_condition }} {{ rule.destination }} {{ rule.dest_condition }} {{ other_options }} + {% else %} + seq {{ rule.number }} {{ is_permit }} {{ rule.protocol }} {{ rule.source }} {{ rule.src_condition }} {{ rule.destination }} {{ rule.dest_condition }} + {% endif %} + {% else %} + {% if rule.other_options is defined and rule.other_options %} + {% if rule.other_options == "log" %} + {% set other_options = rule.other_options + ' threshold-in-msgs 10 interval 5' %} + {% else %} + {% set other_options = rule.other_options %} + {% endif %} + seq {{ rule.number }} {{ is_permit }} {{ rule.protocol }} {{ rule.source }} {{ rule.src_condition }} {{ rule.destination }} {{ other_options }} + {% else %} + seq {{ rule.number }} {{ is_permit }} {{ rule.protocol }} {{ rule.source }} {{ rule.src_condition }} {{ rule.destination }} + {% endif %} + {% endif %} + {% else %} + {% if rule.dest_condition is defined and rule.dest_condition %} + {% if rule.other_options is defined and rule.other_options %} + {% if rule.other_options == "log" %} + {% set other_options = rule.other_options + ' threshold-in-msgs 10 interval 5' %} + {% else %} + {% set other_options = rule.other_options %} + {% endif %} + seq {{ rule.number }} {{ is_permit }} {{ rule.protocol }} {{ rule.source }} {{ rule.destination }} {{ rule.dest_condition }} {{ other_options }} + {% else %} + seq {{ rule.number }} {{ is_permit }} {{ rule.protocol }} {{ rule.source }} {{ rule.destination }} {{ rule.dest_condition }} + {% endif %} + {% else %} + {% if rule.other_options is defined and rule.other_options %} + {% if rule.other_options == "log" %} + {% set other_options = rule.other_options + ' threshold-in-msgs 10 interval 5' %} + {% else %} + {% set other_options = rule.other_options %} + {% endif %} + seq {{ rule.number }} {{ is_permit }} {{ rule.protocol }} {{ rule.source }} {{ rule.destination }} {{ other_options }} + {% else %} + seq {{ rule.number }} {{ is_permit }} {{ rule.protocol }} {{ rule.source }} {{ rule.destination }} + {% endif %} + {% endif %} + {% endif %} + {% endif %} + {% endif %} + {% endif %} + {% endif %} + {% endif %} + {% endif %} + {% endif %} + {% endfor %} + {% endif %} + + {% if val.lineterminal is defined and val.lineterminal %} + {% if val.type is defined and not val.type == "mac" %} + {% for vty in val.lineterminal %} + {% if vty.line is defined and vty.line %} +line {{ vty.line }} + {% if vty.state is defined and vty.state == "absent" %} + no access-class {{ val.name }} {{ val.type }} + {% else %} + access-class {{ val.name }} {{ val.type }} + {% endif %} + {% endif %} + {% endfor %} + {% endif %} + {% endif %} + + {% if val.stage_ingress is defined and val.stage_ingress %} + {% for intf in val.stage_ingress %} + {% if intf.state is defined and intf.state == "absent" %} + {% if intf.name is defined and intf.name %} +interface {{ intf.name }} + {% if val.type is defined and val.type == "mac" %} + no mac access-group {{ val.name }} in + {% else %} + no ip access-group {{ val.name }} in + {% endif %} + {% endif %} + {% else %} + {% if intf.name is defined and intf.name %} +interface {{ intf.name }} + {% if val.type is defined and val.type == "mac" %} + mac access-group {{ val.name }} in + {% else %} + ip access-group {{ val.name }} in + {% endif %} + {% endif %} + {% endif %} + {% endfor %} + {% endif %} + + {% if val.stage_egress is defined and val.stage_egress %} + {% for intf in val.stage_egress %} + {% if intf.state is defined and intf.state == "absent" %} + {% if intf.name is defined and intf.name %} +interface {{ intf.name }} + {% if val.type is defined and val.type == "mac" %} + no mac access-group {{ val.name }} out + {% else %} + no ip access-group {{ val.name }} out + {% endif %} + {% endif %} + {% else %} + {% if intf.name is defined and intf.name %} +interface {{ intf.name }} + {% if val.type is defined and val.type == "mac" %} + mac access-group {{ val.name }} out + {% else %} + ip access-group {{ val.name }} out + {% endif %} + {% endif %} + {% endif %} + {% endfor %} + {% endif %} + {% endif %} + {% endif %} + {% endfor %} +{% endif %}
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_acl/tests/inventory.yaml b/ansible_collections/dellemc/os9/roles/os9_acl/tests/inventory.yaml new file mode 100644 index 000000000..5fd33c945 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_acl/tests/inventory.yaml @@ -0,0 +1,20 @@ +spine1 ansible_host=100.94.210.44 +spine2 ansible_host=10.11.182.26 +leaf1 ansible_host=10.11.182.27 +leaf2 ansible_host=10.11.182.28 +leaf3 ansible_host=10.11.182.29 +leaf4 ansible_host=10.11.182.30 + +[spine] +spine1 +spine2 + +[leaf] +leaf1 +leaf2 +leaf3 +leaf4 + +[datacenter:children] +spine +leaf diff --git a/ansible_collections/dellemc/os9/roles/os9_acl/tests/main.os9.yaml b/ansible_collections/dellemc/os9/roles/os9_acl/tests/main.os9.yaml new file mode 100644 index 000000000..9f083bb9c --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_acl/tests/main.os9.yaml @@ -0,0 +1,88 @@ +--- +# vars file for dellemc.os9.os9_acl, +# below gives a sample configuration +# Sample variables for OS9 device +os9_acl: + - name: ssh-only-mac + type: mac + description: macacl + extended: true + remark: + - number: 1 + description: mac + state: present + entries: + - number: 5 + permit: true + protocol: tcp + source: any + destination: any + dest_condition: eq 2 + other_options: count + state: present + - number: 6 + permit: false + protocol: tcp + source: bb:bb:bb:bb:bb:bb ff:ff:ff:ff:ff:ff + destination: any + dest_condition: log + state: present + stage_ingress: + - name: fortyGigE 1/28 + state: present + - name: fortyGigE 1/27 + state: present + stage_egress: + - name: fortyGigE 1/28 + state: present + lineterminal: + - line: vty 1 + state: present + - line: vty 2 + state: absent + - line: vty 3 + state: present + - name: ipv6-ssh-only + type: ipv6 + description: ipv6acl + remark: + - number: 1 + description: ipv6 + entries: + - number: 10 + permit: true + protocol: ipv6 + source: 2001:4898::/32 + destination: any + - number: 20 + permit: true + protocol: tcp + source: any + src_condition: eq 2 + destination: 2404:f801::/32 + - number: 30 + permit: true + protocol: tcp + source: any + destination: 2a01:110::/31 + dest_condition: ack + - number: 40 + permit: true + protocol: tcp + source: any + destination: any + stage_ingress: + - name: fortyGigE 1/26 + state: present + - name: fortyGigE 1/27 + state: present + stage_egress: + - name: fortyGigE 1/26 + state: present + lineterminal: + - line: vty 0 + state: absent + - line: vty 1 + - line: vty 2 + - line: vty 3 + state: present
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_acl/tests/test.yaml b/ansible_collections/dellemc/os9/roles/os9_acl/tests/test.yaml new file mode 100644 index 000000000..dbe56bcd9 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_acl/tests/test.yaml @@ -0,0 +1,5 @@ +--- +- hosts: datacenter + connection: network_cli + roles: + - dellemc.os9.os9_acl
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_acl/vars/main.yml b/ansible_collections/dellemc/os9/roles/os9_acl/vars/main.yml new file mode 100644 index 000000000..95a393630 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_acl/vars/main.yml @@ -0,0 +1,2 @@ +--- +# vars file for dellemc.os9.os9_acl
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_bgp/LICENSE b/ansible_collections/dellemc/os9/roles/os9_bgp/LICENSE new file mode 100644 index 000000000..2c9b8e1fd --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_bgp/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/> + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (c) 2020, Dell Inc. All rights reserved. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <https://www.gnu.org/licenses/>. + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + <program> Copyright (c) 2020, Dell Inc. All rights reserved. + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +<https://www.gnu.org/licenses/>. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +<https://www.gnu.org/licenses/why-not-lgpl.html>. diff --git a/ansible_collections/dellemc/os9/roles/os9_bgp/README.md b/ansible_collections/dellemc/os9/roles/os9_bgp/README.md new file mode 100644 index 000000000..c8f580bcd --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_bgp/README.md @@ -0,0 +1,224 @@ +BGP role +======== + +This role facilitates the configuration of border gateway protocol (BGP) attributes. It supports the configuration of router ID, networks, neighbors, and maximum path. This role is abstracted for Dell EMC PowerSwitch platforms running Dell EMC OS9. + +The BGP role requires an SSH connection for connectivity to a Dell EMC OS9 device. You can use any of the built-in OS connection variables. + + +Role variables +-------------- + +- Role is abstracted using the `ansible_network_os` variable that can take `dellemc.os9.os9` as the value +- If `os9_cfg_generate` is set to true, it generates the role configuration commands in a file +- Any role variable with a corresponding state variable setting to absent negates the configuration of that variable +- Setting an empty value for any variable negates the corresponding configuration +- Variables and values are case-sensitive + +**os9_bgp keys** + +| Key | Type | Description | Support | +|------------|---------------------------|---------------------------------------------------------|-----------------------| +| ``asn`` | string (required) | Configures the autonomous system (AS) number of the local BGP instance | os9 | +| ``router_id`` | string | Configures the IP address of the local BGP router instance | os9 | +| ``graceful_restart`` | boolean | Configures graceful restart capability | os9 | +| ``graceful_restart.state`` | string: absent,present\* | Removes graceful restart capability if set to absent | os9 | +| ``maxpath_ibgp`` | integer | Configures the maximum number of paths to forward packets through iBGP (1 to 64; default 1) | os9 | +| ``maxpath_ebgp`` | integer | Configures the maximum number of paths to forward packets through eBGP (1 to 64; default 1) | os9 | +| ``best_path`` | list | Configures the default best-path selection (see ``best_path.*``) | os9 | +| ``best_path.as_path`` | string (required): ignore,multipath-relax | Configures the AS path used for the best-path computation | os9 | +| ``best_path.as_path_state`` | string: absent,present\* | Deletes the AS path configuration if set to absent | os9 | +| ``best_path.ignore_router_id`` | boolean: true,false | Ignores the router identifier in best-path computation if set to true | os9 | +| ``best_path.med`` | list | Configures the MED attribute (see ``med.*``) | os9 | +| ``med.attribute`` | string (required): confed,missing-as-best | Configures the MED attribute used for the best-path computation | os9 | +| ``med.state`` | string: absent,present\* | Deletes the MED attribute if set to absent | os9, | +| ``ipv4_network`` | list | Configures an IPv4 BGP networks (see ``ipv4_network.*``) | , os9, | +| ``ipv4_network.address`` | string (required) | Configures the IPv4 address of the BGP network (A.B.C.D/E format) | os9 | +| ``ipv4_network.state`` | string: absent,present\* | Deletes an IPv4 BGP network if set to absent | os9 | +| ``ipv6_network`` | list | Configures an IPv6 BGP network (see ``ipv6_network.*``) | os9 | +| ``ipv6_network.address`` | string (required) | Configures the IPv6 address of the BGP network (2001:4898:5808:ffa2::1/126 format) | os9 | +| ``ipv6_network.state`` | string: absent,present\* | Deletes an IPv6 BGP network if set to absent | os9 | +| ``neighbor`` | list | Configures IPv4 BGP neighbors (see ``neighbor.*``) | os9 | +| ``neighbor.ip`` | string (required) | Configures the IPv4 address of the BGP neighbor (10.1.1.1) | os9 | +| ``neighbor.interface`` | string | Configures the BGP neighbor interface details | | +| ``neighbor.name`` | string (required) | Configures the BGP peer-group with this name; supported only when the neighbor is a peer group; mutually exclusive with *neighbor.ip* | os9 | +| ``neighbor.type`` | string (required): ipv4,ipv6,peergroup | Specifies the BGP neighbor type | os9 | +| ``neighbor.remote_asn`` | string (required) | Configures the remote AS number of the BGP neighbor | os9 | +| ``neighbor.remote_asn_state`` | string: absent,present\* | Deletes the remote AS number from the peer group if set to absent; supported only when *neighbor.type* is "peergroup" | os9 | +| ``neighbor.timer`` | string | Configures neighbor timers (<int> <int>); 5 10, where 5 is the keepalive interval and 10 is the holdtime | os9 | +| ``neighbor.default_originate`` | boolean: true, false\* | Configures default originate routes to the BGP neighbor | os9 | +| ``neighbor.peergroup`` | string | Configures neighbor to BGP peer-group (configured peer-group name) | os9 | +| ``neighbor.peergroup_state`` | string: absent,present\* | Deletes the IPv4 BGP neighbor from the peer-group if set to absent | os9 | +| ``neighbor.distribute_list`` | list | Configures the distribute list to filter networks from routing updates (see ``distribute_list.*``) | os9 | +| ``distribute_list.in`` | string | Configures the name of the prefix-list to filter incoming packets | os9 | +| ``distribute_list.in_state`` | string: absent,present\* | Deletes the filter at incoming packets if set to absent | os9 | +| ``distribute_list.out`` | string | Configures the name of the prefix-list to filter outgoing packets | os9 | +| ``distribute_list.out_state`` | string: absent,present\* | Deletes the filter at outgoing packets if set to absent | os9 | +| ``neighbor.admin`` | string: up,down | Configures the administrative state of the neighbor | os9 | +| ``neighbor.adv_interval`` | integer | Configures the advertisement interval of the neighbor | os9 | +| ``neighbor.fall_over`` | string: absent,present | Configures the session fall on peer-route loss | os9 | +| ``neighbor.sender_loop_detect`` | boolean: true,false | Enables/disables the sender-side loop detect for neighbors | os9 | +| ``neighbor.src_loopback`` | integer | Configures the source loopback interface for routing packets | os9 | +| ``neighbor.src_loopback_state`` | string: absent,present\* | Deletes the source for routing packets if set to absent | os9 | +| ``neighbor.ebgp_multihop`` | integer | Configures the maximum-hop count value allowed in eBGP neighbors that are not directly connected (default 255) | os9 | +| ``neighbor.passive`` | boolean: true,false\* | Configures the passive BGP peer group; supported only when neighbor is a peer-group | os9 | +| ``neighbor.subnet`` | string (required) | Configures the passive BGP neighbor to this subnet; required together with the *neighbor.passive* key for os9 devices | , os9, | +| ``neighbor.subnet_state`` | string: absent,present\* | Deletes the subnet range set for dynamic IPv4 BGP neighbor if set to absent | os9 | +| ``neighbor.limit`` | integer | Configures maximum dynamic peers count (key is required together with ``neighbor.subnet``) | | +| ``neighbor.bfd`` | boolean | Enables BDF for neighbor | | +| ``neighbor.state`` | string: absent,present\* | Deletes the IPv4 BGP neighbor if set to absent | os9 | +| ``redistribute`` | list | Configures the redistribute list to get information from other routing protocols (see ``redistribute.*``) | os9 | +| ``redistribute.route_type`` | string (required): static,connected | Configures the name of the routing protocol to redistribute | os9 | +| ``redistribute.route_map_name`` | string | Configures the route-map to redistribute | os9 | +| ``redistribute.route_map`` | string: absent,present\* | Deletes the route-map to redistribute if set to absent | os9 | +| ``redistribute.address_type`` | string (required): ipv4,ipv6 | Configures the address type of IPv4 or IPv6 routes | os9 | +| ``redistribute.state`` | string: absent,present\* | Deletes the redistribution information if set to absent | os9 | +| ``state`` | string: absent,present\* | Deletes the local router BGP instance if set to absent | os9 | + +> **NOTE**: Asterisk (\*) denotes the default value if none is specified. + +Connection variables +-------------------- + +Ansible Dell EMC network roles require connection information to establish communication with the nodes in your inventory. This information can exist in the Ansible *group_vars* or *host_vars* directories or inventory, or in the playbook itself. + +| Key | Required | Choices | Description | +|-------------|----------|------------|-----------------------------------------------------| +| ``ansible_host`` | yes | | Specifies the hostname or address for connecting to the remote device over the specified transport | +| ``ansible_port`` | no | | Specifies the port used to build the connection to the remote device; if value is unspecified, the `ANSIBLE_REMOTE_PORT` option is used; it defaults to 22 | +| ``ansible_ssh_user`` | no | | Specifies the username that authenticates the CLI login for the connection to the remote device; if value is unspecified, the `ANSIBLE_REMOTE_USER` environment variable value is used | +| ``ansible_ssh_pass`` | no | | Specifies the password that authenticates the connection to the remote device. | +| ``ansible_become`` | no | yes, no\* | Instructs the module to enter privileged mode on the remote device before sending any commands; if value is unspecified, the `ANSIBLE_BECOME` environment variable value is used, and the device attempts to execute all commands in non-privileged mode | +| ``ansible_become_method`` | no | enable, sudo\* | Instructs the module to allow the become method to be specified for handling privilege escalation; if value is unspecified, the `ANSIBLE_BECOME_METHOD` environment variable value is used | +| ``ansible_become_pass`` | no | | Specifies the password to use if required to enter privileged mode on the remote device; if ``ansible_become`` is set to no this key is not applicable | +| ``ansible_network_os`` | yes | os9, null\* | Loads the correct terminal and cliconf plugins to communicate with the remote device | + +> **NOTE**: Asterisk (\*) denotes the default value if none is specified. + +Example playbook +---------------- + +This example uses the *os9_bgp* role to configure the BGP network and neighbors. The example creates a hosts file with the switch details and corresponding variables. The hosts file should define the `ansible_network_os` variable with the corresponding Dell EMC OS9 name. + +When `os9_cfg_generate` is set to true, the variable generates the configuration commands as a .part file in *build_dir* path. By default, the variable is set to false. This example writes a simple playbook that only references the *os9_bgp* role. The sample host_vars given below is for os9. + +**Sample hosts file** + + leaf1 ansible_host= <ip_address> + +**Sample host_vars/leaf1** + + hostname: leaf1 + ansible_become: yes + ansible_become_method: xxxxx + ansible_become_pass: xxxxx + ansible_ssh_user: xxxxx + ansible_ssh_pass: xxxxx + ansible_network_os: dellemc.os9.os9 + build_dir: ../temp/os9 + + os9_bgp: + asn: 11 + router_id: 192.168.3.100 + maxpath_ibgp: 2 + maxpath_ebgp: 2 + graceful_restart: true + best_path: + as_path: ignore + ignore_router_id: true + med: + - attribute: confed + state: present + - attribute: missing-as-best + state: present + ipv4_network: + - address: 102.1.1.0/30 + state: present + ipv6_network: + - address: "2001:4898:5808:ffa0::/126" + state: present + neighbor: + - ip: 192.168.10.2 + type: ipv4 + remote_asn: 12 + timer: 5 10 + adv_interval: 40 + fall_over: present + default_originate: False + peergroup: per + peergroup_state: present + sender_loop_detect: false + src_loopback: 1 + src_loopback_state: present + distribute_list: + in: aa + in_state: present + ebgp_multihop: 25 + admin: up + state: present + - ip: 2001:4898:5808:ffa2::1 + type: ipv6 + remote_asn: 14 + peergroup: per + peergroup_state: present + distribute_list: + in: aa + in_state: present + src_loopback: 0 + src_loopback_state: present + ebgp_multihop: 255 + admin: up + state: present + - name: peer1 + type: peergroup + remote_asn: 14 + distribute_list: + in: an + in_state: present + out: bb + out_state: present + passive: True + subnet: 10.128.4.192/27 + subnet_state: present + state: present + - ip: 172.20.12.1 + description: O_site2-spine1 + type: ipv4 + remote_asn: 64640 + fall_over: present + ebgp_multihop: 4 + src_loopback: 1 + adv_interval: 1 + timer: 3 9 + send_community: + - type: extended + address_family: + - type: ipv4 + activate: falsesrc_loopback + state: present + - type: l2vpn + activate: true + state: present + admin: up + state: present + redistribute: + - route_type: static + route_map_name: aa + state: present + address_type: ipv4 + - route_type: connected + address_type: ipv6 + state: present + state: present + +**Simple playbook to configure BGP — leaf.yaml** + + - hosts: leaf1 + roles: + - dellemc.os9.os9_bgp + +**Run** + + ansible-playbook -i hosts leaf.yaml + +(c) 2017-2020 Dell Inc. or its subsidiaries. All rights reserved. diff --git a/ansible_collections/dellemc/os9/roles/os9_bgp/defaults/main.yml b/ansible_collections/dellemc/os9/roles/os9_bgp/defaults/main.yml new file mode 100644 index 000000000..0063029c0 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_bgp/defaults/main.yml @@ -0,0 +1,2 @@ +--- +# defaults file for dellemc.os9.os9_bgp
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_bgp/handlers/main.yml b/ansible_collections/dellemc/os9/roles/os9_bgp/handlers/main.yml new file mode 100644 index 000000000..385a5f7a6 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_bgp/handlers/main.yml @@ -0,0 +1,2 @@ +--- +# handlers file for dellemc.os9.os9_bgp
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_bgp/meta/main.yml b/ansible_collections/dellemc/os9/roles/os9_bgp/meta/main.yml new file mode 100644 index 000000000..5db413c33 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_bgp/meta/main.yml @@ -0,0 +1,18 @@ +# Copyright (c) 2017-2020 Dell Inc. or its subsidiaries. All Rights Reserved. +--- +galaxy_info: + author: Dell EMC Networking Engineering + description: The os9_bgp role facilitates the configuration of BGP attributes in devices running Dell EMC Networking Operating Systems. + company: Dell Inc + license: GPLv3 + min_ansible_version: 2.9.6 + + platforms: + - name: os9 + + galaxy_tags: + - networking + - dell + - emc + - dellemc + - os9 diff --git a/ansible_collections/dellemc/os9/roles/os9_bgp/tasks/main.yml b/ansible_collections/dellemc/os9/roles/os9_bgp/tasks/main.yml new file mode 100644 index 000000000..46f84c4c2 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_bgp/tasks/main.yml @@ -0,0 +1,16 @@ +--- +# tasks file for os9 + - name: "Generating BGP configuration for os9" + template: + src: os9_bgp.j2 + dest: "{{ build_dir }}/bgp9_{{ hostname }}.conf.part" + when: (ansible_network_os is defined and ansible_network_os == "dellemc.os9.os9") and ((os9_cfg_generate | default('False')) | bool) +# notify: save config os9 + register: generate_output + + - name: "Provisioning BGP configuration for os9" + dellemc.os9.os9_config: + src: os9_bgp.j2 + when: (ansible_network_os is defined and ansible_network_os == "dellemc.os9.os9") +# notify: save config os9 + register: output diff --git a/ansible_collections/dellemc/os9/roles/os9_bgp/templates/os9_bgp.j2 b/ansible_collections/dellemc/os9/roles/os9_bgp/templates/os9_bgp.j2 new file mode 100644 index 000000000..4bc679121 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_bgp/templates/os9_bgp.j2 @@ -0,0 +1,351 @@ +#jinja2: trim_blocks: True, lstrip_blocks: True +{########################################## +Purpose: +Configure BGP commands for os9 Devices +os9_bgp: + asn: 12 + router_id: + maxpath_ibgp: 2 + maxpath_ebgp: 2 + best_path: + as_path: ignore + as_path_state: present + ignore_router_id: true + med: + - attribute: confed + state: present + ipv4_network: + - address: 101.1.1.0/30 + state: present + ipv6_network: + - address: "2001:4898:5808:ffa0::/126" + state: present + neighbor: + - type: ipv4 + remote_asn: 11 + ip: 192.168.11.1 + admin: up + sender_loop_detect: false + src_loopback: 0 + src_loopback_state: present + ebgp_multihop: 255 + distribute_list: + in: aa + in_state: present + out: aa + out_state: present + state: present + - type: ipv6 + remote_asn: 14 + ip: 2001:4898:5808:ffa2::1 + sender_loop_detect: false + src_loopback: 0 + src_loopback_state: present + state: present + - type: peer_group + name: peer1 + remote_asn: 6 + subnet: 10.128.3.192/27 + subnet_state: present + admin: up + default_originate: true + sender_loop_detect: false + src_loopback: 1 + src_loopback_state: present + ebgp_multihop: 255 + state: present + redistribute: + - route_type: static + state: present + state: present +################################} +{% if os9_bgp is defined and os9_bgp%} +{% set bgp_vars = os9_bgp %} + +{% if bgp_vars.asn is defined and bgp_vars.asn %} + {% if bgp_vars.state is defined and bgp_vars.state == "absent" %} +no router bgp {{ bgp_vars.asn }} + {% else %} +{# Add Feature to the switch #} +router bgp {{ bgp_vars.asn }} + {% if bgp_vars.router_id is defined %} + {% if bgp_vars.router_id %} + bgp router-id {{ bgp_vars.router_id }} + {% else %} + no bgp router-id + {% endif %} + {% endif %} + + {% if bgp_vars.maxpath_ebgp is defined %} + {% if bgp_vars.maxpath_ebgp %} + maximum-paths ebgp {{ bgp_vars.maxpath_ebgp }} + {% else %} + no maximum-paths ebgp + {% endif %} + {% endif %} + + {% if bgp_vars.maxpath_ibgp is defined %} + {% if bgp_vars.maxpath_ibgp %} + maximum-paths ibgp {{ bgp_vars.maxpath_ibgp }} + {% else %} + no maximum-paths ibgp + {% endif %} + {% endif %} + + {% if bgp_vars.graceful_restart is defined and bgp_vars.graceful_restart %} + {% if bgp_vars.graceful_restart.state is defined and bgp_vars.graceful_restart.state == "present" %} + bgp graceful-restart + {% else %} + no bgp graceful-restart + {% endif %} + {% endif %} + + {% if bgp_vars.best_path is defined and bgp_vars.best_path %} + {% if bgp_vars.best_path.as_path is defined and bgp_vars.best_path.as_path %} + {% if bgp_vars.best_path.as_path_state is defined and bgp_vars.best_path.as_path_state == "absent" %} + no bgp bestpath as-path {{ bgp_vars.best_path.as_path }} + {% else %} + bgp bestpath as-path {{ bgp_vars.best_path.as_path }} + {% endif %} + {% endif %} + {% if bgp_vars.best_path.ignore_router_id is defined %} + {% if bgp_vars.best_path.ignore_router_id %} + bgp bestpath router-id ignore + {% else %} + no bgp bestpath router-id ignore + {% endif %} + {% endif %} + {% if bgp_vars.best_path.med is defined and bgp_vars.best_path.med %} + {% for med in bgp_vars.best_path.med %} + {% if med.attribute is defined and med.attribute %} + {% if med.state is defined and med.state == "absent" %} + no bgp bestpath med {{ med.attribute }} + {% else %} + bgp bestpath med {{ med.attribute }} + {% endif %} + {% endif %} + {% endfor %} + {% endif %} + {% endif %} + {% if bgp_vars.ipv4_network is defined and bgp_vars.ipv4_network %} + {% for net in bgp_vars.ipv4_network %} + {# remove BGP network announcement #} + {% if net.address is defined and net.address %} + {% if net.state is defined and net.state == "absent" %} + no network {{ net.address }} +{# Add BGP network announcement #} + {% else %} + network {{ net.address }} + {% endif %} + {% endif %} + {% endfor %} + {% endif %} + + {% if bgp_vars.ipv6_network is defined and bgp_vars.ipv6_network %} + address-family ipv6 unicast + {% for net in bgp_vars.ipv6_network %} + {% if net.address is defined and net.address %} + {% if net.state is defined and net.state == "absent" %} + no network {{ net.address }} + {% else %} + network {{ net.address }} + {% endif %} + {% endif %} + {% endfor %} + exit-address-family + {% endif %} + + {% if bgp_vars.neighbor is defined and bgp_vars.neighbor %} + {% for neighbor in bgp_vars.neighbor %} + {% if neighbor.type is defined %} + {% if neighbor.type == "ipv4" or neighbor.type =="ipv6" %} + {% if neighbor.ip is defined and neighbor.ip %} + {% set tag_or_ip = neighbor.ip %} + {% if neighbor.remote_asn is defined and neighbor.remote_asn %} + {% if neighbor.state is defined and neighbor.state == "absent" %} + no neighbor {{ tag_or_ip }} remote-as {{ neighbor.remote_asn }} + {% if neighbor.peergroup is defined and neighbor.peergroup %} + {% if neighbor.peergroup_state is defined and neighbor.peergroup_state == "absent" %} + no neighbor {{ tag_or_ip }} peer-group {{ neighbor.peergroup }} + {% endif %} + {% endif %} + {% if neighbor.type == "ipv6" %} + address-family ipv6 unicast + no neighbor {{ tag_or_ip }} activate + exit-address-family + {% endif %} + {% else %} + neighbor {{ tag_or_ip }} remote-as {{ neighbor.remote_asn }} + {% if neighbor.peergroup is defined and neighbor.peergroup %} + {% if neighbor.peergroup_state is defined and neighbor.peergroup_state == "absent" %} + no neighbor {{ tag_or_ip }} peer-group {{ neighbor.peergroup }} + {% else %} + neighbor {{ tag_or_ip }} peer-group {{ neighbor.peergroup }} + {% endif %} + {% endif %} + {% if neighbor.type == "ipv6" %} + address-family ipv6 unicast + neighbor {{ tag_or_ip }} activate + exit-address-family + {% endif %} + {% endif %} + {% endif %} + {% endif %} + {% elif neighbor.type == "peergroup" %} + {% if neighbor.name is defined and neighbor.name %} + {% set tag_or_ip = neighbor.name %} + {% if neighbor.state is defined and neighbor.state == "absent" %} + no neighbor {{ tag_or_ip }} peer-group + {% else %} + {% if neighbor.passive is defined and neighbor.passive %} + neighbor {{ tag_or_ip }} peer-group passive + {% if neighbor.subnet is defined and neighbor.subnet %} + {% if neighbor.subnet_state is defined and neighbor.subnet_state == "absent" %} + no neighbor {{ tag_or_ip }} subnet {{ neighbor.subnet }} + {% else %} + neighbor {{ tag_or_ip }} subnet {{ neighbor.subnet }} + {% endif %} + {% endif %} + {% else %} + neighbor {{ tag_or_ip }} peer-group + {% endif %} + {% if neighbor.remote_asn is defined and neighbor.remote_asn %} + {% if neighbor.remote_asn_state is defined and neighbor.remote_asn_state == "absent" %} + no neighbor {{ tag_or_ip }} remote-as {{ neighbor.remote_asn }} + {% else %} + neighbor {{ tag_or_ip }} remote-as {{ neighbor.remote_asn }} + {% endif %} + {% endif %} + {% endif %} + {% endif %} + {% endif %} + {% if tag_or_ip is defined and tag_or_ip %} + {% if (neighbor.state is not defined) or (neighbor.state is defined and not neighbor.state == "absent") %} + {% if neighbor.timer is defined %} + {% if neighbor.timer %} + neighbor {{ tag_or_ip }} timers {{ neighbor.timer }} + {% else %} + no neighbor {{ tag_or_ip }} timers + {% endif %} + {% endif %} + {% if neighbor.default_originate is defined %} + {% if neighbor.default_originate %} + neighbor {{ tag_or_ip }} default-originate + {% else %} + no neighbor {{ tag_or_ip }} default-originate + {% endif %} + {% endif %} + {% if neighbor.sender_loop_detect is defined %} + {% if neighbor.sender_loop_detect %} + neighbor {{ tag_or_ip }} sender-side-loop-detection + {% else %} + no neighbor {{ tag_or_ip }} sender-side-loop-detection + {% endif %} + {% endif %} + {% if neighbor.src_loopback is defined and neighbor.src_loopback|int(-1) != -1 %} + {% if neighbor.src_loopback_state is defined and neighbor.src_loopback_state == "absent" %} + no neighbor {{ tag_or_ip }} update-source Loopback {{neighbor.src_loopback }} + {% else %} + neighbor {{ tag_or_ip }} update-source Loopback {{ neighbor.src_loopback }} + {% endif %} + {% endif %} + {% if neighbor.ebgp_multihop is defined %} + {% if neighbor.ebgp_multihop %} + neighbor {{ tag_or_ip }} ebgp-multihop {{ neighbor.ebgp_multihop }} + {% else %} + no neighbor {{ tag_or_ip }} ebgp-multihop + {% endif %} + {% endif %} + {% if neighbor.distribute_list is defined and neighbor.distribute_list %} + {% if neighbor.distribute_list.in is defined and neighbor.distribute_list.in %} + {% if neighbor.distribute_list.in_state is defined and neighbor.distribute_list.in_state == "absent" %} + no neighbor {{ tag_or_ip }} distribute-list {{ neighbor.distribute_list.in }} in + {% else %} + neighbor {{ tag_or_ip }} distribute-list {{ neighbor.distribute_list.in }} in + {% endif %} + {% endif %} + {% if neighbor.distribute_list.out is defined and neighbor.distribute_list.out %} + {% if neighbor.distribute_list.out_state is defined and neighbor.distribute_list.out_state == "absent" %} + no neighbor {{ tag_or_ip }} distribute-list {{ neighbor.distribute_list.out }} out + {% else %} + neighbor {{ tag_or_ip }} distribute-list {{ neighbor.distribute_list.out }} out + {% endif %} + {% endif %} + {% endif %} + {% if neighbor.admin is defined and (neighbor.admin == "up" or neighbor.admin == "present") %} + neighbor {{ tag_or_ip }} no shutdown + {% else %} + neighbor {{ tag_or_ip }} shutdown + {% endif %} + {% if neighbor.adv_interval is defined %} + {% if neighbor.adv_interval %} + neighbor {{ tag_or_ip }} advertisement-interval {{ neighbor.adv_interval }} + {% else %} + no neighbor {{ tag_or_ip }} advertisement-interval + {% endif %} + {% endif %} + {% if neighbor.fall_over is defined and neighbor.fall_over == "present" %} + neighbor {{ tag_or_ip }} fall-over + {% elif neighbor.fall_over is defined and neighbor.fall_over == "absent" %} + no neighbor {{ tag_or_ip }} fall-over + {% endif %} + {% endif %} + {% endif %} + {% endif %} + {% endfor %} + {% endif %} + + {% if bgp_vars.redistribute is defined and bgp_vars.redistribute %} + {% for route in bgp_vars.redistribute %} + {% if route.route_type is defined and route.route_type %} + {% if route.address_type is defined and route.address_type %} + {% if route.address_type == "ipv6" %} + address-family {{ route.address_type }} unicast + {% if route.state is defined and route.state == "absent" %} + no redistribute {{ route.route_type }} + {% else %} + {% if route.route_map is defined %} + {% if route.route_map == "present" %} + {% if route.route_map_name is defined and route.route_map_name %} + redistribute {{ route.route_type }} route-map {{ route.route_map_name }} + {% else %} + redistribute {{ route.route_type }} + {% endif %} + {% else %} + {% if route.route_map_name is defined and route.route_map_name %} + no redistribute {{ route.route_type }} route-map {{ route.route_map_name }} + {% endif %} + {% endif %} + {% else %} + redistribute {{ route.route_type }} + {% endif %} + {% endif %} + exit-address-family + {% else %} + {% if route.state is defined and route.state == "absent" %} + no redistribute {{ route.route_type }} + {% else %} + {% if route.route_map is defined %} + {% if route.route_map == "present" %} + {% if route.route_map_name is defined and route.route_map_name %} + redistribute {{ route.route_type }} route-map {{ route.route_map_name }} + {% else %} + redistribute {{ route.route_type }} + {% endif %} + {% else %} + {% if route.route_map_name is defined and route.route_map_name %} + no redistribute {{ route.route_type }} route-map {{ route.route_map_name }} + {% endif %} + {% endif %} + redistribute {{ route.route_type }} + {% endif %} + {% endif %} + {% endif %} + {% endif %} + {% endif %} + {% endfor %} + {% endif %} + +{% endif %} +{% endif %} +{% endif %}
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_bgp/tests/inventory.yaml b/ansible_collections/dellemc/os9/roles/os9_bgp/tests/inventory.yaml new file mode 100644 index 000000000..5fd33c945 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_bgp/tests/inventory.yaml @@ -0,0 +1,20 @@ +spine1 ansible_host=100.94.210.44 +spine2 ansible_host=10.11.182.26 +leaf1 ansible_host=10.11.182.27 +leaf2 ansible_host=10.11.182.28 +leaf3 ansible_host=10.11.182.29 +leaf4 ansible_host=10.11.182.30 + +[spine] +spine1 +spine2 + +[leaf] +leaf1 +leaf2 +leaf3 +leaf4 + +[datacenter:children] +spine +leaf diff --git a/ansible_collections/dellemc/os9/roles/os9_bgp/tests/main.os9.yaml b/ansible_collections/dellemc/os9/roles/os9_bgp/tests/main.os9.yaml new file mode 100644 index 000000000..ed00565bc --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_bgp/tests/main.os9.yaml @@ -0,0 +1,97 @@ +--- +# vars file for dellemc.os9.os9_bgp, +# below gives a sample configuration +# Sample variables for OS9 device + os9_bgp: + asn: 11 + router_id: 192.168.3.100 + maxpath_ibgp: 2 + maxpath_ebgp: 2 + best_path: + as_path: ignore + as_path_state: absent + ignore_router_id: true + med: + - attribute: confed + state: present + - attribute: missing-as-best + state: present + ipv4_network: + - address: 102.1.1.0/30 + state: present + ipv6_network: + - address: "2001:4898:5808:ffa0::/126" + state: present + - address: "2001:4898:5808:ffa1::/126" + state: present + neighbor: + - name: per + type: peergroup + remote_asn: 12 + remote_asn_state: absent + default_originate: False + src_loopback: 0 + src_loopback_state: present + ebgp_multihop: 255 + state: present + + - name: peer1 + type: peergroup + remote_asn: 14 + distribute_list: + in: an + in_state: present + out: bb + out_state: present + passive: True + subnet: 10.128.4.192/27 + state: present + + - ip: 192.168.10.2 + type: ipv4 + remote_asn: 12 + timer: 5 10 + default_originate: False + peergroup: per + peergroup_state: present + distribute_list: + in: aa + in_state: present + admin: up + state: present + + - ip: 192.168.13.3 + type: ipv4 + remote_asn: 13 + sender_loop_detect: false + src_loopback: 1 + src_loopback_state: present + distribute_list: + in: aa + in_state: present + out: aa + out_state: present + ebgp_multihop: 25 + state: present + + - ip: 2001:4898:5808:ffa2::1 + type: ipv6 + remote_asn: 14 + peergroup: per + peergroup_state: present + distribute_list: + in: aa + in_state: present + src_loopback: 0 + src_loopback_state: present + ebgp_multihop: 255 + admin: up + state: present + redistribute: + - route_type: static + state: present + address_type: ipv4 + - route_type: connected + address_type: ipv6 + state: present + state: present
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_bgp/tests/test.yaml b/ansible_collections/dellemc/os9/roles/os9_bgp/tests/test.yaml new file mode 100644 index 000000000..15511b4d1 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_bgp/tests/test.yaml @@ -0,0 +1,5 @@ +--- +- hosts: datacenter + connection: network_cli + roles: + - dellemc.os9.os9_bgp
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_bgp/vars/main.yml b/ansible_collections/dellemc/os9/roles/os9_bgp/vars/main.yml new file mode 100644 index 000000000..3482e5cc7 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_bgp/vars/main.yml @@ -0,0 +1,2 @@ +--- +# vars file for dellemc.os9.os9_bgp
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_copy_config/LICENSE b/ansible_collections/dellemc/os9/roles/os9_copy_config/LICENSE new file mode 100644 index 000000000..2c9b8e1fd --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_copy_config/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/> + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (c) 2020, Dell Inc. All rights reserved. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <https://www.gnu.org/licenses/>. + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + <program> Copyright (c) 2020, Dell Inc. All rights reserved. + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +<https://www.gnu.org/licenses/>. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +<https://www.gnu.org/licenses/why-not-lgpl.html>. diff --git a/ansible_collections/dellemc/os9/roles/os9_copy_config/README.md b/ansible_collections/dellemc/os9/roles/os9_copy_config/README.md new file mode 100644 index 000000000..c74cf1c6e --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_copy_config/README.md @@ -0,0 +1,131 @@ +Copy-config role +================ + +This role is used to push the backup running configuration into a Dell EMC OS9 device, and merges the configuration in the template file with the running configuration of the device. This role is abstracted for Dell EMC PowerSwitch platforms running Dell EMC OS9. + +The copy-config role requires an SSH connection for connectivity to a Dell EMC OS9 device. You can use any of the built-in OS connection variables. + + +Role variables +-------------- + +- No predefined variables are part of this role +- Use *host_vars* or *group_vars* as part of the template file +- Configuration file is host-specific +- Copy the host-specific configuration to the respective file under the template directory in *<host_name>.j2* format +- Variables and values are case-sensitive + +Connection variables +-------------------- + +Ansible Dell EMC network roles require connection information to establish communication with the nodes in your inventory. This information can exist in the Ansible *group_vars* or *host_vars* directories, or in the playbook itself. + +| Key | Required | Choices | Description | +|-------------|----------|------------|-----------------------------------------------------| +| ``ansible_host`` | yes | | Specifies the hostname or address for connecting to the remote device over the specified transport | +| ``ansible_port`` | no | | Specifies the port used to build the connection to the remote device; if value is unspecified, the `ANSIBLE_REMOTE_PORT` option is used; it defaults to 22 | +| ``ansible_ssh_user`` | no | | Specifies the username that authenticates the CLI login for the connection to the remote device; if value is unspecified, the `ANSIBLE_REMOTE_USER` environment variable value is used | +| ``ansible_ssh_pass`` | no | | Specifies the password that authenticates the connection to the remote device. | +| ``ansible_become`` | no | yes, no\* | Instructs the module to enter privileged mode on the remote device before sending any commands; if value is unspecified, the `ANSIBLE_BECOME` environment variable value is used, and the device attempts to execute all commands in non-privileged mode | +| ``ansible_become_method`` | no | enable, sudo\* | Instructs the module to allow the become method to be specified for handling privilege escalation; if value is unspecified, the `ANSIBLE_BECOME_METHOD` environment variable value is used | +| ``ansible_become_pass`` | no | | Specifies the password to use if required to enter privileged mode on the remote device; if ``ansible_become`` is set to no this key is not applicable | +| ``ansible_network_os`` | yes | os9, null\* | Loads the correct terminal and cliconf plugins to communicate with the remote device | + +> **NOTE**: Asterisk (\*) denotes the default value if none is specified. + +Example playbook +---------------- + +This example uses the *os9_copy_config* role to push the configuration file into the device. It creates a *hosts* file with the switch details and corresponding variables. It writes a simple playbook that only references the *os9_copy_config* role. By including the role, you automatically get access to all of the tasks to push configuration file. + +**Sample hosts file** + + leaf1 ansible_host= <ip_address> + +**Sample host_vars/leaf1** + + hostname: leaf1 + ansible_become: yes + ansible_become_method: xxxxx + ansible_become_pass: xxxxx + ansible_ssh_user: xxxxx + ansible_ssh_pass: xxxxx + ansible_network_os: dellemc.os9.os9 + + # This variable shall be applied in the below jinja template for each host by defining here + os9_bgp + asn: 64801 + +**Sample roles/os9_copy_config/templates/leaf1.j2** + + ! Leaf1 BGP profile on Dell OS9 switch + snmp-server community public ro + hash-algorithm ecmp crc + ! + interface ethernet1/1/1:1 + no switchport + ip address 100.1.1.2/24 + ipv6 address 2001:100:1:1::2/64 + mtu 9216 + no shutdown + ! + interface ethernet1/1/9:1 + no switchport + ip address 100.2.1.2/24 + ipv6 address 2001:100:2:1::2/64 + mtu 9216 + no shutdown + ! + router bgp {{ os9_bgp.asn }} + bestpath as-path multipath-relax + bestpath med missing-as-worst + router-id 100.0.2.1 + ! + address-family ipv4 unicast + ! + address-family ipv6 unicast + ! + neighbor 100.1.1.1 + remote-as 64901 + no shutdown + ! + neighbor 100.2.1.1 + remote-as 64901 + no shutdown + ! + neighbor 2001:100:1:1::1 + remote-as 64901 + no shutdown + ! + address-family ipv4 unicast + no activate + exit + ! + address-family ipv6 unicast + activate + exit + ! + neighbor 2001:100:2:1::1 + remote-as 64901 + no shutdown + ! + address-family ipv4 unicast + no activate + exit + ! + address-family ipv6 unicast + activate + exit + ! + +**Simple playbook to setup to push configuration file into device — leaf.yaml** + + - hosts: leaf1 + roles: + - dellemc.os9.os9_copy_config + +**Run** + + ansible-playbook -i hosts leaf.yaml + +(c) 2020 Dell Inc. or its subsidiaries. All rights reserved. diff --git a/ansible_collections/dellemc/os9/roles/os9_copy_config/defaults/main.yml b/ansible_collections/dellemc/os9/roles/os9_copy_config/defaults/main.yml new file mode 100644 index 000000000..7f5279464 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_copy_config/defaults/main.yml @@ -0,0 +1,2 @@ +--- +# defaults file for dellemc.os9.os9_copy_config
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_copy_config/handlers/main.yml b/ansible_collections/dellemc/os9/roles/os9_copy_config/handlers/main.yml new file mode 100644 index 000000000..69e9baf74 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_copy_config/handlers/main.yml @@ -0,0 +1,2 @@ +--- +# handlers file for dellemc.os9.os9_copy_config
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_copy_config/meta/main.yml b/ansible_collections/dellemc/os9/roles/os9_copy_config/meta/main.yml new file mode 100644 index 000000000..d27c18368 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_copy_config/meta/main.yml @@ -0,0 +1,19 @@ +# Copyright (c) 2020 Dell Inc. +--- +galaxy_info: + author: Dell EMC Networking Engineering + description: > + This role shall be used to push the backup running configuration into the device. + This role shall merge the configuration in the template file with the running configuration of the device + license: GPLv3 + min_ansible_version: 2.9.6 + + platforms: + - name: os9 + + galaxy_tags: + - networking + - dell + - emc + - dellemc + - os9 diff --git a/ansible_collections/dellemc/os9/roles/os9_copy_config/tasks/main.yml b/ansible_collections/dellemc/os9/roles/os9_copy_config/tasks/main.yml new file mode 100644 index 000000000..682a6e9f0 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_copy_config/tasks/main.yml @@ -0,0 +1,7 @@ +--- +# tasks file for dellemc.os9.os9_copy_config + - name: "Merge the config file to running configuration for OS9" + dellemc.os9.os9_config: + src: "{{ hostname }}.j2" + when: (ansible_network_os is defined and ansible_network_os == "dellemc.os9.os9") +# notify: save config os9 diff --git a/ansible_collections/dellemc/os9/roles/os9_copy_config/templates/os9_copy_config.j2 b/ansible_collections/dellemc/os9/roles/os9_copy_config/templates/os9_copy_config.j2 new file mode 100644 index 000000000..bb0e16e7f --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_copy_config/templates/os9_copy_config.j2 @@ -0,0 +1,3 @@ +! Version 10.3.0E +! Last configuration change at May 09 21:47:35 2017 +!
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_copy_config/tests/inventory.yaml b/ansible_collections/dellemc/os9/roles/os9_copy_config/tests/inventory.yaml new file mode 100644 index 000000000..5fd33c945 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_copy_config/tests/inventory.yaml @@ -0,0 +1,20 @@ +spine1 ansible_host=100.94.210.44 +spine2 ansible_host=10.11.182.26 +leaf1 ansible_host=10.11.182.27 +leaf2 ansible_host=10.11.182.28 +leaf3 ansible_host=10.11.182.29 +leaf4 ansible_host=10.11.182.30 + +[spine] +spine1 +spine2 + +[leaf] +leaf1 +leaf2 +leaf3 +leaf4 + +[datacenter:children] +spine +leaf diff --git a/ansible_collections/dellemc/os9/roles/os9_copy_config/tests/main.os9.yaml b/ansible_collections/dellemc/os9/roles/os9_copy_config/tests/main.os9.yaml new file mode 100644 index 000000000..73b314ff7 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_copy_config/tests/main.os9.yaml @@ -0,0 +1 @@ +---
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_copy_config/tests/test.yaml b/ansible_collections/dellemc/os9/roles/os9_copy_config/tests/test.yaml new file mode 100644 index 000000000..e2fb514ea --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_copy_config/tests/test.yaml @@ -0,0 +1,5 @@ +--- +- hosts: localhost + connection: network_cli + roles: + - dellemc.os9.os9_copy_config diff --git a/ansible_collections/dellemc/os9/roles/os9_copy_config/vars/main.yml b/ansible_collections/dellemc/os9/roles/os9_copy_config/vars/main.yml new file mode 100644 index 000000000..21269beb7 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_copy_config/vars/main.yml @@ -0,0 +1,2 @@ +--- +# vars file for dellemc.os9.os9_copy_config diff --git a/ansible_collections/dellemc/os9/roles/os9_dcb/LICENSE b/ansible_collections/dellemc/os9/roles/os9_dcb/LICENSE new file mode 100644 index 000000000..2c9b8e1fd --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_dcb/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/> + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (c) 2020, Dell Inc. All rights reserved. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <https://www.gnu.org/licenses/>. + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + <program> Copyright (c) 2020, Dell Inc. All rights reserved. + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +<https://www.gnu.org/licenses/>. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +<https://www.gnu.org/licenses/why-not-lgpl.html>. diff --git a/ansible_collections/dellemc/os9/roles/os9_dcb/README.md b/ansible_collections/dellemc/os9/roles/os9_dcb/README.md new file mode 100644 index 000000000..20f1c0207 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_dcb/README.md @@ -0,0 +1,133 @@ +DCB role +======== + +This role facilitates the configuration of data center bridging (DCB). It supports the configuration of the DCB map and the DCB buffer, and assigns them to interfaces. This role is abstracted for Dell EMC PowerSwitch platforms running Dell EMC OS9. + +The DCB role requires an SSH connection for connectivity to a Dell EMC OS9 device. You can use any of the built-in OS connection variables. + + +Role variables +-------------- + +- Role is abstracted using the `ansible_network_os` variable and can take the `dellemc.os9.os9` as the value +- If `os9_cfg_generate` is set to true, generates the role configuration commands in a file +- Any role variable with a corresponding state variable set to absent negates the configuration of that variable +- Setting an empty value for any variable negates the corresponding configuration +- Variables and values are case-sensitive + +**os9_dcb keys** + +| Key | Type | Description | Support | +|------------|---------------------------|---------------------------------------------------------|-----------------------| +| ``dcb_enable`` | boolean: true,false | Enables/disables DCB | os9 | +| ``dcb_map`` | list | Configures the DCB map (see ``dcb_map.*``) | os9 | +| ``dcb_map.name`` | string (required) | Configures the DCB map name | os9 | +| ``dcb_map.priority_group`` | list | Configures the priority-group for the DCB map (see ``priority_group.*``) | os9 | +| ``priority_group.pgid`` | integer (required): 0-7 | Configures the priority-group ID | os9 | +| ``priority_group.bandwidth`` | integer (required) | Configures the bandwidth percentage for the priority-group | os9 | +| ``priority_group.pfc`` | boolean: true,false (required) | Configures PFC on/off for the priorities in the priority-group | os9 | +| ``priority_group.state`` | string: absent,present\* | Deletes the priority-group of the DCB map if set to absent | os9 | +| ``dcb_map.priority_pgid`` |string (required) | Configures priority to priority-group mapping; value is the PGID of priority groups separated by a space (1 1 2 2 3 3 3 4) | os9 | +| ``dcb_map.intf`` | list | Configures the DCB map to the interface (see ``intf.*``) | os9 | +| ``intf.name`` | string (required) | Configures the DCB map to the interface with this interface name | os9 | +| ``intf.state`` | string: absent,present\* | Deletes the DCB map from the interface if set to absent | os9 | +| ``dcb_map.state`` | string: absent,present\* | Deletes the DCB map if set to absent | os9 | +| ``dcb_buffer`` | list | Configures the DCB buffer profile (see ``dcb_buffer.*``) | os9 | +| ``dcb_buffer.name`` | string (required) | Configures the DCB buffer profile name | os9 | +| ``dcb_buffer.description`` | string (required) | Configures a description about the DCB buffer profile | os9 | +| ``dcb_buffer.priority_params`` | list | Configures priority flow-control buffer parameters (see ``priority_params.*``)| os9 | +| ``priority_params.pgid`` | integer (required): 0-7 | Specifies the priority-group ID | os9 | +| ``priority_params.buffer_size`` | int (required) | Configures the ingress buffer size (in KB) of the DCB buffer profile | os9 | +| ``priority_params.pause`` | integer | Configures the buffer limit (in KB) for pausing | os9 | +| ``priority_params.resume`` | integer | Configures buffer offset limit (in KB) for resume | os9 | +| ``priority_params.state`` | string: absent,present\* | Deletes the priority flow parameters of the DCB buffer if set to absent | os9 | +| ``dcb_buffer.intf`` | list | Configures the DCB buffer to the interface (see ``intf.*``) | os9 | +| ``intf.name`` | string (required) | Configures the DCB buffer to the interface with this interface name | os9 | +| ``intf.state`` | string: absent,present\* | Deletes the DCB buffer from the interface if set to absent | os9 | +| ``dcb_buffer.state`` | string: absent,present\* | Deletes the DCB buffer profile if set to absent | os9 | + +> **NOTE**: Asterisk (\*) denotes the default value if none is specified. + +Connection variables +-------------------- + +Ansible Dell EMC network roles require connection information to establish communication with the nodes in your inventory. This information can exist in the Ansible *group_vars* or *host_vars* directories or inventory, or in the playbook itself. + +| Key | Required | Choices | Description | +|-------------|----------|------------|-----------------------------------------------------| +| ``ansible_host`` | yes | | Specifies the hostname or address for connecting to the remote device over the specified transport | +| ``ansible_port`` | no | | Specifies the port used to build the connection to the remote device; if value is unspecified, the `ANSIBLE_REMOTE_PORT` option is used; it defaults to 22 | +| ``ansible_ssh_user`` | no | | Specifies the username that authenticates the CLI login for the connection to the remote device; if value is unspecified, the `ANSIBLE_REMOTE_USER` environment variable value is used | +| ``ansible_ssh_pass`` | no | | Specifies the password that authenticates the connection to the remote device. | +| ``ansible_become`` | no | yes, no\* | Instructs the module to enter privileged mode on the remote device before sending any commands; if value is unspecified, the `ANSIBLE_BECOME` environment variable value is used, and the device attempts to execute all commands in non-privileged mode | +| ``ansible_become_method`` | no | enable, sudo\* | Instructs the module to allow the become method to be specified for handling privilege escalation; if value is unspecified, the `ANSIBLE_BECOME_METHOD` environment variable value is used | +| ``ansible_become_pass`` | no | | Specifies the password to use if required to enter privileged mode on the remote device; if ``ansible_become`` is set to no this key is not applicable | +| ``ansible_network_os`` | yes | os9, null\* | Loads the correct terminal and cliconf plugins to communicate with the remote device | + +> **NOTE**: Asterisk (\*) denotes the default value if none is specified. + +Example playbook +---------------- + +This example uses the *os9_dcb* role to completely configure DCB map and DCB buffer profiles and assigns it to interfaces. The example creates a *hosts* file with the switch details and corresponding variables. The hosts file should define the `ansible_network_os` variable with corresponding Dell EMC OS9 name. + +When `os9_cfg_generate` is set to true, the variable generates the configuration commands as a .part file in *build_dir* path. By default it is set to false. It writes a simple playbook that only references the *os9_dcb* role. + +**Sample hosts file** + + leaf1 ansible_host= <ip_address> + +**Sample host_vars/leaf1** + + hostname: leaf1 + ansible_become: yes + ansible_become_method: xxxxx + ansible_become_pass: xxxxx + ansible_ssh_user: xxxxx + ansible_ssh_pass: xxxxx + ansible_network_os: dellemc.os9.os9 + build_dir: ../temp/os9 + os9_dcb: + dcb_map: + - name: test + priority_pgid: 0 0 0 3 3 3 3 0 + priority_group: + - pgid: 0 + bandwidth: 20 + pfc: true + state: present + - pgid: 3 + bandwidth: 80 + pfc: true + state: present + intf: + - name: fortyGigE 1/8 + state: present + - name: fortyGigE 1/9 + state: present + state: present + dcb_buffer: + - name: buffer + description: + priority_params: + - pgid: 0 + buffer_size: 5550 + pause: 40 + resume: 40 + state: present + intf: + - name: fortyGigE 1/8 + state: present + state: present + +**Simple playbook to setup system — leaf.yaml** + + - hosts: leaf1 + roles: + - dellemc.os9.os9 + +**Run** + + ansible-playbook -i hosts leaf.yaml + +(c) 2020 Dell Inc. or its subsidiaries. All rights reserved. diff --git a/ansible_collections/dellemc/os9/roles/os9_dcb/defaults/main.yml b/ansible_collections/dellemc/os9/roles/os9_dcb/defaults/main.yml new file mode 100644 index 000000000..58a954632 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_dcb/defaults/main.yml @@ -0,0 +1,2 @@ +--- +# defaults file for dellemc.os9.os9_dcb
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_dcb/handlers/main.yml b/ansible_collections/dellemc/os9/roles/os9_dcb/handlers/main.yml new file mode 100644 index 000000000..476aabf04 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_dcb/handlers/main.yml @@ -0,0 +1,2 @@ +--- +# handlers file for dellemc.os9.os9_dcb
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_dcb/meta/main.yml b/ansible_collections/dellemc/os9/roles/os9_dcb/meta/main.yml new file mode 100644 index 000000000..b76457b6f --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_dcb/meta/main.yml @@ -0,0 +1,19 @@ +# Copyright (c) 2020 Dell Inc. +--- +galaxy_info: + author: Dell EMC Networking Engineering + description: > + The os9_dcb role facilitates the configuration of Data Center Bridging (DCB) attributes in devices + running Dell EMC Networking Operating Systems. + license: GPLv3 + min_ansible_version: 2.9.6 + + platforms: + - name: os9 + + galaxy_tags: + - networking + - dell + - emc + - dellemc + - os9 diff --git a/ansible_collections/dellemc/os9/roles/os9_dcb/tasks/main.yml b/ansible_collections/dellemc/os9/roles/os9_dcb/tasks/main.yml new file mode 100644 index 000000000..cc1b44fea --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_dcb/tasks/main.yml @@ -0,0 +1,16 @@ +--- +# tasks file for os9 + - name: "Generating DCB configuration for os9" + template: + src: os9_dcb.j2 + dest: "{{ build_dir }}/dcb9_{{ hostname }}.conf.part" + when: (ansible_network_os is defined and ansible_network_os == "dellemc.os9.os9") and ((os9_cfg_generate | default('False')) | bool) +# notify: save config os9 + register: generate_output + + - name: "Provisioning DCB configuration for os9" + dellemc.os9.os9_config: + src: os9_dcb.j2 + when: (ansible_network_os is defined and ansible_network_os == "dellemc.os9.os9") +# notify: save config os9 + register: output diff --git a/ansible_collections/dellemc/os9/roles/os9_dcb/templates/os9_dcb.j2 b/ansible_collections/dellemc/os9/roles/os9_dcb/templates/os9_dcb.j2 new file mode 100644 index 000000000..be654009c --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_dcb/templates/os9_dcb.j2 @@ -0,0 +1,216 @@ +#jinja2: trim_blocks: True,lstrip_blocks: True +{################################ +Purpose: +Configure DCB commands for os9 Devices +os9_dcb: + dcb_enable: true + dcb_map: + - name: test + priority_pgid: 0 0 0 3 3 3 0 3 + priority_group: + - pgid: 0 + bandwidth: 20 + pfc: true + state: present + - pgid: 3 + bandwidth: 20 + pfc: true + state: present + intf: + - name: fortyGigE 1/8 + state: present + - name: fortyGigE 1/9 + state: present + state: present + dcb_buffer: + - name: buffer + description: + priority_params: + - pgid: 0 + buffer_size: 5550 + pause: 40 + resume: 40 + state: present + intf: + - name: fortyGigE 1/6 + state: present + state: present +################################} +{% if os9_dcb is defined and os9_dcb %} +{% set dcb_vars = os9_dcb %} +{% if dcb_vars.dcb_enable is defined %} + {% if dcb_vars.dcb_enable %} +dcb enable + {% else %} +no dcb enable + {% endif %} +{% endif %} +{% if dcb_vars.dcb_map is defined and dcb_vars.dcb_map %} + {% for map in dcb_vars.dcb_map %} + {% if map.name is defined and map.name %} + {% if map.state is defined and map.state == "absent" %} + {% if map.intf is defined and map.intf %} + {% for intf in map.intf %} + {% if intf.state is defined and intf.state == "absent" %} + {% if intf.name is defined and intf.name %} +interface {{ intf.name }} + no dcb-map {{ map.name }} + exit + {% endif %} + {% endif %} + {% endfor %} + {% endif %} +no dcb-map {{ map.name }} + {% else %} +dcb-map {{ map.name }} + {% set pgid_set = {'value': False} %} + {% if map.priority_group is defined and map.priority_group %} + {% for group in map.priority_group %} + {% if group.pgid is defined and group.pgid >= 0 %} + {% if group.state is defined and group.state == "absent" %} + {% if not pgid_set['value'] %} + {% if map.priority_pgid is defined %} + {% if pgid_set.update({'value': True}) %} {% endif %} + {% if map.priority_pgid %} + priority-pgid {{ map.priority_pgid }} + {% else %} + no priority-pgid + {% endif %} + {% endif %} + {% endif %} + no priority-group {{ group.pgid }} + {% else %} + {% if group.bandwidth is defined and group.bandwidth %} + {% if group.pfc is defined %} + {% if group.pfc %} + priority-group {{ group.pgid }} bandwidth {{ group.bandwidth }} pfc on + {% else %} + priority-group {{ group.pgid }} bandwidth {{ group.bandwidth }} pfc off + {% endif %} + {% endif %} + {% endif %} + {% endif %} + {% endif %} + {% endfor %} + {% endif %} + {% if not pgid_set['value'] %} + {% if map.priority_pgid is defined %} + {% if map.priority_pgid %} + priority-pgid {{ map.priority_pgid }} + {% else %} + no priority-pgid + {% endif %} + {% endif %} + {% endif %} + {% if map.intf is defined and map.intf %} + {% for intf in map.intf %} + {% if intf.name is defined and intf.name %} +interface {{ intf.name }} + {% if intf.state is defined and intf.state == "absent" %} + no dcb-map {{ map.name }} + {% else %} + dcb-map {{ map.name }} + {% endif %} + {% endif %} + {% endfor %} + {% endif %} + {% endif %} + {% endif %} + {% endfor %} +{% endif %} +{% if dcb_vars.dcb_buffer is defined and dcb_vars.dcb_buffer %} + {% for buf in dcb_vars.dcb_buffer %} + {% if buf.name is defined and buf.name %} + {% if buf.state is defined and buf.state == "absent" %} +no dcb-buffer-threshold {{ buf.name }} + {% else %} +dcb-buffer-threshold {{ buf.name }} + {% if buf.description is defined and buf.description %} + description {{ buf.description }} + {% elif buf.description is defined and not buf.description %} + no description + {% endif %} + + {% if buf.priority_params is defined and buf.priority_params %} + {% for params in buf.priority_params %} + {% if params.pgid is defined and params.pgid >= 0 %} + {% if params.state is defined and params.state == "absent" %} + {% if params.buffer_size is defined and params.buffer_size %} + {% if params.pause is defined and params.pause %} + {% if params.resume is defined and params.resume %} + no priority {{ params.pgid }} buffer-size {{ params.buffer_size }} pause-threshold {{ params.pause }} resume-offset {{ params.resume }} + {% else %} + no priority {{ params.pgid }} buffer-size {{ params.buffer_size }} pause-threshold {{ params.pause }} + {% endif %} + {% else %} + {% if params.resume is defined and params.resume %} + no priority {{ params.pgid }} buffer-size {{ params.buffer_size }} resume-offset {{ params.resume }} + {% else %} + no priority {{ params.pgid }} buffer-size {{ params.buffer_size }} + {% endif %} + {% endif %} + {% else %} + {% if params.pause is defined and params.pause %} + {% if params.resume is defined and params.resume %} + no priority {{ params.pgid }} pause-threshold {{ params.pause }} resume-offset {{ params.resume }} + {% else %} + no priority {{ params.pgid }} pause-threshold {{ params.pause }} + {% endif %} + {% else %} + {% if params.resume is defined and params.resume %} + no priority {{ params.pgid }} resume-offset {{ params.resume }} + {% else %} + no priority {{ params.pgid }} + {% endif %} + {% endif %} + {% endif %} + {% else %} + {% if params.buffer_size is defined and params.buffer_size %} + {% if params.pause is defined and params.pause %} + {% if params.resume is defined and params.resume %} + priority {{ params.pgid }} buffer-size {{ params.buffer_size }} pause-threshold {{ params.pause }} resume-offset {{ params.resume }} + {% else %} + priority {{ params.pgid }} buffer-size {{ params.buffer_size }} pause-threshold {{ params.pause }} + {% endif %} + {% else %} + {% if params.resume is defined and params.resume %} + priority {{ params.pgid }} buffer-size {{ params.buffer_size }} resume-offset {{ params.resume }} + {% else %} + priority {{ params.pgid }} buffer-size {{ params.buffer_size }} + {% endif %} + {% endif %} + {% else %} + {% if params.pause is defined and params.pause %} + {% if params.resume is defined and params.resume %} + priority {{ params.pgid }} pause-threshold {{ params.pause }} resume-offset {{ params.resume }} + {% else %} + priority {{ params.pgid }} pause-threshold {{ params.pause }} + {% endif %} + {% else %} + {% if params.resume is defined and params.resume %} + priority {{ params.pgid }} resume-offset {{ params.resume }} + {% endif %} + {% endif %} + {% endif %} + {% endif %} + {% endif %} + {% endfor %} + {% endif %} + {% if buf.intf is defined and buf.intf %} + {% for intf in buf.intf %} + {% if intf.name is defined and intf.name %} +interface {{ intf.name }} + {% if intf.state is defined and intf.state == "absent" %} + no dcb-policy buffer-threshold {{ buf.name }} + {% else %} + dcb-policy buffer-threshold {{ buf.name }} + {% endif %} + {% endif %} + {% endfor %} + {% endif %} + + {% endif %} + {% endif %} + {% endfor %} +{% endif %} +{% endif %}
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_dcb/tests/inventory.yaml b/ansible_collections/dellemc/os9/roles/os9_dcb/tests/inventory.yaml new file mode 100644 index 000000000..5fd33c945 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_dcb/tests/inventory.yaml @@ -0,0 +1,20 @@ +spine1 ansible_host=100.94.210.44 +spine2 ansible_host=10.11.182.26 +leaf1 ansible_host=10.11.182.27 +leaf2 ansible_host=10.11.182.28 +leaf3 ansible_host=10.11.182.29 +leaf4 ansible_host=10.11.182.30 + +[spine] +spine1 +spine2 + +[leaf] +leaf1 +leaf2 +leaf3 +leaf4 + +[datacenter:children] +spine +leaf diff --git a/ansible_collections/dellemc/os9/roles/os9_dcb/tests/main.os9.yaml b/ansible_collections/dellemc/os9/roles/os9_dcb/tests/main.os9.yaml new file mode 100644 index 000000000..4c19958ff --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_dcb/tests/main.os9.yaml @@ -0,0 +1,38 @@ +--- +# vars file for dellemc.os9.os9_dcb, +# below gives a sample configuration +# Sample variables for OS9 device +os9_dcb: + dcb_enable: true + dcb_map: + - name: test + priority_pgid: 0 0 0 3 0 0 0 0 + priority_group: + - pgid: 0 + bandwidth: 50 + pfc: false + state: present + - pgid: 3 + bandwidth: 50 + pfc: true + state: present + intf: + - name: fortyGigE 1/8 + state: absent + - name: fortyGigE 1/9 + state: present + dcb_buffer: + - name: buffer + description: testbuffer + priority_params: + - pgid: 0 + buffer_size: 70 + pause: 40 + resume: 40 + state: present + intf: + - name: fortyGigE 1/8 + state: present + - name: fortyGigE 1/5 + state: present + state: present
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_dcb/tests/test.yaml b/ansible_collections/dellemc/os9/roles/os9_dcb/tests/test.yaml new file mode 100644 index 000000000..ad59857af --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_dcb/tests/test.yaml @@ -0,0 +1,5 @@ +--- +- hosts: datacenter + connection: network_cli + roles: + - dellemc.os9.os9_dcb
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_dcb/vars/main.yml b/ansible_collections/dellemc/os9/roles/os9_dcb/vars/main.yml new file mode 100644 index 000000000..dec87c76f --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_dcb/vars/main.yml @@ -0,0 +1,2 @@ +--- +# vars file for dellemc.os9.os9_dcb
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_dns/LICENSE b/ansible_collections/dellemc/os9/roles/os9_dns/LICENSE new file mode 100644 index 000000000..2c9b8e1fd --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_dns/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/> + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (c) 2020, Dell Inc. All rights reserved. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <https://www.gnu.org/licenses/>. + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + <program> Copyright (c) 2020, Dell Inc. All rights reserved. + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +<https://www.gnu.org/licenses/>. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +<https://www.gnu.org/licenses/why-not-lgpl.html>. diff --git a/ansible_collections/dellemc/os9/roles/os9_dns/README.md b/ansible_collections/dellemc/os9/roles/os9_dns/README.md new file mode 100644 index 000000000..ad97999f9 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_dns/README.md @@ -0,0 +1,94 @@ +DNS role +======== + +This role facilitates the configuration of the domain name service (DNS). This role is abstracted for Dell EMC PowerSwitch platforms running Dell EMC OS9. + +The DNS role requires an SSH connection for connectivity to a Dell EMC OS9 device. You can use any of the built-in OS connection variables. + +Role variables +-------------- + +- Role is abstracted using the `ansible_network_os` variable that can take the dellemc.os9.os9 as a value +- If `os9_cfg_generate` set to true, the variable generates the role configuration commands in a file +- Any role variable with a corresponding state variable set to absent negates the configuration of that variable +- Setting an empty value for any variable negates the corresponding configuration +- Variables and values are case-sensitive + +**os9_dns keys** + +| Key | Type | Description | Support | +|------------|---------------------------|---------------------------------------------------------|-----------------------| +| ``name_server`` | list | Configures DNS (see ``name_server.*``) | os9 | +| ``name_server.domain_lookup`` | boolean | Enables or disables domain name lookup | os9 | +| ``name_server.ip`` | list | Configures the name server IP | os9 | +| ``name_server.vrf`` | list | Configures VRF for each IP | os9 | +| ``name_server.state`` | string: absent,present\* | Deletes the name server IP if set to absent | os9 | + +> **NOTE**: Asterisk (\*) denotes the default value if none is specified. + +Connection variables +-------------------- + +Ansible Dell EMC network roles require connection information to establish communication with the nodes in your inventory. This information can exist in the Ansible *group_vars* or *host_vars* directories or inventory, or in the playbook itself. + +| Key | Required | Choices | Description | +|-------------|----------|------------|-----------------------------------------------------| +| ``ansible_host`` | yes | | Specifies the hostname or address for connecting to the remote device over the specified transport | +| ``ansible_port`` | no | | Specifies the port used to build the connection to the remote device; if value is unspecified, the `ANSIBLE_REMOTE_PORT` option is used; it defaults to 22 | +| ``ansible_ssh_user`` | no | | Specifies the username that authenticates the CLI login for the connection to the remote device; if value is unspecified, the `ANSIBLE_REMOTE_USER` environment variable value is used | +| ``ansible_ssh_pass`` | no | | Specifies the password that authenticates the connection to the remote device. | +| ``ansible_become`` | no | yes, no\* | Instructs the module to enter privileged mode on the remote device before sending any commands; if value is unspecified, the `ANSIBLE_BECOME` environment variable value is used, and the device attempts to execute all commands in non-privileged mode | +| ``ansible_become_method`` | no | enable, sudo\* | Instructs the module to allow the become method to be specified for handling privilege escalation; if value is unspecified, the `ANSIBLE_BECOME_METHOD` environment variable value is used | +| ``ansible_become_pass`` | no | | Specifies the password to use if required to enter privileged mode on the remote device; if ``ansible_become`` is set to no this key is not applicable | +| ``ansible_network_os`` | yes | os9, null\* | Loads the correct terminal and cliconf plugins to communicate with the remote device | + +> **NOTE**: Asterisk (\*) denotes the default value if none is specified. + +Example playbook +---------------- + +This example uses the *os9_dns* role to completely set up the DNS server configuration. The example creates a *hosts* file with the switch details and corresponding variables. The hosts file should define the `ansible_network_os` variable with corresponding Dell EMC OS9 name. + +When `os9_cfg_generate` is set to true, generates the configuration commands as a .part file in *build_dir* path. By default it is set to false. It writes a simple playbook that only references the *os9_dns* role. By including the role, you automatically get access to all of the tasks to configure DNS. + +**Sample hosts file** + + leaf1 ansible_host= <ip_address> + +**Sample host_vars/leaf1** + + hostname: leaf1 + ansible_become: yes + ansible_become_method: xxxxx + ansible_become_pass: xxxxx + ansible_ssh_user: xxxxx + ansible_ssh_pass: xxxxx + ansible_network_os: dellemc.os9.os9 + build_dir: ../temp/os9 + os9_dns: + domain_lookup: true + name_server: + - ip: + - 1.1.1.1 + - 1.1.1.2 + vrf: + - test + - management + state: absent + - ip: + - 2.2.2.2 + - ip: + - 3.3.2.2 + state: absent + +**Simple playbook to setup DNS — leaf.yaml** + + - hosts: leaf1 + roles: + - dellemc.os9.os9_dns + +**Run** + + ansible-playbook -i hosts leaf.yaml + +(c) 2020 Dell Inc. or its subsidiaries. All rights reserved. diff --git a/ansible_collections/dellemc/os9/roles/os9_dns/defaults/main.yml b/ansible_collections/dellemc/os9/roles/os9_dns/defaults/main.yml new file mode 100644 index 000000000..a5b36f9eb --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_dns/defaults/main.yml @@ -0,0 +1,2 @@ +--- +# defaults file for dellemc.os9.os9_dns
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_dns/handlers/main.yml b/ansible_collections/dellemc/os9/roles/os9_dns/handlers/main.yml new file mode 100644 index 000000000..4e8ac24cb --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_dns/handlers/main.yml @@ -0,0 +1,2 @@ +--- +# handlers file for dellemc.os9.os9_dns
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_dns/meta/main.yml b/ansible_collections/dellemc/os9/roles/os9_dns/meta/main.yml new file mode 100644 index 000000000..75373c4d8 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_dns/meta/main.yml @@ -0,0 +1,17 @@ +# Copyright (c) 2020 Dell Inc. +--- +galaxy_info: + author: Dell EMC Networking Engineering + description: The os9_dns role facilitates the configuration DNS attributes in devices running Dell EMC Networking Operating Systems. + license: GPLv3 + min_ansible_version: 2.9.6 + + platforms: + - name: os9 + + galaxy_tags: + - networking + - dell + - emc + - dellemc + - os9 diff --git a/ansible_collections/dellemc/os9/roles/os9_dns/tasks/main.yml b/ansible_collections/dellemc/os9/roles/os9_dns/tasks/main.yml new file mode 100644 index 000000000..f9a732c3e --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_dns/tasks/main.yml @@ -0,0 +1,16 @@ +--- +# tasks file for os9 + - name: "Generating DNS configuration for os9" + template: + src: os9_dns.j2 + dest: "{{ build_dir }}/dns9_{{ hostname }}.conf.part" + when: (ansible_network_os is defined and ansible_network_os == "dellemc.os9.os9") and ((os9_cfg_generate | default('False')) | bool) +# notify: save config os9 + register: generate_output + + - name: "Provisioning DNS configuration for os9" + dellemc.os9.os9_config: + src: os9_dns.j2 + when: (ansible_network_os is defined and ansible_network_os == "dellemc.os9.os9") +# notify: save config os9 + register: output diff --git a/ansible_collections/dellemc/os9/roles/os9_dns/templates/os9_dns.j2 b/ansible_collections/dellemc/os9/roles/os9_dns/templates/os9_dns.j2 new file mode 100644 index 000000000..12f013af6 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_dns/templates/os9_dns.j2 @@ -0,0 +1,111 @@ +#jinja2: trim_blocks: True,lstrip_blocks: True +{#################################### +Purpose: +Configure DNS commands for os9 devices +os9_dns: + domain_lookup: true + domain_name: dns.search.name + name_server: + - ip: + - 3.1.1.1 + - 3.1.1.2 + vrf: + - test + - test1 + - vrf: + - test1 + state: absent + - ip: + - 2.2.2.2 + - ip: + - 3.3.2.2 + state: absent + domain_list: + - vrf: + - test + - test1 + state: absent + - name: + - dname3 + - dname4 + - name: + - dname5 + - dname6 + state: absent + - name: + - dname7 + - dname8 + vrf: + - test + - test1 +#####################################} +{% if (os9_dns is defined and os9_dns) %} + {% if os9_dns.domain_lookup is defined and os9_dns.domain_lookup == true %} + ip domain-lookup + {% elif os9_dns.domain_lookup is defined and os9_dns.domain_lookup == false %} + no ip domain-lookup + {% endif %} + {% if os9_dns.domain_name is defined and os9_dns.domain_name %} + ip domain-name {{ os9_dns.domain_name }} + {% elif os9_dns.domain_name is defined and os9_dns.domain_name %} + no ip domain-name {{ os9_dns.domain_name }} + {% endif %} + {% if (os9_dns.name_server is defined and os9_dns.name_server) %} + {% for name_server in os9_dns.name_server %} + {% set absent = "" %} + {% if name_server.state is defined and name_server.state == "absent" %} + {% set absent = "no " %} + {% endif %} + + {% set vrf_name_list = name_server.vrf %} + {% if (vrf_name_list is defined and vrf_name_list ) %} + {% for vrf_name in vrf_name_list %} + {% set ip_list = name_server.ip %} + {% if (ip_list is defined and ip_list ) %} + {% for ip_val in ip_list %} + {{ absent }}ip name-server vrf {{ vrf_name }} {{ ip_val }} + {% endfor %} + {% elif name_server.state is defined and name_server.state == "absent"%} + {{ absent }}ip name-server vrf {{ vrf_name }} + {% endif %} + {% endfor %} + {% else %} + {% set ip_list = name_server.ip %} + {% if (ip_list is defined and ip_list ) %} + {% for ip_val in ip_list %} + {{ absent }}ip name-server {{ ip_val }} + {% endfor %} + {% endif %} + {% endif %} + {% endfor %} + {% endif %} + {% if (os9_dns.domain_list is defined and os9_dns.domain_list) %} + {% for domain in os9_dns.domain_list %} + {% set absent = "" %} + {% if domain.state is defined and domain.state == "absent" %} + {% set absent = "no " %} + {% endif %} + + {% set vrf_name_list = domain.vrf %} + {% if (vrf_name_list is defined and vrf_name_list ) %} + {% for vrf_name in vrf_name_list %} + {% set name_list = domain.name %} + {% if (name_list is defined and name_list ) %} + {% for name_val in name_list %} + {{ absent }}ip domain-list vrf {{ vrf_name }} {{ name_val }} + {% endfor %} + {% elif domain.state is defined and domain.state == "absent"%} + {{ absent }}ip domain-list vrf {{ vrf_name }} + {% endif %} + {% endfor %} + {% else %} + {% set name_list = domain.name %} + {% if (name_list is defined and name_list ) %} + {% for name_val in name_list %} + {{ absent }}ip domain-list {{ name_val }} + {% endfor %} + {% endif %} + {% endif %} + {% endfor %} + {% endif %} +{% endif %}
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_dns/tests/inventory.yaml b/ansible_collections/dellemc/os9/roles/os9_dns/tests/inventory.yaml new file mode 100644 index 000000000..5fd33c945 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_dns/tests/inventory.yaml @@ -0,0 +1,20 @@ +spine1 ansible_host=100.94.210.44 +spine2 ansible_host=10.11.182.26 +leaf1 ansible_host=10.11.182.27 +leaf2 ansible_host=10.11.182.28 +leaf3 ansible_host=10.11.182.29 +leaf4 ansible_host=10.11.182.30 + +[spine] +spine1 +spine2 + +[leaf] +leaf1 +leaf2 +leaf3 +leaf4 + +[datacenter:children] +spine +leaf diff --git a/ansible_collections/dellemc/os9/roles/os9_dns/tests/main.os9.yaml b/ansible_collections/dellemc/os9/roles/os9_dns/tests/main.os9.yaml new file mode 100644 index 000000000..28efa0430 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_dns/tests/main.os9.yaml @@ -0,0 +1,40 @@ +--- +# vars file for dellemc.os9.os9_dns, +# below gives a sample configuration +# Sample variables for OS9 device +os9_dns: + domain_lookup: true + name_server: + - ip: + - 3.1.1.1 + - 3.1.1.2 + vrf: + - test + - test1 + - vrf: + - test1 + state: absent + - ip: + - 2.2.2.2 + state: absent + - ip: + - 3.3.2.2 + state: absent + domain_list: + - vrf: + - test + - test1 + state: absent + - name: + - dname3 + - dname4 + - name: + - dname5 + - dname6 + state: absent + - name: + - dname7 + - dname8 + vrf: + - test + - test1
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_dns/tests/test.yaml b/ansible_collections/dellemc/os9/roles/os9_dns/tests/test.yaml new file mode 100644 index 000000000..87942483d --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_dns/tests/test.yaml @@ -0,0 +1,5 @@ +--- +- hosts: datacenter + connection: network_cli + roles: + - dellemc.os9.os9_dns
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_dns/vars/main.yml b/ansible_collections/dellemc/os9/roles/os9_dns/vars/main.yml new file mode 100644 index 000000000..e5d083a00 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_dns/vars/main.yml @@ -0,0 +1,2 @@ +--- +# vars file for dellemc.os9.os9_dns
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_ecmp/LICENSE b/ansible_collections/dellemc/os9/roles/os9_ecmp/LICENSE new file mode 100644 index 000000000..2c9b8e1fd --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_ecmp/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/> + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (c) 2020, Dell Inc. All rights reserved. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <https://www.gnu.org/licenses/>. + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + <program> Copyright (c) 2020, Dell Inc. All rights reserved. + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +<https://www.gnu.org/licenses/>. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +<https://www.gnu.org/licenses/why-not-lgpl.html>. diff --git a/ansible_collections/dellemc/os9/roles/os9_ecmp/README.md b/ansible_collections/dellemc/os9/roles/os9_ecmp/README.md new file mode 100644 index 000000000..3c59d11d4 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_ecmp/README.md @@ -0,0 +1,89 @@ +ECMP role +========= + +This role facilitates the configuration of equal cost multi-path (ECMP), and it supports the configuration of ECMP for IPv4. This role is abstracted for Dell EMC PowerSwitch platforms running Dell EMC OS9. + +The ECMP role requires an SSH connection for connectivity to a Dell EMC OS9 device. You can use any of the built-in OS connection variables. + +Role variables +-------------- + +- Role is abstracted using the `ansible_network_os` variable that can take the dellemc.os9.os9 as a value +- If `os9_cfg_generate` is set to true, the variable generates the role configuration commands in a file +- Any role variable with a corresponding state variable set to absent negates the configuration of that variable +- Setting an empty value for any variable negates the corresponding configuration +- Variables and values are case-sensitive + +**os9_ecmp keys** + +| Key | Type | Description | Support | +|------------|---------------------------|---------------------------------------------------------|-----------------------| +| ``weighted_ecmp`` | boolean: true,false | Configures weighted ECMP | os9 | +| ``ecmp_group_max_paths`` | integer | Configures the number of maximum-paths per ecmp-group | os9 | +| ``ecmp_group_path_fallback`` | boolean: true,false | Configures ECMP group path management | os9 | +| ``ecmp <group id>`` | dictionary | Configures ECMP group (see ``ecmp <group id>.*``) | os9 | +| ``ecmp <group id>.interface`` | list | Configures interface into an ECMP group | os9 | +| ``ecmp <group id>.link_bundle_monitor`` | boolean: true,false | Configures link-bundle monitoring | os9 | +| ``ecmp <group id>.state`` | string: present\*,absent | Deletes the ECMP group if set to absent | os9 | + +Connection variables +-------------------- + +Ansible Dell EMC network roles require connection information to establish communication with the nodes in your inventory. This information can exist in the Ansible *group_vars* or *host_vars* directories or inventory, or in the playbook itself. + +| Key | Required | Choices | Description | +|-------------|----------|------------|-----------------------------------------------------| +| ``ansible_host`` | yes | | Specifies the hostname or address for connecting to the remote device over the specified transport | +| ``ansible_port`` | no | | Specifies the port used to build the connection to the remote device; if value is unspecified, the `ANSIBLE_REMOTE_PORT` option is used; it defaults to 22 | +| ``ansible_ssh_user`` | no | | Specifies the username that authenticates the CLI login for the connection to the remote device; if value is unspecified, the `ANSIBLE_REMOTE_USER` environment variable value is used | +| ``ansible_ssh_pass`` | no | | Specifies the password that authenticates the connection to the remote device. | +| ``ansible_become`` | no | yes, no\* | Instructs the module to enter privileged mode on the remote device before sending any commands; if value is unspecified, the `ANSIBLE_BECOME` environment variable value is used, and the device attempts to execute all commands in non-privileged mode | +| ``ansible_become_method`` | no | enable, sudo\* | Instructs the module to allow the become method to be specified for handling privilege escalation; if value is unspecified, the `ANSIBLE_BECOME_METHOD` environment variable value is used | +| ``ansible_become_pass`` | no | | Specifies the password to use if required to enter privileged mode on the remote device; if ``ansible_become`` is set to no this key is not applicable | +| ``ansible_network_os`` | yes | os9, null\* | Loads the correct terminal and cliconf plugins to communicate with the remote device | + +> **NOTE**: Asterisk (\*) denotes the default value if none is specified. + +Example playbook +---------------- + +This example uses the *os9_ecmp* role to configure ECMP for IPv4. The example creates a *hosts* file with the switch details and corresponding variables. The hosts file should define the `ansible_network_os` variable with the corresponding Dell EMC OS9 name. + +When `os9_cfg_generate` is set to true, the variable generates the configuration commands as a .part file in *build_dir* path. By default, the variable is set to false. The example writes a simple playbook that only references the *os9_ecmp* role. The sample *host_vars* is provided for OS9 only. + +**Sample hosts file** + + leaf1 ansible_host= <ip_address> + +**Sample host_vars/leaf1** + + hostname: leaf1 + ansible_become: yes + ansible_become_method: xxxxx + ansible_become_pass: xxxxx + ansible_ssh_user: xxxxx + ansible_ssh_pass: xxxxx + ansible_network_os: dellemc.os9.os9 + build_dir: ../temp/os9 + os9_ecmp: + ecmp 1: + interface: + - fortyGigE 1/49 + - fortyGigE 1/51 + link_bundle_monitor: true + state: present + weighted_ecmp: true + ecmp_group_max_paths: 3 + ecmp_group_path_fallback: true + +**Simple playbook to setup system — leaf.yaml** + + - hosts: leaf1 + roles: + - dellemc.os9.os9_ecmp + +**Run** + + ansible-playbook -i hosts leaf.yaml + +(c) 2020 Dell Inc. or its subsidiaries. All rights reserved. diff --git a/ansible_collections/dellemc/os9/roles/os9_ecmp/defaults/main.yml b/ansible_collections/dellemc/os9/roles/os9_ecmp/defaults/main.yml new file mode 100644 index 000000000..8c84dde39 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_ecmp/defaults/main.yml @@ -0,0 +1,2 @@ +--- +# defaults file for dellemc.os9.os9_ecmp
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_ecmp/handlers/main.yml b/ansible_collections/dellemc/os9/roles/os9_ecmp/handlers/main.yml new file mode 100644 index 000000000..99b79b666 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_ecmp/handlers/main.yml @@ -0,0 +1,2 @@ +--- +# handlers file for dellemc.os9.os9_ecmp
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_ecmp/meta/main.yml b/ansible_collections/dellemc/os9/roles/os9_ecmp/meta/main.yml new file mode 100644 index 000000000..2f355abce --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_ecmp/meta/main.yml @@ -0,0 +1,17 @@ +# Copyright (c) 2020 Dell Inc. +--- +galaxy_info: + author: Dell EMC Networking Engineering + description: The os9_ecmp role facilitates the configuration of ECMP group attributes in devices running Dell EMC Networking Operating Systems. + license: GPLv3 + min_ansible_version: 2.9.6 + + platforms: + - name: os9 + + galaxy_tags: + - networking + - dell + - emc + - dellemc + - os9 diff --git a/ansible_collections/dellemc/os9/roles/os9_ecmp/tasks/main.yml b/ansible_collections/dellemc/os9/roles/os9_ecmp/tasks/main.yml new file mode 100644 index 000000000..0ffec8d6e --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_ecmp/tasks/main.yml @@ -0,0 +1,17 @@ +--- +# tasks file for os9 + + - name: "Generating ECMP configuration for os9" + template: + src: os9_ecmp.j2 + dest: "{{ build_dir }}/ecmp9_{{ hostname }}.conf.part" + when: (ansible_network_os is defined and ansible_network_os == "dellemc.os9.os9") and ((os9_cfg_generate | default('False')) | bool) +# notify: save config os9 + register: generate_output + + - name: "Provisioning ECMP configuration for os9" + dellemc.os9.os9_config: + src: os9_ecmp.j2 + when: (ansible_network_os is defined and ansible_network_os == "dellemc.os9.os9") +# notify: save config os9 + register: output diff --git a/ansible_collections/dellemc/os9/roles/os9_ecmp/templates/os9_ecmp.j2 b/ansible_collections/dellemc/os9/roles/os9_ecmp/templates/os9_ecmp.j2 new file mode 100644 index 000000000..051764678 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_ecmp/templates/os9_ecmp.j2 @@ -0,0 +1,62 @@ +#jinja2: trim_blocks: True,lstrip_blocks: True +{#################################### +Purpose: +Configure ECMP commands for os9 devices +os9_ecmp: + weighted_ecmp: true + ecmp_group_max_paths: 3 + ecmp_group_path_fallback: true + ecmp 1: + interface: + - fortyGigE 1/49 + - fortyGigE 1/51 + link_bundle_monitor: true + state: present +#####################################} +{% if os9_ecmp is defined and os9_ecmp %} + {% if os9_ecmp.weighted_ecmp is defined %} + {% if os9_ecmp.weighted_ecmp %} +ip ecmp weighted + {% else %} +no ip ecmp weighted + {% endif %} + {% endif %} + {% if os9_ecmp.ecmp_group_max_paths is defined %} + {% if os9_ecmp.ecmp_group_max_paths %} +ip ecmp-group maximum-paths {{ os9_ecmp.ecmp_group_max_paths }} + {% else %} +no ip ecmp-group maximum-paths 2 + {% endif %} + {% endif %} + {% if os9_ecmp.ecmp_group_path_fallback is defined %} + {% if os9_ecmp.ecmp_group_path_fallback %} +ip ecmp-group path-fallback + {% else %} +no ip ecmp-group path-fallback + {% endif %} + {% endif %} + + {% for key in os9_ecmp.keys() %} + {% if " " in key %} + {% set ecmp_vars = os9_ecmp[key] %} + {% set group_num = key.split(" ") %} + {% if ecmp_vars.state is defined and ecmp_vars.state == "absent" %} +no ecmp-group {{ group_num[1] }} + {% else %} +ecmp-group {{ group_num[1] }} + {% if ecmp_vars.interface is defined and ecmp_vars.interface %} + {% for intf in ecmp_vars.interface %} + interface {{ intf }} + {% endfor %} + {% endif %} + {% if ecmp_vars.link_bundle_monitor is defined %} + {% if ecmp_vars.link_bundle_monitor %} + link-bundle-monitor enable + {% else %} + no link-bundle-monitor enable + {% endif %} + {% endif %} + {% endif %} + {% endif %} + {% endfor %} +{% endif %}
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_ecmp/tests/inventory.yaml b/ansible_collections/dellemc/os9/roles/os9_ecmp/tests/inventory.yaml new file mode 100644 index 000000000..5fd33c945 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_ecmp/tests/inventory.yaml @@ -0,0 +1,20 @@ +spine1 ansible_host=100.94.210.44 +spine2 ansible_host=10.11.182.26 +leaf1 ansible_host=10.11.182.27 +leaf2 ansible_host=10.11.182.28 +leaf3 ansible_host=10.11.182.29 +leaf4 ansible_host=10.11.182.30 + +[spine] +spine1 +spine2 + +[leaf] +leaf1 +leaf2 +leaf3 +leaf4 + +[datacenter:children] +spine +leaf diff --git a/ansible_collections/dellemc/os9/roles/os9_ecmp/tests/main.os9.yaml b/ansible_collections/dellemc/os9/roles/os9_ecmp/tests/main.os9.yaml new file mode 100644 index 000000000..00bb8af60 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_ecmp/tests/main.os9.yaml @@ -0,0 +1,14 @@ +--- +# vars file for dellemc.os9.os9_ecmp, +# below gives a sample configuration +# Sample variables for OS9 device +os9_ecmp: + ecmp 1: + interface: + - fortyGigE 1/49 + - fortyGigE 1/51 + link_bundle_monitor: true + state: present + weighted_ecmp: true + ecmp_group_max_paths: 3 + ecmp_group_path_fallback: true
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_ecmp/tests/test.yaml b/ansible_collections/dellemc/os9/roles/os9_ecmp/tests/test.yaml new file mode 100644 index 000000000..6c4fea5e6 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_ecmp/tests/test.yaml @@ -0,0 +1,5 @@ +--- +- hosts: datacenter + connection: network_cli + roles: + - dellemc.os9.os9_ecmp
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_ecmp/vars/main.yml b/ansible_collections/dellemc/os9/roles/os9_ecmp/vars/main.yml new file mode 100644 index 000000000..532506f05 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_ecmp/vars/main.yml @@ -0,0 +1,3 @@ + +--- +# vars file for dellemc.os9.os9_ecmp
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_interface/LICENSE b/ansible_collections/dellemc/os9/roles/os9_interface/LICENSE new file mode 100644 index 000000000..2c9b8e1fd --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_interface/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/> + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (c) 2020, Dell Inc. All rights reserved. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <https://www.gnu.org/licenses/>. + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + <program> Copyright (c) 2020, Dell Inc. All rights reserved. + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +<https://www.gnu.org/licenses/>. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +<https://www.gnu.org/licenses/why-not-lgpl.html>. diff --git a/ansible_collections/dellemc/os9/roles/os9_interface/README.md b/ansible_collections/dellemc/os9/roles/os9_interface/README.md new file mode 100644 index 000000000..0597e069d --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_interface/README.md @@ -0,0 +1,173 @@ +Interface role +============== + +This role facilitates the configuration of interface attributes. It supports the configuration of admin state, description, MTU, IP address, IP helper, suppress_ra and port mode. This role is abstracted for Dell EMC PowerSwitch platforms running Dell EMC OS9. + +The interface role requires an SSH connection for connectivity to a Dell EMC OS9 device. You can use any of the built-in OS connection variables. + +Role variables +-------------- + +- Role is abstracted using the `ansible_network_os` variable that can take `dellemc.os9.os9` as the value +- If `os9_cfg_generate` is set to true, the variable generates the role configuration commands in a file +- Any role variable with a corresponding state variable setting to absent negates the configuration of that variable +- Setting an empty value for any variable negates the corresponding configuration +- `os9_interface` (dictionary) holds a dictionary with the interface name; interface name can correspond to any of the valid OS interfaces with the unique interface identifier name +- For physical interfaces, the interface name must be in *<interfacename> <tuple>* format; for logical interfaces, the interface must be in *<logical_interfacename> <id>* format; physical interface name can be *fortyGigE 1/1* +- For interface ranges, the interface name must be in *range <interface_type> <node/slot/port[:subport]-node/slot/port[:subport]>* format; +- Logical interface names can be *vlan 1* or *port-channel 1* +- Variables and values are case-sensitive + +> **NOTE**: Only define supported variables for the interface type. For example, do not define the *switchport* variable for a logical interface, and do not configure port mode when *switchport* is present in OS9 devices. + +**interface name keys** + +| Key | Type | Description | Support | +|------------|---------------------------|---------------------------------------------------------|-----------------------| +| ``desc`` | string | Configures a single line interface description | os9 | +| ``portmode`` | string | Configures port-mode according to the device type | access and trunk, os9 (hybrid) | +| ``switchport`` | boolean: true,false\* | Configures an interface in L2 mode | os9 | +| ``admin`` | string: up,down\* | Configures the administrative state for the interface; configuring the value as administratively "up" enables the interface; configuring the value as administratively "down" disables the interface | os9 | +| ``mtu`` | integer | Configures the MTU size for L2 and L3 interfaces (594 to 12000; 1280 to 65535 to set globally) | os9 | +| ``fanout`` | string:dual, single, quad (os9); string:10g-4x, 40g-1x, 25g-4x, 100g-1x, 50g-2x) | Configures fanout to the appropriate value | os9 | +| ``fanout_speed`` | string: 10G, 25G, 40G, 50G | Configures speed for the fanout port based on the fanout mode specified | os9 | +| ``fanout_state`` | string: present, absent* | Configures the fanout mode to a port if state is set to present | os9 | +| ``keepalive`` | boolean: true,false | Configures keepalive on the port if set to true | os9 | +| ``speed`` | string:10,100,1000,auto | Configures interface speed parameters | os9 | +| ``duplex`` | string: full,half | Configures interface duplex parameters | os9 | +| ``auto_neg`` | boolean: true,false | Configures auto-negotiation mode if set to true | os9 | +| ``cr4_auto_neg`` | boolean: true,false | Configures auto-negotiation mode on a CR4 interface type if set to true | os9 | +| ``suppress_ra`` | string; present,absent | Configures IPv6 router advertisements if set to present | os9 | +| ``ip_type_dynamic`` | boolean: true,false | Configures IP address DHCP if set to true (*ip_and_mask* is ignored if set to true) | os9 | +| ``ipv6_type_dynamic`` | boolean: true,false | Configures an IPv6 address for DHCP if set to true (*ipv6_and_mask* is ignored if set to true) | +| ``ipv6_autoconfig`` | boolean: true,false | Configures stateless configuration of IPv6 addresses if set to true (*ipv6_and_mask* is ignored if set to true) | +| ``class_vendor_identifier`` | string: present,absent,string | Configures the vendor-class identifier without a user-defined string if set to present; configures a vendor-class identifier with a user-defined string when a string is specified; ignored when *ip_type_dynamic* is set to false | os9 | +| ``option82`` | boolean: true,false\* | Configures option82 with the remote-id MAC address if *remote_id* is undefined; ignored when *ip_type_dynamic* is set to false | os9 | +| ``remote_id`` |string: hostname,mac,string | Configures option82 with the specified *remote-id*; ignored when *option82* is set to false | os9 | +| ``vrf`` | string | Configures the specified VRF to be associated to the interface | os9 | +| ``min_ra`` | string | Configures RA minimum interval time period | os9 | +| ``max_ra`` | string | Configures RA maximum interval time period | os9 | +| ``ip_and_mask`` | string | Configures the specified IP address to the interface; configures the specified IP address to the interface VLAN on devices (192.168.11.1/24 format) | os9 | +| ``ip_and_mask_secondary`` | string | Configures the specified IP address as secondary address to the interface on os9 an devices (192.168.11.2/24 format) | os9 | +| ``ip_virtual_gateway_ip`` | string | Configures an anycast gateway IP address for a VxLAN virtual network | +| ``secondary_ip_state`` | string: absent,present\* | Deletes the secondary IP address if set to absent | os9 | +| ``ipv6_and_mask`` | string | Configures a specified IPv6 address to the interface; configures a specified IP address to the interface VLAN on devices (2001:4898:5808:ffa2::1/126 format) | os9 | +| ``state_ipv6`` | string: absent,present\* | Deletes the IPV6 address if set to absent | +| ``ipv6_reachabletime`` | integer | Configures the reachability time for IPv6 neighbor discovery (0 to 3600000) | os9 | +| ``ip_helper`` | list | Configures DHCP server address objects (see ``ip_helper.*``) | os9 | +| ``ip_helper.ip`` | string (required) | Configures the IPv4 address of the DHCP server (A.B.C.D format) | os9 | +| ``ip_helper.state`` | string: absent,present\* | Deletes the IP helper address if set to absent | os9 | + +> **NOTE**: Asterisk (*) denotes the default value if none is specified. + +Connection variables +-------------------- + +Ansible Dell EMC network roles require connection information to establish communication with the nodes in your inventory. This information can exist in the Ansible *group_vars* or *host_vars* directories or inventory, or in the playbook itself. + +| Key | Required | Choices | Description | +|-------------|----------|------------|-----------------------------------------------------| +| ``ansible_host`` | yes | | Specifies the hostname or address for connecting to the remote device over the specified transport | +| ``ansible_port`` | no | | Specifies the port used to build the connection to the remote device; if value is unspecified, the `ANSIBLE_REMOTE_PORT` option is used; it defaults to 22 | +| ``ansible_ssh_user`` | no | | Specifies the username that authenticates the CLI login for the connection to the remote device; if value is unspecified, the` ANSIBLE_REMOTE_USER` environment variable value is used | +| ``ansible_ssh_pass`` | no | | Specifies the password that authenticates the connection to the remote device | +| ``ansible_become`` | no | yes, no\* | Instructs the module to enter privileged mode on the remote device before sending any commands; if value is unspecified, the `ANSIBLE_BECOME` environment variable value is used, and the device attempts to execute all commands in non-privileged mode | +| ``ansible_become_method`` | no | enable, sudo\* | Instructs the module to allow the become method to be specified for handling privilege escalation; if value is unspecified, the `ANSIBLE_BECOME_METHOD` environment variable value is used | +| ``ansible_become_pass`` | no | | Specifies the password to use if required to enter privileged mode on the remote device; if ``ansible_become`` is set to no this key is not applicable | +| ``ansible_network_os`` | yes | /os9, null\* | Loads the correct terminal and cliconf plugins to communicate with the remote device | + +> **NOTE**: Asterisk (*) denotes the default value if none is specified. + +Example playbook +---------------- + +This example uses the *os9_interface* role to set up description, MTU, admin status, portmode, and switchport details for an interface. The example creates a *hosts* file with the switch details and corresponding variables. The hosts file should define the `ansible_network_os` variable with corresponding Dell EMC OS9 name. + +When `os9_cfg_generate` is set to true, the variable generates the configuration commands as a .part file in *build_dir* path. By default, this variable is set to false. The example writes a simple playbook that only references the *os9_interface* role. + +**Sample hosts file** + + leaf3 ansible_host= <ip_address> + +**Sample host_vars/leaf3** + + hostname: "leaf3" + ansible_become: yes + ansible_become_method: xxxxx + ansible_become_pass: xxxxx + ansible_ssh_user: xxxxx + ansible_ssh_pass: xxxxx + ansible_network_os: dellemc.os9.os9 + build_dir: ../temp/os9 + + os9_interface: + TenGigabitEthernet 1/8: + desc: "Connected to Spine1" + portmode: + switchport: False + mtu: 2500 + admin: up + auto_neg: true + speed: auto + duplex: full + keepalive: true + ipv6_and_mask: 2001:4898:5808:ffa2::5/126 + suppress_ra : present + ip_type_dynamic: true + ip_and_mask: 192.168.23.22/24 + class_vendor_identifier: present + option82: true + remote_id: hostname + fortyGigE 1/9: + desc: "Connected to Spine2" + switchport: False + mtu: 2500 + admin: up + cr4_auto_neg: true + ip_and_mask: 192.168.234.20/31 + ip_and_mask_secondary: "192.168.234.21/31" + secondary_ip_state: present + suppress_ra: absent + ip_type_dynamic: false + class_vendor_identifier: absent + option82: true + remote_id: hostname + ipv6_and_mask: 2001:4898:5808:ffa2::9/126 + flowcontrol: + mode: "receive" + enable: "on" + state: "present" + vlan 100: + mtu: 4096 + admin: down + ip_and_mask: + ipv6_and_mask: 2002:4898:5408:faaf::1/64 + suppress_ra: present + state_ipv6: absent + ip_helper: + - ip: 10.0.0.36 + state: absent + ipv6_reachabletime: 600000 + virtual-network 888: + vrf: "green" + desc: "virtual-network interface" + ip_and_mask: "172.17.17.251/24" + ip_virtual_gateway_ip: "172.17.17.1" + admin: up + vlan 20: + suppress_ra: absent + min_ra: 3 + max_ra: 4 + admin: up + +**Simple playbook to setup system — leaf.yaml** + + - hosts: leaf3 + roles: + - dellemc.os9.os9_interface + +**Run** + + ansible-playbook -i hosts leaf.yaml + +(c) 2017-2020 Dell Inc. or its subsidiaries. All rights reserved. diff --git a/ansible_collections/dellemc/os9/roles/os9_interface/defaults/main.yml b/ansible_collections/dellemc/os9/roles/os9_interface/defaults/main.yml new file mode 100644 index 000000000..7c8c24e04 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_interface/defaults/main.yml @@ -0,0 +1,2 @@ +--- +# defaults file for dellemc.os9.os9_interface
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_interface/handlers/main.yml b/ansible_collections/dellemc/os9/roles/os9_interface/handlers/main.yml new file mode 100644 index 000000000..617eb3fcd --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_interface/handlers/main.yml @@ -0,0 +1,2 @@ +--- +# handlers file for dellemc.os9.os9_interface
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_interface/meta/main.yml b/ansible_collections/dellemc/os9/roles/os9_interface/meta/main.yml new file mode 100644 index 000000000..ff7e1baaf --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_interface/meta/main.yml @@ -0,0 +1,18 @@ +# Copyright (c) 2017-2020 Dell Inc. or its subsidiaries. All Rights Reserved. +--- +galaxy_info: + author: Dell EMC Networking Engineering + description: The os9_interface role facilitates the configuration of interface attributes in devices running Dell EMC Networking Operating Systems. + company: Dell Inc + license: GPLv3 + min_ansible_version: 2.9.6 + + platforms: + - name: os9 + + galaxy_tags: + - networking + - dell + - emc + - dellemc + - os9
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_interface/tasks/main.yml b/ansible_collections/dellemc/os9/roles/os9_interface/tasks/main.yml new file mode 100644 index 000000000..4301ea42d --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_interface/tasks/main.yml @@ -0,0 +1,16 @@ +--- +# tasks file for os9 + - name: "Generating interface configuration for os9" + template: + src: os9_interface.j2 + dest: "{{ build_dir }}/intf9_{{ hostname }}.conf.part" + when: (ansible_network_os is defined and ansible_network_os== "dellemc.os9.os9") and (os9_cfg_generate | default('False') | bool) +# notify: save config os9 + register: generate_output + + - name: "Provisioning interface configuration for os9" + dellemc.os9.os9_config: + src: os9_interface.j2 + when: (ansible_network_os is defined and ansible_network_os == "dellemc.os9.os9") +# notify: save config os9 + register: output diff --git a/ansible_collections/dellemc/os9/roles/os9_interface/templates/os9_interface.j2 b/ansible_collections/dellemc/os9/roles/os9_interface/templates/os9_interface.j2 new file mode 100644 index 000000000..2a98c850f --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_interface/templates/os9_interface.j2 @@ -0,0 +1,237 @@ +#jinja2: trim_blocks: True,lstrip_blocks: True +{################################################### +Purpose: +Configure interface commands for os9 Devices. +os9_interface: + TenGigabitEthernet 1/36: + desc: "OS9 intf" + portmode: hybrid + mtu: 2000 + switchport: False + admin: up + auto_neg: true + keepalive: true + ip_and_mask: "192.168.13.1/24" + ip_and_mask_secondary: "192.168.14.1/24" + secondary_ip_state: present + suppress_ra: present + ip_type_dynamic: true + ipv6_and_mask: 2001:4898:5808:ffa2::9/126 + ipv6_reachabletime: 60000 + ip_helper: + - ip: 10.0.0.33 + state: present + class_vendor_identifier: present + option82: true + remote_id: hostname + speed: auto + duplex: half + fortyGigE 1/1: + fanout: single + fanout_speed: 40G + fanout_state: present + fortyGigE 0/8: + cr4_auto_neg: true +####################################################} +{% if os9_interface is defined and os9_interface %} +{% for key in os9_interface.keys() %} + {% set intf_vars = os9_interface[key] %} + {% set intf = key.split(" ") %} + {% set port = intf[1].split('/') %} + {% if intf_vars.fanout is defined %} + {% if intf_vars.fanout %} + {% if intf_vars.fanout_state is defined and intf_vars.fanout_state == "present" %} + {% if intf_vars.fanout_speed is defined and intf_vars.fanout_speed %} +stack-unit {{ port[0] }} port {{ port[1] }} portmode {{ intf_vars.fanout}} speed {{ intf_vars.fanout_speed }} no-confirm + {% else %} +stack-unit {{ port[0] }} port {{ port[1] }} portmode {{ intf_vars.fanout }} no-confirm + {% endif %} + {% else %} +no stack-unit {{ port[0] }} port {{ port[1] }} portmode {{ intf_vars.fanout }} no-confirm + {% endif %} + {% endif %} + {% endif %} +{% endfor %} +{% for key in os9_interface.keys() %} +{% set intf_vars = os9_interface[key] %} +{% set intf = key.split(" ") %} +{% set port = intf[1].split('/') %} + {% if (intf_vars.fanout is defined and not intf_vars.fanout) or (intf_vars.fanout is not defined)%} +interface {{ key }} + {% if intf_vars.desc is defined %} + {% if intf_vars.desc %} + description {{ intf_vars.desc }} + {% else %} + no description + {% endif %} + {% endif %} + + {% if intf_vars.portmode is defined %} + {% if intf_vars.switchport is defined and intf_vars.switchport == False %} + no switchport + {% endif %} + {% if intf_vars.portmode %} + portmode {{ intf_vars.portmode}} + {% else %} + no portmode hybrid + {% endif %} + {% endif %} + + {% if intf_vars.switchport is defined %} + {% if intf_vars.switchport == True %} + switchport + {% endif %} + {% if intf_vars.portmode is not defined %} + {% if intf_vars.switchport is defined and intf_vars.switchport == False %} + no switchport + {% endif %} + {% endif %} + {% endif %} + + {% if intf_vars.mtu is defined %} + {% if intf_vars.mtu %} + mtu {{ intf_vars.mtu }} + {% else %} + no mtu + {% endif %} + {% endif %} + + {% if intf_vars.keepalive is defined %} + {% if intf_vars.keepalive %} + keepalive + {% else %} + no keepalive + {% endif %} + {% endif %} + + {% if intf_vars.speed is defined %} + {% if intf_vars.speed %} + speed {{ intf_vars.speed }} + {% else %} + no speed + {% endif %} + {% endif %} + + {% if intf_vars.duplex is defined %} + {% if intf_vars.duplex %} + duplex {{ intf_vars.duplex }} + {% else %} + no duplex + {% endif %} + {% endif %} + + {% if intf_vars.auto_neg is defined %} + {% if intf_vars.auto_neg %} + negotiation auto + {% else %} + no negotiation auto + {% endif %} + {% endif %} + + {% if intf_vars.cr4_auto_neg is defined %} + {% if intf_vars.cr4_auto_neg %} + intf-type cr4 autoneg + {% else %} + no intf-type cr4 autoneg + {% endif %} + {% endif %} + + {% if intf_vars.suppress_ra is defined %} + {% if intf_vars.suppress_ra == "present" %} + ipv6 nd suppress-ra + {% else %} + no ipv6 nd suppress-ra + {% endif %} + {% endif %} + + {% if intf_vars.ip_type_dynamic is defined and intf_vars.ip_type_dynamic %} + {% if intf_vars.class_vendor_identifier is defined and intf_vars.class_vendor_identifier == "present" %} + {% if intf_vars.option82 is defined and intf_vars.option82 %} + {% if intf_vars.remote_id is defined and intf_vars.remote_id %} + ip address dhcp vendor-class-identifier relay information-option remote-id {{ intf_vars.remote_id }} + {% else %} + ip address dhcp relay information-option vendor-class-identifier + {% endif %} + {% else %} + ip address dhcp vendor-class-identifier + {% endif %} + + {% elif intf_vars.class_vendor_identifier is defined and (intf_vars.class_vendor_identifier|length >1 and not intf_vars.class_vendor_identifier == "absent") %} + {% if intf_vars.option82 is defined and intf_vars.option82 %} + {% if intf_vars.remote_id is defined and intf_vars.remote_id %} + ip address dhcp relay information-option remote-id {{ intf_vars.remote_id }} vendor-class-identifier {{ intf_vars.class_vendor_identifier }} + {% else %} + ip address dhcp relay information-option vendor-class-identifier {{ intf_vars.class_vendor_identifier }} + {% endif %} + {% else %} + ip address dhcp vendor-class-identifier {{ intf_vars.class_vendor_identifier }} + {% endif %} + + {% else %} + {% if intf_vars.option82 is defined and intf_vars.option82 %} + {% if intf_vars.remote_id is defined and intf_vars.remote_id %} + ip address dhcp relay information-option remote-id {{ intf_vars.remote_id }} + {% else %} + ip address dhcp relay information-option + {% endif %} + {% else %} + ip address dhcp + {% endif %} + {% endif %} + {% else %} + {% if intf_vars.ip_and_mask is defined %} + {% if intf_vars.ip_and_mask %} + ip address {{ intf_vars.ip_and_mask }} + {% else %} + no ip address + {% endif %} + {% endif %} + {% if intf_vars.ip_and_mask_secondary is defined and intf_vars.ip_and_mask_secondary %} + {% if intf_vars.secondary_ip_state is defined and intf_vars.secondary_ip_state == "absent" %} + no ip address {{ intf_vars.ip_and_mask_secondary }} secondary + {% else %} + ip address {{ intf_vars.ip_and_mask_secondary }} secondary + {% endif %} + {% endif %} + {% endif %} + + + {% if intf_vars.ipv6_and_mask is defined %} + {% if intf_vars.ipv6_and_mask %} + ipv6 address {{ intf_vars.ipv6_and_mask }} + {% else %} + no ipv6 address + {% endif %} + {% endif %} + + {% if intf_vars.ipv6_reachabletime is defined %} + {% if intf_vars.ipv6_reachabletime %} + ipv6 nd reachable-time {{ intf_vars.ipv6_reachabletime }} + {% else %} + no ipv6 nd reachable-time + {% endif %} + {% endif %} + + {% if intf_vars.ip_helper is defined and intf_vars.ip_helper %} + {% for helper in intf_vars.ip_helper %} + {% if helper.ip is defined and helper.ip %} + {% if helper.state is defined and helper.state == "absent" %} + no ip helper-address {{ helper.ip }} + {% else %} + ip helper-address {{ helper.ip }} + {% endif %} + {% endif %} + {% endfor %} + {% endif %} + + {% if intf_vars.admin is defined %} + {% if intf_vars.admin == "up" %} + no shutdown + {% elif intf_vars.admin == "down" %} + shutdown + {% endif %} + {% endif %} + + {% endif %} +{% endfor %} +{% endif %}
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_interface/tests/inventory.yaml b/ansible_collections/dellemc/os9/roles/os9_interface/tests/inventory.yaml new file mode 100644 index 000000000..5fd33c945 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_interface/tests/inventory.yaml @@ -0,0 +1,20 @@ +spine1 ansible_host=100.94.210.44 +spine2 ansible_host=10.11.182.26 +leaf1 ansible_host=10.11.182.27 +leaf2 ansible_host=10.11.182.28 +leaf3 ansible_host=10.11.182.29 +leaf4 ansible_host=10.11.182.30 + +[spine] +spine1 +spine2 + +[leaf] +leaf1 +leaf2 +leaf3 +leaf4 + +[datacenter:children] +spine +leaf diff --git a/ansible_collections/dellemc/os9/roles/os9_interface/tests/main.os9.yaml b/ansible_collections/dellemc/os9/roles/os9_interface/tests/main.os9.yaml new file mode 100644 index 000000000..790233814 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_interface/tests/main.os9.yaml @@ -0,0 +1,50 @@ +--- +# vars file for dellemc.os9.os9_interface +# Sample variables for OS9 device +os9_interface: + TenGigabitEthernet 1/3: + desc: "Connected to Spine1" + portmode: + switchport: False + suppress_ra: present + mtu: 2500 + admin: up + auto_neg: true + keepalive: true + speed: auto + duplex: full + ipv6_and_mask: 2001:4898:5808:ffa2::5/126 + ip_type_dynamic: true + ip_and_mask: 192.168.23.22/24 + class_vendor_identifier: present + option82: true + remote_id: hostname + fortyGigE 1/9: + desc: "Connected to Spine2" + switchport: False + mtu: 2500 + admin: up + ip_and_mask: 192.168.234.20/31 + ip_and_mask_secondary: "192.168.14.1/24" + secondary_ip_state: present + cr4_auto_neg: true + keepalive: false + ip_type_dynamic: false + class_vendor_identifier: absent + option82: true + remote_id: hostname + ipv6_and_mask: 2001:4898:5808:ffa2::9/126 + fortyGigE 1/12: + fanout: single + fanout_speed: 40G + fanout_state: present + Vlan 100: + mtu: 4096 + admin: down + ip_and_mask: + ipv6_and_mask: 2002:4898:5408:faaf::1/64 + state_ipv6: absent + ip_helper: + - ip: 10.0.0.36 + state: absent + ipv6_reachabletime: 600000
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_interface/tests/test.yaml b/ansible_collections/dellemc/os9/roles/os9_interface/tests/test.yaml new file mode 100644 index 000000000..7663d9365 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_interface/tests/test.yaml @@ -0,0 +1,5 @@ +--- +- hosts: datacenter + connection: network_cli + roles: + - dellemc.os9.os9_interface
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_interface/vars/main.yml b/ansible_collections/dellemc/os9/roles/os9_interface/vars/main.yml new file mode 100644 index 000000000..35ddaae4f --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_interface/vars/main.yml @@ -0,0 +1,2 @@ +--- +# vars file for dellemc.os9.os9_interface
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_lag/LICENSE b/ansible_collections/dellemc/os9/roles/os9_lag/LICENSE new file mode 100644 index 000000000..2c9b8e1fd --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_lag/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/> + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (c) 2020, Dell Inc. All rights reserved. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <https://www.gnu.org/licenses/>. + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + <program> Copyright (c) 2020, Dell Inc. All rights reserved. + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +<https://www.gnu.org/licenses/>. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +<https://www.gnu.org/licenses/why-not-lgpl.html>. diff --git a/ansible_collections/dellemc/os9/roles/os9_lag/README.md b/ansible_collections/dellemc/os9/roles/os9_lag/README.md new file mode 100644 index 000000000..19aa5f346 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_lag/README.md @@ -0,0 +1,110 @@ +LAG role +======== + +This role facilitates the configuration of link aggregation group (LAG) attributes, and supports the creation and deletion of a LAG and its member ports. It also supports the configuration of an interface type as a static or dynamic LAG and minimum required link. This role is abstracted for Dell EMC PowerSwitch platforms running Dell EMC OS9. + +The LAG role requires an SSH connection for connectivity to a Dell EMC OS9 device. You can use any of the built-in OS connection variables. + +Role variables +-------------- + +- Role is abstracted using the `ansible_network_os` variable that can take `dellemc.os9.os9` as the value +- Object drives the tasks in this role +- `os9_lag` (dictionary) contains the hostname (dictionary) +- Hostname is the value of the *hostname* variable that corresponds to the name of the OS device +- Any role variable with a corresponding state variable setting to absent negates the configuration of that variable +- Setting an empty value to any variable negates the corresponding configuration +- `os9_lag` (dictionary) holds a dictionary with the port-channel ID key in `Po <ID>` format (1 to 4096) +- Variables and values are case-sensitive + +**port-channel ID keys** + +| Key | Type | Description | Support | +|------------|---------------------------|---------------------------------------------------------|-----------------------| +| ``type`` | string: static,dynamic | Configures the interface either as a static or dynamic LAG | os9 | +| ``min_links`` | integer | Configures the minimum number of links in the LAG that must be in *operup* status (1 to 64 for os9) | os9 | +| ``lacp`` | dictionary | Specifies LACP fast-switchover or long timeout options | os9 | +| ``lacp.fast_switchover`` | boolean | Configures the fast-switchover option if set to true | os9 | +| ``lacp.long_timeout`` | boolean | Configures the long-timeout option if set to true | os9 | +| ``lacp_system_priority`` | integer | Configures the LACP system-priority value (1 to 65535) | os9 | +| ``lacp_ungroup_vlt`` | boolean | Configures all VLT LACP members to be switchports if set to true | os9 | +| ``lacp_ungroup`` | list | Specifies the list of port-channels to become switchports (see ``lacp_ungroup.*``) | os9 | +| ``lacp_ungroup.port_channel`` | integer (required) | Specifies valid port-channel numbers | os9 | +| ``lacp_ungroup.state`` | string: present,absent\* | Deletes the ungroup association if set to absent | os9 | +| ``channel_members`` | list | Specifies the list of port members to be associated to the port-channel (see ``channel_members.*``) | os9 | +| ``channel_members.port`` | string | Specifies valid os9 | os9 | +| ``channel_members.state`` | string: absent,present | Deletes the port member association if set to absent | os9 | +| ``state`` | string: absent,present\* | Deletes the LAG corresponding to the port-channel ID if set to absent | os9 | + +> **NOTE**: Asterisk (\*) denotes the default value if none is specified. + +Connection variables +-------------------- + +Ansible Dell EMC network roles require connection information to establish communication with the nodes in your inventory. This information can exist in the Ansible *group_vars* or *host_vars* directories or inventory, or in the playbook itself. + +| Key | Required | Choices | Description | +|-------------|----------|------------|-----------------------------------------------------| +| ``ansible_host`` | yes | | Specifies the hostname or address for connecting to the remote device over the specified transport | +| ``ansible_port`` | no | | Specifies the port used to build the connection to the remote device; if value is unspecified, the `ANSIBLE_REMOTE_PORT` option is used; it defaults to 22 | +| ``ansible_ssh_user`` | no | | Specifies the username that authenticates the CLI login for the connection to the remote device; if value is unspecified, the `ANSIBLE_REMOTE_USER` environment variable value is used | +| ``ansible_ssh_pass`` | no | | Specifies the password that authenticates the connection to the remote device. | +| ``ansible_become`` | no | yes, no\* | Instructs the module to enter privileged mode on the remote device before sending any commands; if value is unspecified, the `ANSIBLE_BECOME` environment variable value is used, and the device attempts to execute all commands in non-privileged mode | +| ``ansible_become_method`` | no | enable, sudo\* | Instructs the module to allow the become method to be specified for handling privilege escalation; if value is unspecified, the `ANSIBLE_BECOME_METHOD` environment variable value is used | +| ``ansible_become_pass`` | no | | Specifies the password to use if required to enter privileged mode on the remote device; if ``ansible_become`` is set to no this key is not applicable | +| ``ansible_network_os`` | yes | os9, null\* | Loads the correct terminal and cliconf plugins to communicate with the remote device | + +> **NOTE**: Asterisk (\*) denotes the default value if none is specified. + +Example playbook +---------------- + +This example uses the *os9_lag* role to setup port channel ID and description, and configures hash algorithm and minimum links for the LAG. Channel members can be configured for the port-channel either in static or dynamic mode. You can also delete the LAG with the port-channel ID or delete the members associated to it. This example creates a *hosts* file with the switch details and corresponding variables. The hosts file should define the `ansible_network_os` variable with corresponding Dell EMC OS9 name. + +When `os9_cfg_generate` is set to true, the variable generates the configuration commands as a .part file in *build_dir* path. By default, the variable is set to false. It writes a simple playbook that only references the *os9_lag* role. + +**Sample hosts file** + + leaf1 ansible_host= <ip_address> + +**Sample host_vars/leaf1** + + hostname: leaf1 + ansible_become: yes + ansible_become_method: xxxxx + ansible_become_pass: xxxxx + ansible_ssh_user: xxxxx + ansible_ssh_pass: xxxxx + ansible_network_os: dellemc.os9.os9 + build_dir: ../temp/os9 + + os9_lag: + Po 127: + type: static + min_links: 3 + lacp: + long_timeout: true + fast_switchover: true + lacp_system_priority: 1 + lacp_ungroup_vlt: true + lacp_ungroup: + - port-channel:1 + state: present + channel_members: + - port: fortyGigE 1/4 + state: present + - port: fortyGigE 1/5 + state: present + state: present + +**Simple playbook to setup system — leaf.yaml** + + - hosts: leaf1 + roles: + - dellemc.os9.os9_lag + +**Run** + + ansible-playbook -i hosts leaf.yaml + +(c) 2017-2020 Dell Inc. or its subsidiaries. All rights reserved. diff --git a/ansible_collections/dellemc/os9/roles/os9_lag/defaults/main.yml b/ansible_collections/dellemc/os9/roles/os9_lag/defaults/main.yml new file mode 100644 index 000000000..bcfbb8974 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_lag/defaults/main.yml @@ -0,0 +1,2 @@ +--- +# defaults file for dellemc.os9.os9_lag
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_lag/handlers/main.yml b/ansible_collections/dellemc/os9/roles/os9_lag/handlers/main.yml new file mode 100644 index 000000000..cddda15cf --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_lag/handlers/main.yml @@ -0,0 +1,2 @@ +--- +# handlers file for dellemc.os9.os9_lag
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_lag/meta/main.yml b/ansible_collections/dellemc/os9/roles/os9_lag/meta/main.yml new file mode 100644 index 000000000..2463cb893 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_lag/meta/main.yml @@ -0,0 +1,18 @@ +# Copyright (c) 2020 Dell Inc. +--- +galaxy_info: + author: Dell EMC Networking Engineering + description: The os9_lag role facilitates the configuration of LAG attributes in devices running Dell EMC Networking Operating Systems. + company: Dell Inc + license: GPLv3 + min_ansible_version: 2.9.6 + + platforms: + - name: os9 + + galaxy_tags: + - networking + - dell + - emc + - dellemc + - os9
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_lag/tasks/main.yml b/ansible_collections/dellemc/os9/roles/os9_lag/tasks/main.yml new file mode 100644 index 000000000..b581b870c --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_lag/tasks/main.yml @@ -0,0 +1,16 @@ +--- +# tasks file for os9 + - name: "Generating LAG configuration for os9" + template: + src: os9_lag.j2 + dest: "{{ build_dir }}/lag9_{{ hostname }}.conf.part" + when: (ansible_network_os is defined and ansible_network_os == "dellemc.os9.os9") and ((os9_cfg_generate | default('False')) | bool) +# notify: save config os9 + register: generate_output + + - name: "Provisioning LAG configuration for os9" + dellemc.os9.os9_config: + src: os9_lag.j2 + when: (ansible_network_os is defined and ansible_network_os == "dellemc.os9.os9") +# notify: save config os9 + register: output diff --git a/ansible_collections/dellemc/os9/roles/os9_lag/templates/os9_lag.j2 b/ansible_collections/dellemc/os9/roles/os9_lag/templates/os9_lag.j2 new file mode 100644 index 000000000..f708efc11 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_lag/templates/os9_lag.j2 @@ -0,0 +1,114 @@ +#jinja2: trim_blocks: True,lstrip_blocks: True +{################################ +Purpose: +Configure LAG commands for os9 Devices. +os9_lag: + Po 1: + type: static + min_links: 3 + lacp: + long_timeout: true + fast_switchover: true + lacp_system_priority: 2 + lacp_ungroup: + - port_channel: 1 + state: present + lacp_ungroup_vlt: true + channel_members: + - port: fortyGigE 0/4 + state: present + state: present + ###############################} +{% if os9_lag is defined and os9_lag %} +{% for key in os9_lag.keys() %} +{% set channel_id = key.split(" ") %} +{% set lag_vars = os9_lag[key] %} + + {% if lag_vars.lacp_system_priority is defined %} + {% if lag_vars.lacp_system_priority %} +lacp system-priority {{ lag_vars.lacp_system_priority }} + {% else %} +no lacp system-priority + {% endif %} + {% endif %} + + {% if lag_vars.lacp_ungroup_vlt is defined %} + {% if lag_vars.lacp_ungroup_vlt %} +lacp ungroup member-independent vlt + {% else %} +no lacp ungroup member-independent vlt + {% endif %} + {% endif %} + + {% if lag_vars.lacp_ungroup is defined %} + {% if lag_vars.lacp_ungroup %} + {% for port in lag_vars.lacp_ungroup %} + {% if port.port_channel is defined and port.port_channel %} + {% if port.state is defined and port.state == "absent" %} +no lacp ungroup member-independent port-channel {{ port.port_channel }} + {% else %} +lacp ungroup member-independent port-channel {{ port.port_channel }} + {% endif %} + {% endif %} + {% endfor %} + {% endif %} + {% endif %} + + {% if lag_vars.state is defined and lag_vars.state == "absent" %} +no interface Port-channel {{ channel_id[1] }} + {% else %} +interface Port-channel {{ channel_id[1] }} + + {% if lag_vars.min_links is defined %} + {% if lag_vars.min_links %} + minimum-links {{ lag_vars.min_links }} + {% else %} + no minimum-links + {% endif %} + {% endif %} + + {% if lag_vars.lacp is defined and lag_vars.lacp %} + {% if lag_vars.lacp.fast_switchover is defined %} + {% if lag_vars.lacp.fast_switchover %} + lacp fast-switchover + {% else %} + no lacp fast-switchover + {% endif %} + {% endif %} + {% if lag_vars.lacp.long_timeout is defined %} + {% if lag_vars.lacp.long_timeout %} + lacp long-timeout + {% else %} + no lacp long-timeout + {% endif %} + {% endif %} + {% endif %} + + {% if lag_vars.channel_members is defined %} + {% for ports in lag_vars.channel_members %} + {% if lag_vars.type is defined and lag_vars.type == "static" %} + {% if ports.port is defined and ports.port %} + {% if ports.state is defined and ports.state == "absent" %} + no channel-member {{ ports.port }} + {% else %} + channel-member {{ ports.port }} + {% endif %} + {% endif %} + {% elif lag_vars.type is defined and lag_vars.type == "dynamic" %} + {% if ports.port is defined and ports.port %} + {% if ports.state is defined and ports.state == "absent" %} +interface {{ ports.port }} + no port-channel-protocol LACP + {% else %} +interface {{ ports.port }} + port-channel-protocol LACP + port-channel {{ channel_id[1] }} mode active + {% endif %} + {% endif %} + {% endif %} + {% endfor %} + {% endif %} + + {% endif %} +{% endfor %} +{% endif %}
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_lag/tests/inventory.yaml b/ansible_collections/dellemc/os9/roles/os9_lag/tests/inventory.yaml new file mode 100644 index 000000000..5fd33c945 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_lag/tests/inventory.yaml @@ -0,0 +1,20 @@ +spine1 ansible_host=100.94.210.44 +spine2 ansible_host=10.11.182.26 +leaf1 ansible_host=10.11.182.27 +leaf2 ansible_host=10.11.182.28 +leaf3 ansible_host=10.11.182.29 +leaf4 ansible_host=10.11.182.30 + +[spine] +spine1 +spine2 + +[leaf] +leaf1 +leaf2 +leaf3 +leaf4 + +[datacenter:children] +spine +leaf diff --git a/ansible_collections/dellemc/os9/roles/os9_lag/tests/main.os9.yaml b/ansible_collections/dellemc/os9/roles/os9_lag/tests/main.os9.yaml new file mode 100644 index 000000000..cbb19bdda --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_lag/tests/main.os9.yaml @@ -0,0 +1,21 @@ +--- +# vars file for dellemc.os9.os9_lag +# Sample variables for os9 device +os9_lag: + Po 127: + type: dynamic + lacp: + long_timeout: true + fast_switchover: true + lacp_ungroup_vlt: true + lacp_system_priority: 1 + lacp_ungroup: + - port_channel: 1 + state: present + min_links: 3 + channel_members: + - port: fortyGigE 1/4 + state: present + - port: fortyGigE 1/8 + state: present + state: present
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_lag/tests/test.yaml b/ansible_collections/dellemc/os9/roles/os9_lag/tests/test.yaml new file mode 100644 index 000000000..0f6729370 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_lag/tests/test.yaml @@ -0,0 +1,5 @@ +--- +- hosts: datacenter + connection: network_cli + roles: + - dellemc.os9.os9_lag
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_lag/vars/main.yml b/ansible_collections/dellemc/os9/roles/os9_lag/vars/main.yml new file mode 100644 index 000000000..cada8d7e3 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_lag/vars/main.yml @@ -0,0 +1,2 @@ +--- +# vars file for dellemc.os9.os9_lag
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_lldp/LICENSE b/ansible_collections/dellemc/os9/roles/os9_lldp/LICENSE new file mode 100644 index 000000000..2c9b8e1fd --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_lldp/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/> + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (c) 2020, Dell Inc. All rights reserved. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <https://www.gnu.org/licenses/>. + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + <program> Copyright (c) 2020, Dell Inc. All rights reserved. + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +<https://www.gnu.org/licenses/>. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +<https://www.gnu.org/licenses/why-not-lgpl.html>. diff --git a/ansible_collections/dellemc/os9/roles/os9_lldp/README.md b/ansible_collections/dellemc/os9/roles/os9_lldp/README.md new file mode 100644 index 000000000..802adc68a --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_lldp/README.md @@ -0,0 +1,245 @@ +LLDP role +========= + +This role facilitates the configuration of link layer discovery protocol (LLDP) attributes at a global and interface level. It supports the configuration of hello, mode, multiplier, advertise TLVs, management interface, FCoE, iSCSI at global and interface level. This role is abstracted for Dell EMC PowerSwitch platforms running Dell EMC OS9. + +The LLDP role requires an SSH connection for connectivity to a Dell EMC OS9 device. You can use any of the built-in OS connection variables. + +Role variables +-------------- + +- Role is abstracted using the `ansible_network_os` variable that can take `dellemc.os9.os9` as the value +- If `os9_cfg_generate` is set to true, the variable generates the role configuration commands in a file +- Any role variable with a corresponding state variable set to absent negates the configuration of that variable +- Setting an empty value for any variable negates the corresponding configuration +- Variables and values are case-sensitive + +**os9_lldp keys** + +| Key | Type | Description | Support | +|------------|---------------------------|---------------------------------------------------------|-----------------------| +| ``global_lldp_state`` | string: absent,present | Deletes LLDP at a global level if set to absent | os9 | +| ``enable`` | boolean | Enables or disables LLDP at a global level | os9 | +| ``hello`` | integer | Configures the global LLDP hello interval (5 to 180) | os9 | +| ``mode`` | string: rx,tx | Configures global LLDP mode configuration | os9 | +| ``multiplier`` | integer | Configures the global LLDP multiplier (2 to 10) | os9 | +| ``fcoe_priority_bits`` | integer | Configures priority bits for FCoE traffic (1 to FF) | os9 | +| ``iscsi_priority_bits`` | integer | Configures priority bits for iSCSI traffic (1 to FF) | os9 | +| ``dcbx`` | dictionary | Configures DCBx parameters at the global level (see ``dcbx.*``) | os9 | +| ``dcbx.version`` | string | Configures the DCBx version | os9 | +| ``advertise`` | dictionary | Configures LLDP-MED and TLV advertisement at the global level (see ``advertise.*``) | os9 | +| ``advertise.dcbx_tlv`` | string | Configures DCBx TLVs advertisements | os9 | +| ``advertise.dcbx_tlv_state`` | string: present,absent | Deletes DCBx TLVs advertisement if set to absent | os9 | +| ``advertise.dcbx_appln_tlv`` | string | Configures DCBx application priority TLVs advertisement | os9 | +| ``advertise.dcbx_appln_tlv_state`` | string: present,absent | Deletes DCBx application priority TLVs advertisement if set to absent | os9 | +| ``advertise.dot1_tlv`` | dictionary | Configures 802.1 TLVs advertisement (see ``dot1_tlv.*``) | os9 | +| ``dot1_tlv.port_tlv`` | dictionary | Configures 802.1 TLVs advertisement (see ``port_tlv.*``) | os9 | +| ``port_tlv.protocol_vlan_id`` | boolean | Configures 802.1 VLAN ID TLVs advertisement | os9 | +| ``port_tlv.port_vlan_id`` | boolean | Configures 802.1 VLAN ID TLVs advertisement | os9 | +| ``dot1_tlv.vlan_tlv`` | dictionary | Configures 802.1 VLAN TLVs advertisement (see ``vlan_tlv.*``) | os9 | +| ``vlan_tlv.vlan_range`` | string | Configures 802.1 VLAN name TLVs advertisement | os9 | +| ``advertise.dot3_tlv`` | dictionary | Configures 802.3 TLVs advertisement (see ``dot3_tlv.*``) | os9 | +| ``dot3_tlv.max_frame_size`` | boolean | Configures 802.3 maximum frame size TLVs advertisement | os9 | +| ``advertise.port_descriptor`` | boolean | Configures global port descriptor advertisement | os9 | +| ``advertise.management_tlv`` | string | Configures global management TLVs advertisement | os9 | +| ``advertise.management_tlv_state`` | string: absent,present | Deletes global TLVs advertisement if set to absent | os9 | +| ``advertise.med`` | dictionary | Configures MED TLVs advertisement (see ``med_tlv.*``) | , os9 | +| ``med.global_med`` | boolean | Configures global MED TLVs advertisement | os9 | +| ``med.application`` | list | Configures global MED TLVs advertisement for an application (see ``application.*``) | os9 | +| ``application.name`` | string | Configures the application name for MED TLVs advertisement | os9 | +| ``application.vlan_id`` | integer | Configures the VLAN ID for the application MED TLVs advertisement (1 to 4094) | os9 | +| ``application.priority_tagged`` | boolean | Configures priority tagged for the application MED TLVs advertisement; mutually exclusive with *application.vlan_id* | os9 | +| ``application.l2_priority`` | integer | Configures the L2 priority for the application MED TLVs advertisement (0 to 7) | os9 | +| ``application.code_point_value`` | integer | Configures differentiated services code point values for MED TLVs advertisement (0 to 63) | os9 | +| ``med.location_identification`` | list | Configures MED location identification TLVs advertisement (see ``location_identification.*``) | os9 | +| ``location_identification.loc_info`` | string | Configures location information for MED TLVs advertisement | os9 | +| ``location_identification.value`` | string | Configures location information values | os9 | +| ``location_identification.state`` | string: absent,present | Deletes the location information if set to absent | os9 | +| ``management_interface`` | dictionary | Configures LLDP on the management interface (see ``management_interface.*``) | os9 | +| ``management_interface.enable`` | boolean | Enables/disables LLDP on the management interface | os9 | +| ``management_interface.hello`` | integer | Configures LLDP hello interval on the management interface (5 to 180) | os9 | +| ``management_interface.mode`` | string: rx,tx | Configures LLDP mode on the management interface | os9 | +| ``management_interface.multiplier`` | integer | Configures LLDP multiplier on the management interface (2 to 10) | os9 | +| ``management_interface.advertise`` | dictionary | Configures TLV advertisement on the management interface (see ``advertise.*``) | os9 | +| ``advertise.port_descriptor`` | boolean | Configures port descriptor advertisement on the management interface | os9 | +| ``advertise.management_tlv`` | string | Configures management TLVs advertisement | os9 | +| ``advertise.management_tlv_state`` | string: absent,present | Deletes management TLVs advertisement if set to absent | os9 | +| ``local_interface`` | dictionary | Configures LLDP at the interface level (see ``local_interface.*``) | os9 | +| ``local_interface.<interface name>`` | dictionary | Configures LLDP at the interface level (see ``interface name.*``) | os9 | +| ``<interface name>.state`` | string: absent,present | Deletes LLDP at the interface level if set to absent | os9 | +| ``<interface name>.enable`` | boolean | Enables or disables LLDP at the interface level | os9 | +| ``<interface name>.hello`` | integer | Configures LLDP hello interval at the interface level (5 to 180) | os9 | +| ``<interface name>.mode`` | string: rx,tx | Configures LLDP mode configuration at the interface level | os9 | +| ``<interface name>.multiplier`` | integer | Configures LLDP multiplier at the interface level (2 to 10) | os9 | +| ``<interface name>.dcbx`` | dictionary | Configures DCBx parameters at the interface level (see ``dcbx.*``) | os9 | +| ``dcbx.version`` | string | Configures DCBx version at the interface level | os9 | +| ``<interface name>.advertise`` | dictionary | Configures LLDP-MED TLV advertisement at the interface level (see ``advertise.*``) | os9 | +| ``advertise.dcbx_tlv`` | string | Configures DCBx TLVs advertisement at the interface level | os9 | +| ``advertise.dcbx_tlv_state`` | string: present,absent | Deletes interface level DCBx TLVs advertisement if set to absent | os9 | +| ``advertise.dcbx_appln_tlv`` | string | Configures DCBx application priority TLVs advertisement at the interface level | os9 | +| ``advertise.dcbx_appln_tlv_state`` | string: present,absent | Deletes interface level DCBx application priority TLVs advertisement if set to absent | os9 | +| ``advertise.dot1_tlv`` | dictionary | Configures 802.1 TLVs advertisement at the interface level (see ``dot1_tlv.*``) | os9 | +| ``dot1_tlv.port_tlv`` | dictionary | Configures 802.1 TLVs advertisement at the interface level (see ``port_tlv.*``) | os9 | +| ``port_tlv.protocol_vlan_id`` | boolean | Configures 802.1 VLAN ID TLVs advertisement at the interface level | os9 | +| ``port_tlv.port_vlan_id`` | boolean | Configures 802.1 VLAN ID TLVs advertisement at the interface level | os9 | +| ``dot1_tlv.vlan_tlv`` | dictionary | Configures 802.1 VLAN TLVs advertisement at the interface level (see ``vlan_tlv.*``) | os9 | +| ``vlan_tlv.vlan_range`` | string | Configures 802.1 VLAN name TLVs advertisement at the interface level | os9 | +| ``advertise.dot3_tlv`` | dictionary | Configures 802.3 TLVs advertisement at the interface level (see ``dot3_tlv.*``) | os9 | +| ``dot3_tlv.max_frame_size`` | boolean | Configures 802.3 maximum frame size TLVs advertisement at the interface level | os9 | +| ``advertise.port_descriptor`` | boolean | Configures port descriptor advertisement at the interface level | os9 | +| ``advertise.management_tlv`` | string | Configures TLVs advertisement at the interface level | os9 | +| ``advertise.management_tlv_state`` | string: absent,present | Deletes TLVs advertisement at the interface level if set to absent | os9 | +| ``advertise.med`` | dictionary | Configures MED TLVs advertisement at the interface level (see ``med_tlv.*``) | os9 | +| ``med.global_med`` | boolean | Configures MED TLVs advertisement at the interface level | os9 | +| ``med.application`` | list | Configures MED TLVs advertisement for the application at the interface level (see ``application.*``) | os9 | +| ``application.name`` | string | Configures the application name for MED TLVs advertisement | os9 | +| ``application.vlan_id`` | integer | Configures the VLAN ID for the application MED TLVs advertisement at the interface level (1 to 4094) | os9 | +| ``application.priority_tagged`` | boolean | Configures priority tagged for the application MED TLVs advertisement at the interface level; mutually exclusive with *application.vlan_id* | os9 | +| ``application.l2_priority`` | integer | Configures the L2 priority for the application MED TLVs advertisement at the interface level (0 to 7) | os9 | +| ``application.code_point_value`` | integer | Configures differentiated services code point value for MED TLVs advertisement at the interface level (0 to 63) | os9 | +| ``med.location_identification`` | list | Configures MED location identification TLVs advertisement at the interface level (see ``location_identification.*``) | os9 | +| ``location_identification.loc_info`` | string | Configures location information for MED TLVs advertisement at the interface level | os9 | +| ``location_identification.value`` | string | Configures the location information value for MED TLVs advertisement at the interface level | os9 | +| ``location_identification.state`` | string: absent,present | Deletes the interface level MED location information if set to absent | os9 | + + +Connection variables +-------------------- + +Ansible Dell EMC network roles require connection information to establish communication with the nodes in your inventory. This information can exist in the Ansible *group_vars* or *host_vars* directories or inventory, or in the playbook itself. + +| Key | Required | Choices | Description | +|-------------|----------|------------|-----------------------------------------------------| +| ``ansible_host`` | yes | | Specifies the hostname or address for connecting to the remote device over the specified transport | +| ``ansible_port`` | no | | Specifies the port used to build the connection to the remote device; if value is unspecified, the `ANSIBLE_REMOTE_PORT` option is used; it defaults to 22 | +| ``ansible_ssh_user`` | no | | Specifies the username that authenticates the CLI login for the connection to the remote device; if value is unspecified, the `ANSIBLE_REMOTE_USER` environment variable value is used | +| ``ansible_ssh_pass`` | no | | Specifies the password that authenticates the connection to the remote device. | +| ``ansible_become`` | no | yes, no\* | Instructs the module to enter privileged mode on the remote device before sending any commands; if value is unspecified, the `ANSIBLE_BECOME` environment variable value is used, and the device attempts to execute all commands in non-privileged mode | +| ``ansible_become_method`` | no | enable, sudo\* | Instructs the module to allow the become method to be specified for handling privilege escalation; if value is unspecified, the `ANSIBLE_BECOME_METHOD` environment variable value is used | +| ``ansible_become_pass`` | no | | Specifies the password to use if required to enter privileged mode on the remote device; if ``ansible_become`` is set to no this key is not applicable | +| ``ansible_network_os`` | yes | os9, null\* | Loads the correct terminal and cliconf plugins to communicate with the remote device | + +> **NOTE**: Asterisk (\*) denotes the default value if none is specified. + +Example playbook +---------------- + +This example uses the *os9_lldp* role to configure protocol lldp. It creates a *hosts* file with the switch details and corresponding variables. The hosts file should define the `ansible_network_os` variable with corresponding Dell EMC OS9 name. + +When `os9_cfg_generate` is set to true, the variable generates the configuration commands as a .part file in *build_dir* path. By default, the variable is set to false. It writes a simple playbook that only references the *os9_lldp* role. + +**Sample hosts file** + + leaf1 ansible_host= <ip_address> + +**Sample host_vars/leaf1** + + hostname: leaf1 + ansible_become: yes + ansible_become_method: xxxxx + ansible_become_pass: xxxxx + ansible_ssh_user: xxxxx + ansible_ssh_pass: xxxxx + ansible_network_os: dellemc.os9.os9 + build_dir: ../temp/os9 + os9_lldp: + global_lldp_state: present + enable: false + mode: rx + multiplier: 3 + fcoe_priority_bits: 3 + iscsi_priority_bits: 3 + hello: 6 + dcbx: + version: auto + management_interface: + hello: 7 + multiplier: 3 + mode: tx + enable: true + advertise: + port_descriptor: false + management_tlv: management-address system-capabilities + management_tlv_state: absent + advertise: + dcbx_tlv: pfc + dcbx_tlv_state: absent + dcbx_appln_tlv: fcoe + dcbx_appln_tlv_state: + dot1_tlv: + port_tlv: + protocol_vlan_id: true + port_vlan_id: true + vlan_tlv: + vlan_range: 2-4 + dot3_tlv: + max_frame_size: false + port_descriptor: false + management_tlv: management-address system-capabilities + management_tlv_state: absent + med: + global_med: true + application: + - name: "guest-voice" + vlan_id: 2 + l2_priority: 3 + code_point_value: 4 + - name: voice + priority_tagged: true + l2_priority: 3 + code_point_value: 4 + location_identification: + - loc_info: ecs-elin + value: 12345678911 + state: present + local_interface: + fortyGigE 1/3: + lldp_state: present + enable: false + mode: rx + multiplier: 3 + hello: 8 + dcbx: + version: auto + advertise: + dcbx_tlv: pfc + dcbx_tlv_state: present + dcbx_appln_tlv: fcoe + dcbx_appln_tlv_state: absent + dot1_tlv: + port_tlv: + protocol_vlan_id: true + port_vlan_id: true + vlan_tlv: + vlan_range: 2-4 + state: present + dot3_tlv: + max_frame_size: true + port_descriptor: true + management_tlv: management-address system-capabilities + management_tlv_state: absent + med: + application: + - name: guest-voice + vlan_id: 2 + l2_priority: 3 + code_point_value: 4 + - name: voice + priority_tagged: true + l2_priority: 3 + code_point_value: 4 + location_identification: + - loc_info: ecs-elin + value: 12345678911 + +**Simple playbook to setup system — leaf.yaml** + + - hosts: leaf1 + roles: + - dellemc.os9.os9_lldp + +**Run** + + ansible-playbook -i hosts leaf.yaml + +(c) 2017-2020 Dell Inc. or its subsidiaries. All rights reserved. diff --git a/ansible_collections/dellemc/os9/roles/os9_lldp/defaults/main.yml b/ansible_collections/dellemc/os9/roles/os9_lldp/defaults/main.yml new file mode 100644 index 000000000..11d293a1d --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_lldp/defaults/main.yml @@ -0,0 +1,2 @@ +--- +# defaults file for dellemc.os9.os9_lldp
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_lldp/handlers/main.yml b/ansible_collections/dellemc/os9/roles/os9_lldp/handlers/main.yml new file mode 100644 index 000000000..38e013e19 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_lldp/handlers/main.yml @@ -0,0 +1,2 @@ +--- +# handlers file for dellemc.os9.os9_lldp
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_lldp/meta/main.yml b/ansible_collections/dellemc/os9/roles/os9_lldp/meta/main.yml new file mode 100644 index 000000000..4b76193d9 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_lldp/meta/main.yml @@ -0,0 +1,19 @@ +# Copyright (c) 2017-2020 Dell Inc. or its subsidiaries. All Rights Reserved. +--- +galaxy_info: + author: Dell EMC Networking Engineering + description: > + The os9_lldp role facilitates the configuration of Link Layer Discovery Protocol(LLDP) attributes in devices + running Dell EMC Networking Operating Systems. + license: GPLv3 + min_ansible_version: 2.9.6 + + platforms: + - name: os9 + + galaxy_tags: + - networking + - dell + - emc + - dellemc + - os9 diff --git a/ansible_collections/dellemc/os9/roles/os9_lldp/tasks/main.yml b/ansible_collections/dellemc/os9/roles/os9_lldp/tasks/main.yml new file mode 100644 index 000000000..97e349146 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_lldp/tasks/main.yml @@ -0,0 +1,16 @@ +--- +# tasks file for os9 + - name: "Generating LLDP configuration for os9" + template: + src: os9_lldp.j2 + dest: "{{ build_dir }}/lldp9_{{ hostname }}.conf.part" + when: (ansible_network_os is defined and ansible_network_os == "dellemc.os9.os9") and ((os9_cfg_generate | default('False'))| bool) +# notify: save config os9 + register: generate_output + + - name: "Provisioning LLDP configuration for os9" + dellemc.os9.os9_config: + src: os9_lldp.j2 + when: (ansible_network_os is defined and ansible_network_os == "dellemc.os9.os9") +# notify: save config os9 + register: output diff --git a/ansible_collections/dellemc/os9/roles/os9_lldp/templates/os9_lldp.j2 b/ansible_collections/dellemc/os9/roles/os9_lldp/templates/os9_lldp.j2 new file mode 100644 index 000000000..375fba74f --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_lldp/templates/os9_lldp.j2 @@ -0,0 +1,514 @@ +#jinja2: trim_blocks: True,lstrip_blocks: True +{################################################### +Purpose: +Configure LLDP commands for os9 Devices. + +os9_lldp: + global_lldp_state: present + enable: false + mode: rx + multiplier: 3 + iscsi_priority_bits: 3 + fcoe_priority_bits: 3 + hello: 8 + dcbx: + version: auto + management_interface: + hello: 6 + multiplier: 3 + mode: tx + enable: true + advertise: + port_descriptor: false + management_tlv: management-address system-capabilities + management_tlv_state: present + advertise: + dcbx_tlv: pfc + dcbx_tlv_state: present + dcbx_appln_tlv: fcoe + dcbx_appln_tlv_state: + dot1_tlv: + port_tlv: + protocol_vlan_id: true + port_vlan_id: true + vlan_tlv: + vlan_range: 2-4 + state: present + dot3_tlv: + max_frame_size: true + port_descriptor: true + management_tlv: management-address system-capabilities + management_tlv_state: present + med: + application: + - name: guest-voice + vlan_id: 2 + l2_priority: 3 + code_point_value: 4 + - name: voice + priority_tagged: true + l2_priority: 3 + code_point_value: 4 + location_identification: + - loc_info: ecs-elin + value: 12345678911 + local_interface: + fortyGigE 1/3: + lldp_state: present + enable: false + mode: rx + multiplier: 3 + hello: 8 + dcbx: + version: auto + advertise: + dcbx_tlv: pfc + dcbx_tlv_state: present + dcbx_appln_tlv: fcoe + dcbx_appln_tlv_state: + dot1_tlv: + port_tlv: + protocol_vlan_id: true + port_vlan_id: true + vlan_tlv: + vlan_range: 2-4 + state: present + dot3_tlv: + max_frame_size: true + port_descriptor: true + management_tlv: management-address system-capabilities + management_tlv_state: present + med: + application: + - name: guest-voice + vlan_id: 2 + l2_priority: 3 + code_point_value: 4 + - name: voice + priority_tagged: true + l2_priority: 3 + code_point_value: 4 + location_identification: + - loc_info: ecs-elin + value: 12345678911 + + +####################################################} +{% if os9_lldp is defined and os9_lldp %} + {% set global_state = [] %} + {% if global_state.append(True) %}{% endif %} + + {% for key in os9_lldp.keys() %} + {% set lldp_vars = os9_lldp[key] %} + {% if key == "global_lldp_state" and lldp_vars == "absent" %} +no protocol lldp + {% if global_state.insert(False,0) %}{% endif %} + {% endif %} + {% endfor %} + +{% if global_state[0] %} +protocol lldp +{% endif %} + +{% for key in os9_lldp.keys() %} +{% set lldp_vars = os9_lldp[key] %} +{% if global_state[0] %} +{% if key == "management_interface" %} + management-interface + {% if lldp_vars.hello is defined and lldp_vars.hello %} + hello {{ lldp_vars.hello }} + {% else %} + no hello + {% endif %} + {% if lldp_vars.enable is defined and lldp_vars.enable %} + no disable + {% else %} + disable + {% endif %} + {% if lldp_vars.mode is defined and lldp_vars.mode %} + mode {{ lldp_vars.mode }} + {% else %} + no mode + {% endif %} + {% if lldp_vars.multiplier is defined and lldp_vars.multiplier %} + multiplier {{ lldp_vars.multiplier }} + {% else %} + no multiplier + {% endif %} + {% if lldp_vars.advertise is defined and lldp_vars.advertise %} + {% if lldp_vars.advertise.port_descriptor is defined %} + {% if lldp_vars.advertise.port_descriptor %} + advertise interface-port-desc + {% else %} + no advertise interface-port-desc + {% endif %} + {% endif %} + {% if lldp_vars.advertise.management_tlv is defined and lldp_vars.advertise.management_tlv %} + {% if lldp_vars.advertise.management_tlv_state is defined and lldp_vars.advertise.management_tlv_state == "absent" %} + no advertise management-tlv {{ lldp_vars.advertise.management_tlv }} + {% else %} + advertise management-tlv {{ lldp_vars.advertise.management_tlv }} + {% endif %} + {% endif %} + {% endif %} +{% endif %} +{% if key == "enable" %} + {% if lldp_vars %} + no disable + {% else %} + disable + {% endif %} +{% endif %} +{% if key == "fcoe_priority_bits" %} + {% if lldp_vars %} + fcoe priority-bits {{ lldp_vars }} + {% else %} + no fcoe priority-bits + {% endif %} +{% endif %} +{% if key == "hello" %} + {% if lldp_vars %} + hello {{ lldp_vars }} + {% else %} + no hello + {% endif %} +{% endif %} +{% if key == "mode" %} + {% if lldp_vars %} + mode {{ lldp_vars }} + {% else %} + no mode + {% endif %} +{% endif %} +{% if key == "multiplier" %} + {% if lldp_vars %} + multiplier {{ lldp_vars }} + {% else %} + no multiplier + {% endif %} +{% endif %} +{% if key == "iscsi_priority_bits" %} + {% if lldp_vars %} + iscsi priority-bits {{ lldp_vars }} + {% else %} + no iscsi priority-bits + {% endif %} +{% endif %} +{% if key == "dcbx" %} + {% if lldp_vars.version is defined and lldp_vars.version %} + dcbx version {{ lldp_vars.version }} + {% else %} + no dcbx version + {% endif %} +{% endif %} +{% if key == "advertise" %} +{% if lldp_vars.management_tlv is defined and lldp_vars.management_tlv %} + {% if lldp_vars.management_tlv_state is defined and lldp_vars.management_tlv_state == "absent" %} + no advertise management-tlv {{ lldp_vars.management_tlv }} + {% else %} + advertise management-tlv {{ lldp_vars.management_tlv }} + {% endif %} +{% endif %} + +{% if lldp_vars.port_descriptor is defined %} + {% if lldp_vars.port_descriptor %} + advertise interface-port-desc + {% else %} + no advertise interface-port-desc + {% endif %} +{% endif %} + +{% if lldp_vars.med is defined and lldp_vars.med %} + {% for med in lldp_vars.med.keys() %} + {% set med_vars = lldp_vars.med[med] %} + {% if med == "global_med" %} + {% if med_vars %} + advertise med + {% else %} + no advertise med + {% endif %} + {% endif %} + {% if med == "location_identification" %} + {% for loc in med_vars %} + {% if loc.loc_info is defined and loc.loc_info %} + {% if loc.value is defined and loc.value %} + {% if loc.state is defined and loc.state == "absent" %} + no advertise med location-identification {{ loc.loc_info }} {{ loc.value }} + {% else %} + advertise med location-identification {{ loc.loc_info }} {{ loc.value }} + {% endif %} + {% endif %} + {% endif %} + {% endfor %} + {% endif %} + {% if med == "application" %} + {% for app in med_vars %} + {% if app.name is defined and app.name %} + {% if app.vlan_id is defined and app.vlan_id %} + {% set vlan_or_tag = app.vlan_id %} + {% elif app.priority_tagged is defined and app.priority_tagged %} + {% set vlan_or_tag = "priority-tagged" %} + {% endif %} + {% if vlan_or_tag is defined and vlan_or_tag %} + {% if app.l2_priority is defined and app.l2_priority %} + {% if app.code_point_value is defined and app.code_point_value %} + {% if app.state is defined and app.state == "absent" %} + no advertise med {{ app.name }} {{ vlan_or_tag }} {{ app.l2_priority }} {{ app.code_point_value }} + {% else %} + advertise med {{ app.name }} {{ vlan_or_tag }} {{ app.l2_priority }} {{ app.code_point_value }} + {% endif %} + {% endif %} + {% endif %} + {% endif %} + {% endif %} + {% endfor %} + {% endif %} + {% endfor %} +{% endif %} + +{% if lldp_vars.dcbx_tlv is defined and lldp_vars.dcbx_tlv %} + {% if lldp_vars.dcbx_tlv_state is defined and lldp_vars.dcbx_tlv_state == "absent" %} + no advertise dcbx-tlv {{ lldp_vars.dcbx_tlv }} + {% else %} + advertise dcbx-tlv {{ lldp_vars.dcbx_tlv }} + {% endif %} +{% endif %} + +{% if lldp_vars.dcbx_appln_tlv is defined and lldp_vars.dcbx_appln_tlv %} + {% if lldp_vars.dcbx_appln_tlv_state is defined and lldp_vars.dcbx_appln_tlv_state == "absent" %} + no advertise dcbx-appln-tlv {{ lldp_vars.dcbx_appln_tlv }} + {% else %} + advertise dcbx-appln-tlv {{ lldp_vars.dcbx_appln_tlv }} + {% endif %} +{% endif %} + +{% if lldp_vars.dot3_tlv is defined and lldp_vars.dot3_tlv %} + {% for dot3 in lldp_vars.dot3_tlv.keys() %} + {% set dot3_vars = lldp_vars.dot3_tlv[dot3] %} + {% if dot3 == "max_frame_size" %} + {% if dot3_vars %} + advertise dot3-tlv max-frame-size + {% else %} + no advertise dot3-tlv max-frame-size + {% endif %} + {% endif %} + {% endfor %} +{% endif %} + +{% if lldp_vars.dot1_tlv is defined and lldp_vars.dot1_tlv %} + {% for dot1 in lldp_vars.dot1_tlv.keys() %} + {% set dot1_vars = lldp_vars.dot1_tlv[dot1] %} + {% if dot1 == "port_tlv" %} + {% if dot1_vars.protocol_vlan_id is defined and dot1_vars.protocol_vlan_id %} + {% if dot1_vars.port_vlan_id is defined %} + {% if dot1_vars.port_vlan_id %} + advertise dot1-tlv port-protocol-vlan-id port-vlan-id + {% else %} + advertise dot1-tlv port-protocol-vlan-id + no advertise dot1-tlv port-vlan-id + {% endif %} + {% else %} + advertise dot1-tlv port-protocol-vlan-id + {% endif %} + {% else %} + {% if not dot1_vars.protocol_vlan_id %} + no advertise dot1-tlv port-protocol-vlan-id + {% endif %} + {% if dot1_vars.port_vlan_id is defined %} + {% if dot1_vars.port_vlan_id %} + advertise dot1-tlv port-vlan-id + {% else %} + no advertise dot1-tlv port-vlan-id + {% endif %} + {% endif %} + {% endif %} + {% endif %} + {% if dot1 == "vlan_tlv" %} + {% if dot1_vars.vlan_range is defined and dot1_vars.vlan_range %} + {% if dot1_vars.state is defined and dot1_vars.state == "absent" %} + no advertise dot1-tlv vlan-name vlan-id {{ dot1_vars.vlan_range }} + {% else %} + advertise dot1-tlv vlan-name vlan-id {{ dot1_vars.vlan_range }} + {% endif %} + {% endif %} + {% endif %} + {% endfor %} +{% endif %} +{% endif %} +{% endif %} +{% endfor %} +{% endif %} +{% if os9_lldp is defined and os9_lldp %} +{% for key in os9_lldp.keys() %} +{% set lldp_vars = os9_lldp[key] %} +{% if key == "local_interface" %} + {% for intf in lldp_vars.keys() %} + {% set intf_vars = lldp_vars[intf] %} +interface {{ intf }} + {% if intf_vars.lldp_state is defined and intf_vars.lldp_state == "absent" %} + no protocol lldp + {% else %} + protocol lldp + {% if intf_vars.hello is defined and intf_vars.hello %} + hello {{ intf_vars.hello }} + {% else %} + no hello + {% endif %} + {% if intf_vars.enable is defined and intf_vars.enable %} + no disable + {% else %} + disable + {% endif %} + {% if intf_vars.mode is defined and intf_vars.mode %} + mode {{ intf_vars.mode }} + {% else %} + no mode + {% endif %} + {% if intf_vars.multiplier is defined and intf_vars.multiplier %} + multiplier {{ intf_vars.multiplier }} + {% else %} + no multiplier + {% endif %} + {% if intf_vars.dcbx is defined and intf_vars.dcbx %} + {% if intf_vars.dcbx.version is defined and intf_vars.dcbx.version %} + dcbx version {{ intf_vars.dcbx.version }} + {% else %} + no dcbx version + {% endif %} + {% endif %} + {% if intf_vars.advertise is defined and intf_vars.advertise %} + {% if intf_vars.advertise.port_descriptor is defined %} + {% if intf_vars.advertise.port_descriptor %} + advertise interface-port-desc + {% else %} + no advertise interface-port-desc + {% endif %} + {% endif %} + {% if intf_vars.advertise.management_tlv is defined and intf_vars.advertise.management_tlv %} + {% if intf_vars.advertise.management_tlv_state is defined and intf_vars.advertise.management_tlv_state == "absent" %} + no advertise management-tlv {{ intf_vars.advertise.management_tlv }} + {% else %} + advertise management-tlv {{ intf_vars.advertise.management_tlv }} + {% endif %} + {% endif %} + {% if intf_vars.advertise.med is defined and intf_vars.advertise.med %} + {% for med in intf_vars.advertise.med.keys() %} + {% set med_vars = intf_vars.advertise.med[med] %} + {% if med == "global_med" %} + {% if med_vars %} + advertise med + {% else %} + no advertise med + {% endif %} + {% endif %} + {% if med == "location_identification" %} + {% for loc in med_vars %} + {% if loc.loc_info is defined and loc.loc_info %} + {% if loc.value is defined and loc.value %} + {% if loc.state is defined and loc.state == "absent" %} + no advertise med location-identification {{ loc.loc_info }} {{ loc.value }} + {% else %} + advertise med location-identification {{ loc.loc_info }} {{ loc.value }} + {% endif %} + {% endif %} + {% endif %} + {% endfor %} + {% endif %} + {% if med == "application" %} + {% for app in med_vars %} + {% if app.name is defined and app.name %} + {% if app.vlan_id is defined and app.vlan_id %} + {% set vlan_or_tag = app.vlan_id %} + {% elif app.priority_tagged is defined and app.priority_tagged %} + {% set vlan_or_tag = "priority-tagged" %} + {% endif %} + {% if vlan_or_tag is defined and vlan_or_tag %} + {% if app.l2_priority is defined and app.l2_priority %} + {% if app.code_point_value is defined and app.code_point_value %} + {% if app.state is defined and app.state == "absent" %} + no advertise med {{ app.name }} {{ vlan_or_tag }} {{ app.l2_priority }} {{ app.code_point_value }} + {% else %} + advertise med {{ app.name }} {{ vlan_or_tag }} {{ app.l2_priority }} {{ app.code_point_value }} + {% endif %} + {% endif %} + {% endif %} + {% endif %} + {% endif %} + {% endfor %} + {% endif %} + {% endfor %} + {% endif %} + + {% if intf_vars.advertise.dcbx_tlv is defined and intf_vars.advertise.dcbx_tlv %} + {% if intf_vars.advertise.dcbx_tlv_state is defined and intf_vars.advertise.dcbx_tlv_state == "absent" %} + no advertise dcbx-tlv {{ intf_vars.advertise.dcbx_tlv }} + {% else %} + advertise dcbx-tlv {{ intf_vars.advertise.dcbx_tlv }} + {% endif %} + {% endif %} + + {% if intf_vars.advertise.dcbx_appln_tlv is defined and intf_vars.advertise.dcbx_appln_tlv %} + {% if intf_vars.advertise.dcbx_appln_tlv_state is defined and intf_vars.advertise.dcbx_appln_tlv_state == "absent" %} + no advertise dcbx-appln-tlv {{ intf_vars.advertise.dcbx_appln_tlv }} + {% else %} + advertise dcbx-appln-tlv {{ intf_vars.advertise.dcbx_appln_tlv }} + {% endif %} + {% endif %} + + {% if intf_vars.advertise.dot3_tlv is defined and intf_vars.advertise.dot3_tlv %} + {% for dot3 in intf_vars.advertise.dot3_tlv.keys() %} + {% set dot3_vars = intf_vars.advertise.dot3_tlv[dot3] %} + {% if dot3 == "max_frame_size" %} + {% if dot3_vars %} + advertise dot3-tlv max-frame-size + {% else %} + no advertise dot3-tlv max-frame-size + {% endif %} + {% endif %} + {% endfor %} + {% endif %} + {% if intf_vars.advertise.dot1_tlv is defined and intf_vars.advertise.dot1_tlv %} + {% for dot1 in intf_vars.advertise.dot1_tlv.keys() %} + {% set dot1_vars = intf_vars.advertise.dot1_tlv[dot1] %} + {% if dot1 == "port_tlv" %} + {% if dot1_vars.protocol_vlan_id is defined and dot1_vars.protocol_vlan_id %} + {% if dot1_vars.port_vlan_id is defined %} + {% if dot1_vars.port_vlan_id %} + advertise dot1-tlv port-protocol-vlan-id port-vlan-id + {% else %} + advertise dot1-tlv port-protocol-vlan-id + no advertise dot1-tlv port-vlan-id + {% endif %} + {% else %} + advertise dot1-tlv port-protocol-vlan-id + {% endif %} + {% else %} + {% if not dot1_vars.protocol_vlan_id %} + no advertise dot1-tlv port-protocol-vlan-id + {% endif %} + {% if dot1_vars.port_vlan_id is defined %} + {% if dot1_vars.port_vlan_id %} + advertise dot1-tlv port-vlan-id + {% else %} + no advertise dot1-tlv port-vlan-id + {% endif %} + {% endif %} + {% endif %} + {% endif %} + {% if dot1 == "vlan_tlv" %} + {% if dot1_vars.vlan_range is defined and dot1_vars.vlan_range %} + {% if dot1_vars.state is defined and dot1_vars.state == "absent" %} + no advertise dot1-tlv vlan-name vlan-id {{ dot1_vars.vlan_range }} + {% else %} + advertise dot1-tlv vlan-name vlan-id {{ dot1_vars.vlan_range }} + {% endif %} + {% endif %} + {% endif %} + {% endfor %} + {% endif %} + {% endif %} + {% endif %} + {% endfor %} +{% endif %} +{% endfor %} +{% endif %}
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_lldp/tests/inventory.yaml b/ansible_collections/dellemc/os9/roles/os9_lldp/tests/inventory.yaml new file mode 100644 index 000000000..5fd33c945 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_lldp/tests/inventory.yaml @@ -0,0 +1,20 @@ +spine1 ansible_host=100.94.210.44 +spine2 ansible_host=10.11.182.26 +leaf1 ansible_host=10.11.182.27 +leaf2 ansible_host=10.11.182.28 +leaf3 ansible_host=10.11.182.29 +leaf4 ansible_host=10.11.182.30 + +[spine] +spine1 +spine2 + +[leaf] +leaf1 +leaf2 +leaf3 +leaf4 + +[datacenter:children] +spine +leaf diff --git a/ansible_collections/dellemc/os9/roles/os9_lldp/tests/main.os9.yaml b/ansible_collections/dellemc/os9/roles/os9_lldp/tests/main.os9.yaml new file mode 100644 index 000000000..ab40de8de --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_lldp/tests/main.os9.yaml @@ -0,0 +1,94 @@ +--- +# vars file for dellemc.os9.os9_lldp, +# below gives a sample configuration +# Sample variables for OS9 device +os9_lldp: + global_lldp_state: present + enable: false + mode: rx + multiplier: 3 + fcoe_priority_bits: 3 + iscsi_priority_bits: 3 + hello: 6 + dcbx: + version: auto + management_interface: + hello: 7 + multiplier: 3 + mode: tx + enable: true + advertise: + port_descriptor: false + management_tlv: management-address system-capabilities + management_tlv_state: absent + advertise: + dcbx_tlv: pfc + dcbx_tlv_state: absent + dcbx_appln_tlv: fcoe + dcbx_appln_tlv_state: + dot1_tlv: + port_tlv: + protocol_vlan_id: true + port_vlan_id: true + vlan_tlv: + vlan_range: 2-4 + dot3_tlv: + max_frame_size: false + port_descriptor: false + management_tlv: management-address system-capabilities system-name + management_tlv_state: present + med: + global_med: true + application: + - name: "guest-voice" + vlan_id: 2 + l2_priority: 3 + code_point_value: 4 + - name: voice + priority_tagged: true + l2_priority: 3 + code_point_value: 4 + location_identification: + - loc_info: ecs-elin + value: 12345678911 + state: present + local_interface: + fortyGigE 1/3: + lldp_state: present + enable: false + mode: rx + multiplier: 3 + hello: 8 + dcbx: + version: auto + port_role: auto-upstream + advertise: + dcbx_tlv: pfc + dcbx_tlv_state: present + dcbx_appln_tlv: fcoe + dcbx_appln_tlv_state: + dot1_tlv: + port_tlv: + protocol_vlan_id: true + port_vlan_id: true + vlan_tlv: + vlan_range: 2-4 + state: present + dot3_tlv: + max_frame_size: true + port_descriptor: true + management_tlv: management-address system-capabilities + management_tlv_state: present + med: + application: + - name: guest-voice + vlan_id: 2 + l2_priority: 3 + code_point_value: 4 + - name: voice + priority_tagged: true + l2_priority: 3 + code_point_value: 4 + location_identification: + - loc_info: ecs-elin + value: 12345678911
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_lldp/tests/test.yaml b/ansible_collections/dellemc/os9/roles/os9_lldp/tests/test.yaml new file mode 100644 index 000000000..49901101d --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_lldp/tests/test.yaml @@ -0,0 +1,6 @@ + +--- +- hosts: datacenter + connection: network_cli + roles: + - dellemc.os9.os9_lldp
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_lldp/vars/main.yml b/ansible_collections/dellemc/os9/roles/os9_lldp/vars/main.yml new file mode 100644 index 000000000..b10424eab --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_lldp/vars/main.yml @@ -0,0 +1,2 @@ +--- +# vars file for dellemc.os9.os9_lldp
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_logging/LICENSE b/ansible_collections/dellemc/os9/roles/os9_logging/LICENSE new file mode 100644 index 000000000..2c9b8e1fd --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_logging/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/> + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (c) 2020, Dell Inc. All rights reserved. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <https://www.gnu.org/licenses/>. + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + <program> Copyright (c) 2020, Dell Inc. All rights reserved. + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +<https://www.gnu.org/licenses/>. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +<https://www.gnu.org/licenses/why-not-lgpl.html>. diff --git a/ansible_collections/dellemc/os9/roles/os9_logging/README.md b/ansible_collections/dellemc/os9/roles/os9_logging/README.md new file mode 100644 index 000000000..ee10bbc99 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_logging/README.md @@ -0,0 +1,148 @@ +Logging role +============ + +This role facilitates the configuration of global logging attributes, and it supports the configuration of logging servers. This role is abstracted for Dell EMC PowerSwitch platforms running Dell EMC OS9. + +The Logging role requires an SSH connection for connectivity to a Dell EMC OS9 device. You can use any of the built-in OS connection variables. + + +Role variables +-------------- + +- Role is abstracted using the `ansible_network_os` variable that can take `dellemc.os9.os9` as the value +- If the `os9_cfg_generate` variable is set to true, it generates the role configuration commands in a file +- Any role variable with a corresponding state variable set to absent negates the configuration of that variable +- Setting an empty value for any variable negates the corresponding configuration +- Variables and values are case-sensitive + +**os9_logging keys** + +| Key | Type | Description | Support | +|------------|---------------------------|---------------------------------------------------------|-----------------------| +| ``logging`` | list | Configures the logging server (see ``logging.*``) | os9 | +| ``logging.ip`` | string (required) | Configures the IPv4 address for the logging server (A.B.C.D format) | os9 | +| ``logging.secure_port`` | integer | Specifies log messages over the TLS port, CA certificates must be installed to specify the log messages over TLS port | os9 | +| ``logging.tcp_port`` | integer | Specifies log messages over the TCP port if *secure_port* is not defined | os9 | +| ``logging.udp_port`` | integer | Specifies log messages over the UDP port if both TCP and the secure port key are not defined | os9 | +| ``logging.vrf`` | dict | Specifies a VRF instance to be used to reach the host | os9 | +| ``logging.vrf.name`` | string | Specifies the VRF name | os9 | +| ``logging.vrf.secure_port`` | integer | Specifies log messages over the TLS port, CA certificates must be installed to specify the log messages over TLS port | os9 | +| ``logging.vrf.tcp_port`` | integer | Specifies log messages over the TCP port if *secure_port key* is not defined | os9 | +| ``logging.vrf.udp_port`` | integer | Specifies log messages over the UDP port if both TCP and *secure_port_key* is not defined | os9 | +| ``logging.vrf.state`` | string: absent,present\* | Deletes VRF instance of the logging server if set to absent | os9 | +| ``logging.state`` | string: absent,present\* | Deletes the logging server if set to absent | os9 | +| ``buffer`` | integer | Specifies the buffered logging severity level (0 to 7) | os9 | +| ``console_level`` | integer | Configures the console logging level (0 to 7) | os9 | +| ``trap_level`` | integer | Configures the syslog server severity level (0 to 7) | os9| +| ``syslog_version`` | integer | Configures the syslog version (0/1) | os9 | +| ``monitor`` | integer | Configures the terminal line logging level (0 to 7) | os9| +| ``history`` | integer | Configures the syslog history table (0 to 7) | os9 | +| ``history_size`` | integer | Specifies the history table size | os9 | +| ``on`` | boolean | Enables logging to all supported destinations if set to true | os9 | +| ``extended`` | boolean | Enables extended logging if set to true | os9 | +| ``coredump`` | dict | Configures coredump logging | os9 | +| ``coredump.server`` | dict | Specifies all server details | os9 | +| ``coredump.server.server_ip`` | string (required) | Specifies the IPv4/IPv6 address of the logging server | os9 | +| ``coredump.server.username`` | string | Specifies the username to be configured | os9 | +| ``coredump.server.password`` | string | Specifies the password to be configured | os9 | +| ``coredump.server.state`` | string: present,absent\* | Deletes the coredump server if set to absent | os9 | +| ``coredump.stackunit`` |dict | Specifies details for enabling a coredump on the stack-unit | os9 | +| ``coredump.stackunit.all`` | boolean | Enables a coredump on all stack-units | os9 | +| ``coredump.stackunit.unit_num`` | integer | Specifies the stack-unit number (0 to 5) | os9 | +| ``coredump.stackunit.state`` | string: present,absent\*| Deletes the stack-unit coredump if set to absent | os9 | +| ``source_interface`` | string | Configures the source interface for logging | os9 | + +> **NOTE**: Asterisk (_*_) denotes the default value if none is specified. + +Connection variables +-------------------- + +Ansible Dell EMC network roles require connection information to establish communication with the nodes in your inventory. This information can exist in the Ansible *group_vars* or *host_vars* directories or inventory, or in the playbook itself. + +| Key | Required | Choices | Description | +|-------------|----------|------------|-----------------------------------------------------| +| ``ansible_host`` | yes | | Specifies the hostname or address for connecting to the remote device over the specified transport | +| ``ansible_port`` | no | | Specifies the port used to build the connection to the remote device; if value is unspecified, the `ANSIBLE_REMOTE_PORT` option is used; it defaults to 22 | +| ``ansible_ssh_user`` | no | | Specifies the username that authenticates the CLI login for the connection to the remote device; if value is unspecified, the `ANSIBLE_REMOTE_USE`R environment variable value is used | +| ``ansible_ssh_pass`` | no | | Specifies the password that authenticates the connection to the remote device | +| ``ansible_become`` | no | yes, no\* | Instructs the module to enter privileged mode on the remote device before sending any commands; if value is unspecified, the `ANSIBLE_BECOME` environment variable value is used, and the device attempts to execute all commands in non-privileged mode | +| ``ansible_become_method`` | no | enable, sudo\* | Instructs the module to allow the become method to be specified for handling privilege escalation; if value is unspecified, the `ANSIBLE_BECOME_METHOD` environment variable value is used | +| ``ansible_become_pass`` | no | | Specifies the password to use if required to enter privileged mode on the remote device; if ``ansible_become`` is set to no this key is not applicable | +| ``ansible_network_os`` | yes | os9, null\* | Loads the correct terminal and cliconf plugins to communicate with the remote device | + +> **NOTE**: Asterisk (\*) denotes the default value if none is specified. + +Example playbook +---------------- + +This example uses the *os9_logging* role to completely set up logging servers. It creates a *hosts* file with the switch details and corresponding variables. The hosts file should define the `ansible_network_os` variable with corresponding Dell EMC OS9 name. + +When `os9_cfg_generate` is set to true, the variable generates the configuration commands as a .part file in *build_dir* path. By default, the variable is set to false. + +**Sample hosts file** + + leaf1 ansible_host= <ip_address> + +**Sample host_vars/leaf1** + + hostname: leaf1 + ansible_become: yes + ansible_become_method: xxxxx + ansible_become_pass: xxxxx + ansible_ssh_user: xxxxx + ansible_ssh_pass: xxxxx + ansible_network_os: dellemc.os9.os9 + build_dir: ../temp/os9 + + os9_logging: + logging: + - ip : 1.1.1.1 + state: present + - ip: 2.2.2.2 + secure_port: 1025 + tcp_port: 1024 + udp_port: 2000 + state: present + - ip: 3.3.3.3 + vrf: + name: test + secure_port: 1024 + tcp_port: 1025 + udp_port: 2000 + state: present + secure_port: 1025 + tcp_port: 2000 + udp_port: 1025 + state: present + buffer: 5 + console: 7 + trap: 5 + version: 5 + history: 4 + history_size: 3 + monitor: 5 + on: true + extended: true + coredump: + server: + server_ip: 2.2.2.2 + username: u1 + password: pwd + state: present + stackunit: + all: true + unit_num: 5 + state: present + source_interface: "fortyGigE 1/9" + +**Simple playbook to setup logging — leaf.yaml** + + - hosts: leaf1 + roles: + - dellemc.os9.os9_logging + +**Run** + + ansible-playbook -i hosts leaf.yaml + +(c) 2020 Dell Inc. or its subsidiaries. All rights reserved. diff --git a/ansible_collections/dellemc/os9/roles/os9_logging/defaults/main.yml b/ansible_collections/dellemc/os9/roles/os9_logging/defaults/main.yml new file mode 100644 index 000000000..ef0a1c97f --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_logging/defaults/main.yml @@ -0,0 +1,2 @@ +--- +# defaults file for dellemc.os9.os9_logging
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_logging/handlers/main.yml b/ansible_collections/dellemc/os9/roles/os9_logging/handlers/main.yml new file mode 100644 index 000000000..36b3d65aa --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_logging/handlers/main.yml @@ -0,0 +1,2 @@ +--- +# handlers file for dellemc.os9.os9_logging
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_logging/meta/main.yml b/ansible_collections/dellemc/os9/roles/os9_logging/meta/main.yml new file mode 100644 index 000000000..e3895760a --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_logging/meta/main.yml @@ -0,0 +1,18 @@ +# Copyright (c) 2020 Dell Inc. +--- +galaxy_info: + author: Dell EMC Networking Engineering + description: The os9_logging role facilitates the configuration of logging attributes in devices running Dell EMC Networking Operating Systems. + company: Dell Inc + license: GPLv3 + min_ansible_version: 2.9.6 + + platforms: + - name: os9 + + galaxy_tags: + - networking + - dell + - emc + - dellemc + - os9 diff --git a/ansible_collections/dellemc/os9/roles/os9_logging/tasks/main.yml b/ansible_collections/dellemc/os9/roles/os9_logging/tasks/main.yml new file mode 100644 index 000000000..6e6497251 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_logging/tasks/main.yml @@ -0,0 +1,16 @@ +--- +# tasks file for os9 + - name: "Generating logging configuration for os9" + template: + src: os9_logging.j2 + dest: "{{ build_dir }}/logging9_{{ hostname }}.conf.part" + when: (ansible_network_os is defined and ansible_network_os == "dellemc.os9.os9") and ((os9_cfg_generate | default('False'))| bool) +# notify: save config os9 + register: generate_output + + - name: "Provisioning logging configuration for os9" + dellemc.os9.os9_config: + src: os9_logging.j2 + when: (ansible_network_os is defined and ansible_network_os == "dellemc.os9.os9") +# notify: save config os9 + register: output diff --git a/ansible_collections/dellemc/os9/roles/os9_logging/templates/os9_logging.j2 b/ansible_collections/dellemc/os9/roles/os9_logging/templates/os9_logging.j2 new file mode 100644 index 000000000..024375651 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_logging/templates/os9_logging.j2 @@ -0,0 +1,198 @@ +#jinja2: trim_blocks: True,lstrip_blocks: True +{############################################# +Purpose: +Configure logging commands for os9 Devices +os9_logging: + logging: + - ip : 1.1.1.1 + state: present + - ip: 2.2.2.2 + secure_port: 1025 + tcp_port: 1024 + udp_port: 2000 + state: present + - ip: 3.3.3.3 + vrf: + name: test + secure_port: 1024 + tcp_port: 1025 + udp_port: 2000 + state: present + secure_port: 1025 + tcp_port: 2000 + udp_port: 1025 + state: present + buffer: 6 + console: 7 + trap: 5 + version: 5 + history: 4 + history_size: 3 + monitor: 5 + on: true + extended: true + coredump: + server: + server_ip: 2.2.2.2 + username: u1 + password: pwd + state: present + stackunit: + all: true + unit_num: 5 + state: present + source_interface: "fortyGigE 1/3" +###################################################} +{% if os9_logging is defined and os9_logging %} +{% for key,value in os9_logging.items() %} + {% if key == "buffer" %} + {% if value %} +logging buffered {{ value }} + {% else %} +no logging buffered + {% endif %} + + {% elif key == "console" %} + {% if value %} +logging console {{ value }} + {% else %} +no logging console + {% endif %} + + {% elif key == "monitor" %} + {% if value %} +logging monitor {{ value }} + {% else %} +no logging monitor + {% endif %} + + {% elif key == "source_interface" %} + {% if value %} +logging source-interface {{ value }} + {% else %} +no logging source-interface + {% endif %} + + {% elif key == "version" %} + {% if value %} +logging version {{ value }} + {% else %} +no logging version + {% endif %} + + {% elif key == "history" %} + {% if value %} +logging history {{ value }} + {% else %} +no logging history + {% endif %} + + {% elif key == "history_size" %} + {% if value %} +logging history size {{ value }} + {% else %} +no logging history size + {% endif %} + + {% elif key == "trap" %} + {% if value %} +logging trap {{ value }} + {% else %} +no logging trap + {% endif %} + + {% elif key == "extended" %} + {% if value %} +logging extended + {% else %} +no logging extended + {% endif %} + + {% elif key == "on" %} + {% if value %} +logging on + {% else %} +no logging on + {% endif %} + + {% elif key == "logging" %} + {% if value %} + {% for item in value %} + {% if item.ip is defined and item.ip %} + {% if item.vrf is defined and item.vrf %} + {% if item.vrf.name is defined and item.vrf.name %} + {% if item.vrf.state is defined and item.vrf.state == "absent" %} + {% if item.vrf.secure_port is defined and item.vrf.secure_port %} +no logging {{ item.ip }} vrf {{ item.vrf.name }} secure {{ item.vrf.secure_port }} + {% elif item.vrf.tcp_port is defined and item.vrf.tcp_port %} +no logging {{ item.ip }} vrf {{ item.vrf.name }} tcp {{ item.vrf.tcp_port }} + {% elif item.vrf.udp_port is defined and item.vrf.udp_port %} +no logging {{ item.ip }} vrf {{ item.vrf.name }} udp {{ item.vrf.udp_port }} + {% endif %} + {% else %} + {% if item.vrf.secure_port is defined and item.vrf.secure_port %} +logging {{ item.ip }} vrf {{ item.vrf.name }} secure {{ item.vrf.secure_port }} + {% elif item.vrf.tcp_port is defined and item.vrf.tcp_port %} +logging {{ item.ip }} vrf {{ item.vrf.name }} tcp {{ item.vrf.tcp_port }} + {% elif item.vrf.udp_port is defined and item.vrf.udp_port %} +logging {{ item.ip }} vrf {{ item.vrf.name }} udp {{ item.vrf.udp_port }} + {% endif %} + {% endif %} + {% endif %} + {% endif %} + {% if item.state is defined and item.state == "absent" %} + {% if item.secure_port is defined and item.secure_port %} +no logging {{ item.ip }} secure {{ item.secure_port }} + {% elif item.tcp_port is defined and item.tcp_port %} +no logging {{ item.ip }} tcp {{ item.tcp_port }} + {% elif item.udp_port is defined and item.udp_port %} +no logging {{ item.ip }} udp {{ item.udp_port }} + {% else %} +no logging {{ item.ip }} + {% endif %} + {% else %} + {% if item.secure_port is defined and item.secure_port %} +logging {{ item.ip }} secure {{ item.secure_port }} + {% elif item.tcp_port is defined and item.tcp_port %} +logging {{ item.ip }} tcp {{ item.tcp_port }} + {% elif item.udp_port is defined and item.udp_port %} +logging {{ item.ip }} udp {{ item.udp_port }} + {% else %} +logging {{ item.ip }} + {% endif %} + {% endif %} + {% endif %} + {% endfor %} + {% endif %} + + {% elif key == "coredump" %} + {% if value %} + {% if value.server is defined and value.server %} + {% if value.server.server_ip is defined and value.server.server_ip %} + {% if value.server.state is defined and value.server.state == "absent" %} +no logging coredump server {{ value.server.server_ip }}] + {% else %} + {% if value.server.username is defined and value.server.username and value.server.password is defined and value.server.password %} +logging coredump server {{ value.server.server_ip }} username {{ value.server.username }} password {{ value.server.password }} + {% endif %} + {% endif %} + {% endif %} + {% endif %} + {% if value.stackunit is defined and value.stackunit %} + {% if value.stackunit.all is defined and value.stackunit.all %} + {% set my_str = "all " %} + {% else %} + {% if value.stackunit.unit_num is defined and value.stackunit.unit_num %} + {% set my_str = value.stackunit.unit_num|string %} + {% endif %} + {% endif %} + {% if value.stackunit.state is defined and value.stackunit.state == "absent" %} +no logging coredump stack-unit {{ my_str }} + {% else %} +logging coredump stack-unit {{ my_str }} + {% endif %} + {% endif %} + {% endif %} + {% endif %} +{% endfor %} +{% endif %}
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_logging/tests/inventory.yaml b/ansible_collections/dellemc/os9/roles/os9_logging/tests/inventory.yaml new file mode 100644 index 000000000..5fd33c945 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_logging/tests/inventory.yaml @@ -0,0 +1,20 @@ +spine1 ansible_host=100.94.210.44 +spine2 ansible_host=10.11.182.26 +leaf1 ansible_host=10.11.182.27 +leaf2 ansible_host=10.11.182.28 +leaf3 ansible_host=10.11.182.29 +leaf4 ansible_host=10.11.182.30 + +[spine] +spine1 +spine2 + +[leaf] +leaf1 +leaf2 +leaf3 +leaf4 + +[datacenter:children] +spine +leaf diff --git a/ansible_collections/dellemc/os9/roles/os9_logging/tests/main.os9.yaml b/ansible_collections/dellemc/os9/roles/os9_logging/tests/main.os9.yaml new file mode 100644 index 000000000..0ff9482c8 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_logging/tests/main.os9.yaml @@ -0,0 +1,44 @@ +--- +# vars file for dellemc.os9.os9_logging, +# below gives a sample configuration +# Sample variables for OS9 device +os9_logging: + logging: + - ip: 1.1.1.1 + state: present + - ip: 2.2.2.2 + secure_port: 1025 + tcp_port: 1024 + udp_port: 2000 + state: present + - ip: 3.3.3.3 + vrf: + name: test + secure_port: 1024 + tcp_port: 1025 + udp_port: 2000 + state: present + secure_port: 1025 + tcp_port: 2000 + udp_port: 1025 + state: present + buffer: 6 + console: 7 + trap: 5 + version: 5 + history: 4 + history_size: 3 + monitor: 5 + on: true + extended: true + coredump: + server: + server_ip: 2.2.2.2 + username: u1 + password: pwd + state: present + stackunit: + all: true + unit_num: 5 + state: present + source_interface: "fortyGigE 1/9"
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_logging/tests/test.yaml b/ansible_collections/dellemc/os9/roles/os9_logging/tests/test.yaml new file mode 100644 index 000000000..3f87d4c6c --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_logging/tests/test.yaml @@ -0,0 +1,5 @@ +--- +- hosts: datacenter + connection: network_cli + roles: + - dellemc.os9.os9_logging
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_logging/vars/main.yml b/ansible_collections/dellemc/os9/roles/os9_logging/vars/main.yml new file mode 100644 index 000000000..bc9f7c335 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_logging/vars/main.yml @@ -0,0 +1,2 @@ +--- +# vars file for dellemc.os9.os9_logging
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_ntp/LICENSE b/ansible_collections/dellemc/os9/roles/os9_ntp/LICENSE new file mode 100644 index 000000000..2c9b8e1fd --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_ntp/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/> + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (c) 2020, Dell Inc. All rights reserved. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <https://www.gnu.org/licenses/>. + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + <program> Copyright (c) 2020, Dell Inc. All rights reserved. + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +<https://www.gnu.org/licenses/>. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +<https://www.gnu.org/licenses/why-not-lgpl.html>. diff --git a/ansible_collections/dellemc/os9/roles/os9_ntp/README.md b/ansible_collections/dellemc/os9/roles/os9_ntp/README.md new file mode 100644 index 000000000..81f5f39f4 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_ntp/README.md @@ -0,0 +1,98 @@ +NTP role +======== + +This role facilitates the configuration of network time protocol (NTP) attributes, and it specifically enables configuration of NTP server. This role is abstracted for Dell EMC PowerSwitch platforms running Dell EMC OS9. + +The NTP role requires an SSH connection for connectivity to a Dell EMC OS9 device. You can use any of the built-in OS connection variables. + + +Role variables +-------------- + +- Role is abstracted using the `ansible_network_os` variable that can take `dellemc.os9.os9` as the value. +- If `os9_cfg_generate` is set to true, the variable generates the role configuration commands in a file +- Any role variable with a corresponding state variable set to absent negates the configuration of that variable +- Setting an empty value for any variable negates the corresponding configuration +- Variables and values are case-sensitive + +**os9_ntp keys** + +| Key | Type | Description | Support | +|------------|---------------------------|---------------------------------------------------------|-----------------------| +| ``server`` | list | Configures the NTP server (see ``server.*``) | os9 | +| ``server.ip`` | string (required) | Configures an IPv4 address for the NTP server (A.B.C.D format) | os9 | +| ``server.vrf`` | list | Configures the NTP server for VRF instance; list item contains the names of the VRF instance | os9 | +| ``server.state`` | string: absent,present\* | Deletes the NTP server if set to absent | os9 | + +> **NOTE**: Asterisk (\*) denotes the default value if none is specified. + +Connection variables +-------------------- + +Ansible Dell EMC network roles require connection information to establish communication with the nodes in your inventory. This information can exist in the Ansible *group_vars* or *host_vars* directories or inventory or in the playbook itself. + +| Key | Required | Choices | Description | +|-------------|----------|------------|-------------------------------------------------------| +| ``ansible_host`` | yes | | Specifies the hostname or address for connecting to the remote device over the specified transport | +| ``ansible_port`` | no | | Specifies the port used to build the connection to the remote device; if value is unspecified, the `ANSIBLE_REMOTE_PORT` option is used; it defaults to 22 | +| ``ansible_ssh_user`` | no | | Specifies the username that authenticates the CLI login for the connection to the remote device; if value is unspecified, the `ANSIBLE_REMOTE_USER` environment variable value is used | +| ``ansible_ssh_pass`` | no | | Specifies the password that authenticates the connection to the remote device | +| ``ansible_become`` | no | yes, no\* | Instructs the module to enter privileged mode on the remote device before sending any commands; if value is unspecified, the `ANSIBLE_BECOME` environment variable value is used, and the device attempts to execute all commands in non-privileged mode | +| ``ansible_become_method`` | no | enable, sudo\* | Instructs the module to allow the become method to be specified for handling privilege escalation; if value is unspecified, the `ANSIBLE_BECOME_METHOD` environment variable value is used | +| ``ansible_become_pass`` | no | | Specifies the password to use if required to enter privileged mode on the remote device; if ``ansible_become`` is set to no this key is not applicable | +| ``ansible_network_os`` | yes | os9, null\* | Loads the correct terminal and cliconf plugins to communicate with the remote device | + +> **NOTE**: Asterisk (\*) denotes the default value if none is specified. + +Example playbook +---------------- + +This example uses the *os9_ntp* role to set the NTP server, source ip, authentication and broadcast service. It creates a *hosts* file with the switch details and corresponding variables. The hosts file should define the `ansible_network_os` variable with corresponding Dell EMC OS9 name. + +When the `os9_cfg_generate` variable is set to true, it generates the configuration commands as a .part file in *build_dir* path. By default it is set to false. The example writes a simple playbook that only references the *os9_ntp* role. By including the role, you automatically get access to all of the tasks to configure NTP attributes. + +**Sample hosts file** + + leaf1 ansible_host= <ip_address> + +**Sample host_vars/leaf1** + + host: leaf1 + ansible_ssh_user: xxxxx + ansible_ssh_pass: xxxxx + ansible_network_os: dellemc.os9.os9 + build_dir: ../temp/os9 + + os9_ntp: + source: ethernet 1/1/2 + master: 5 + authenticate: true + authentication_key: + - key_num: 123 + key_string_type: 7 + key_string: test + state: present + trusted_key: + - key_num: 1323 + state: present + server: + - ip: 2.2.2.2 + key: 345 + prefer: true + state: present + intf: + ethernet 1/1/2: + disable: true + broadcast: true + +**Simple playbook to setup NTP — leaf.yaml** + + - hosts: leaf1 + roles: + - dellemc.os9.os9_ntp + +**Run** + + ansible-playbook -i hosts leaf.yaml + +(c) 2017-2020 Dell Inc. or its subsidiaries. All rights reserved. diff --git a/ansible_collections/dellemc/os9/roles/os9_ntp/defaults/main.yml b/ansible_collections/dellemc/os9/roles/os9_ntp/defaults/main.yml new file mode 100644 index 000000000..835ccd0a0 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_ntp/defaults/main.yml @@ -0,0 +1,2 @@ +--- +# defaults file for dellemc.os9.os9_ntp
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_ntp/handlers/main.yml b/ansible_collections/dellemc/os9/roles/os9_ntp/handlers/main.yml new file mode 100644 index 000000000..f8519dd1b --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_ntp/handlers/main.yml @@ -0,0 +1,2 @@ +--- +# handlers file for dellemc.os9.os9_ntp
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_ntp/meta/main.yml b/ansible_collections/dellemc/os9/roles/os9_ntp/meta/main.yml new file mode 100644 index 000000000..1def65b10 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_ntp/meta/main.yml @@ -0,0 +1,18 @@ +# Copyright (c) 2020 Dell Inc. +--- +galaxy_info: + author: Dell EMC Networking Engineering + description: The os9_ntp role facilitates the configuration of NTP attributes in devices running Dell EMC Networking Operating Systems. + company: Dell Inc + license: GPLv3 + min_ansible_version: 2.9.6 + + platforms: + - name: os9 + + galaxy_tags: + - networking + - dell + - emc + - dellemc + - os9 diff --git a/ansible_collections/dellemc/os9/roles/os9_ntp/tasks/main.yml b/ansible_collections/dellemc/os9/roles/os9_ntp/tasks/main.yml new file mode 100644 index 000000000..9ca82a360 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_ntp/tasks/main.yml @@ -0,0 +1,16 @@ +--- +# tasks file for os9 + - name: "Generating NTP configuration for os9" + template: + src: os9_ntp.j2 + dest: "{{ build_dir }}/ntp9_{{ hostname }}.conf.part" + when: (ansible_network_os is defined and ansible_network_os == "dellemc.os9.os9") and ((os9_cfg_generate | default('False'))| bool) +# notify: save config os9 + register: generate_output + + - name: "Provisioning NTP configuration for os9" + dellemc.os9.os9_config: + src: os9_ntp.j2 + when: (ansible_network_os is defined and ansible_network_os == "dellemc.os9.os9") +# notify: save config os9 + register: output diff --git a/ansible_collections/dellemc/os9/roles/os9_ntp/templates/os9_ntp.j2 b/ansible_collections/dellemc/os9/roles/os9_ntp/templates/os9_ntp.j2 new file mode 100644 index 000000000..be4536c37 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_ntp/templates/os9_ntp.j2 @@ -0,0 +1,41 @@ +#jinja2: trim_blocks: True,lstrip_blocks: True +{############################################# +Purpose: +Configure NTP commands for os9 Devices +os9_ntp: + server: + - ip: 2.2.2.2 + vrf: + - test + - management + state: present +###################################################} +{% if os9_ntp is defined and os9_ntp %} + +{% for key,value in os9_ntp.items() %} + {% if key == "server" and value %} + {% for item in value %} + {% if item.ip is defined and item.ip %} + {% if item.state is defined and item.state == "absent" %} + {% if item.vrf is defined and item.vrf %} + {% for vrf_name in item.vrf %} +no ntp server vrf {{ vrf_name }} {{ item.ip }} + {% endfor %} + {% else %} +no ntp server {{ item.ip }} + {% endif %} + {% else %} + {% if item.vrf is defined and item.vrf %} + {% for vrf_name in item.vrf %} +ntp server vrf {{ vrf_name }} {{ item.ip }} + {% endfor %} + {% else %} +ntp server {{ item.ip }} + {% endif %} + {% endif %} + {% endif %} + {% endfor %} + {% endif %} + +{% endfor %} +{% endif %}
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_ntp/tests/inventory.yaml b/ansible_collections/dellemc/os9/roles/os9_ntp/tests/inventory.yaml new file mode 100644 index 000000000..5fd33c945 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_ntp/tests/inventory.yaml @@ -0,0 +1,20 @@ +spine1 ansible_host=100.94.210.44 +spine2 ansible_host=10.11.182.26 +leaf1 ansible_host=10.11.182.27 +leaf2 ansible_host=10.11.182.28 +leaf3 ansible_host=10.11.182.29 +leaf4 ansible_host=10.11.182.30 + +[spine] +spine1 +spine2 + +[leaf] +leaf1 +leaf2 +leaf3 +leaf4 + +[datacenter:children] +spine +leaf diff --git a/ansible_collections/dellemc/os9/roles/os9_ntp/tests/main.os9.yaml b/ansible_collections/dellemc/os9/roles/os9_ntp/tests/main.os9.yaml new file mode 100644 index 000000000..f5f4680b9 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_ntp/tests/main.os9.yaml @@ -0,0 +1,11 @@ +--- +# vars file for +# below gives a sample configuration +# Sample variables for OS9 device +os9_ntp: + server: + - ip: 2.2.2.2 + vrf: + - test + - tes + state: present
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_ntp/tests/test.yaml b/ansible_collections/dellemc/os9/roles/os9_ntp/tests/test.yaml new file mode 100644 index 000000000..0e636d6cf --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_ntp/tests/test.yaml @@ -0,0 +1,5 @@ +--- +- hosts: localhost + connection: network_cli + roles: + - dellemc.os9.os9_ntp
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_ntp/vars/main.yml b/ansible_collections/dellemc/os9/roles/os9_ntp/vars/main.yml new file mode 100644 index 000000000..7b69f09e3 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_ntp/vars/main.yml @@ -0,0 +1,2 @@ +--- +# vars file for dellemc.os9.os9_ntp
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_prefix_list/LICENSE b/ansible_collections/dellemc/os9/roles/os9_prefix_list/LICENSE new file mode 100644 index 000000000..2c9b8e1fd --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_prefix_list/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/> + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (c) 2020, Dell Inc. All rights reserved. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <https://www.gnu.org/licenses/>. + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + <program> Copyright (c) 2020, Dell Inc. All rights reserved. + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +<https://www.gnu.org/licenses/>. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +<https://www.gnu.org/licenses/why-not-lgpl.html>. diff --git a/ansible_collections/dellemc/os9/roles/os9_prefix_list/README.md b/ansible_collections/dellemc/os9/roles/os9_prefix_list/README.md new file mode 100644 index 000000000..a33434f3f --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_prefix_list/README.md @@ -0,0 +1,110 @@ +Prefix-list role +================ + +This role facilitates the configuration of a prefix-list. It supports the configuration of an IP prefix-list, and assigns the prefix-list to line terminals. This role is abstracted for Dell EMC PowerSwitch platforms running Dell EMC OS9. + +The prefix-list role requires an SSH connection for connectivity to a Dell EMC OS9 device. You can use any of the built-in OS connection variables. + +Role variables +-------------- + +- Role is abstracted using the `ansible_network_os` variable that can take `dellemc.os9.os9` as the value +- If `os9_cfg_generate` set to true, the variable generates the role configuration commands in a file +- Any role variable with a corresponding state variable set to absent negates the configuration of that variable +- Setting an empty value for any variable negates the corresponding configuration +- Variables and values are case-sensitive + +**os9_prefix_list keys** + +| Key | Type | Description | Support | +|------------|---------------------------|---------------------------------------------------------|-----------------------| +| ``type`` | string (required): ipv4,ipv6 | Configures an L3 (IPv4/IPv6) prefix-list | os9 | +| ``name`` | string (required) | Configures the prefix-list name | os9 | +| ``description`` | string | Configures the prefix-list description | os9 | +| ``entries`` | list | Configures rules in the prefix-list (see ``seqlist.*``) | os9 | +| ``entries.number`` | int (required) | Specifies the sequence number of the prefix-list rule | os9 | +| ``entries.permit`` | boolean (required): true,false | Specifies the rule to permit packets if set to true, and specifies to reject packets if set to false | os9 | +| ``entries.net_num`` | string (required) | Specifies the network number | os9 | +| ``entries.mask`` | string (required) | Specifies the mask | os9 | +| ``entries.condition_list`` | list | Configures conditions to filter packets (see ``condition_list.*``)| os9 | +| ``condition_list.condition`` | list | Specifies the condition to filter packets from the source address | os9 | +| ``condition_list.prelen`` | string (required) | Specifies the allowed prefix length | os9 | +| ``entries.state`` | string: absent,present\* | Deletes the rule from the prefix-list if set to absent | os9 | +| ``state`` | string: absent,present\* | Deletes the prefix-list if set to absent | os9 | + +> **NOTE**: Asterisk (\*) denotes the default value if none is specified. + +Connection variables +-------------------- + +Ansible Dell EMC network roles require connection information to establish communication with the nodes in your inventory. This information can exist in the Ansible *group_vars* or *host_vars* directories, or inventory or in the playbook itself. + +| Key | Required | Choices | Description | +|-------------|----------|------------|-----------------------------------------------------| +| ``ansible_host`` | yes | | Specifies the hostname or address for connecting to the remote device over the specified transport | +| ``ansible_port`` | no | | Specifies the port used to build the connection to the remote device; if value is unspecified, the `ANSIBLE_REMOTE_PORT` option is used; it defaults to 22 | +| ``ansible_ssh_user`` | no | | Specifies the username that authenticates the CLI login for the connection to the remote device; if value is unspecified, the `ANSIBLE_REMOTE_USER` environment variable value is used | +| ``ansible_ssh_pass`` | no | | Specifies the password that authenticates the connection to the remote device | +| ``ansible_become`` | no | yes, no\* | Instructs the module to enter privileged mode on the remote device before sending any commands; if value is unspecified, the `ANSIBLE_BECOME` environment variable value is used, and the device attempts to execute all commands in non-privileged mode | +| ``ansible_become_method`` | no | enable, sudo\* | Instructs the module to allow the become method to be specified for handling privilege escalation; if value is unspecified, the `ANSIBLE_BECOME_METHOD` environment variable value is used | +| ``ansible_become_pass`` | no | | Specifies the password to use if required to enter privileged mode on the remote device; if ``ansible_become`` is set to no this key is not applicable | +| ``ansible_network_os`` | yes | os9, null\* | Loads the correct terminal and cliconf plugins to communicate with the remote device | + +> **NOTE**: Asterisk (\*) denotes the default value if none is specified. + +Example playbook +---------------- + +This example uses the *os9_prefix_list* role to configure prefix_list for both IPv4 and IPv6. It creates a *hosts* file with the switch details and corresponding variables. The hosts file should define the `ansible_network_os` variable with corresponding Dell EMC OS9 name. + +When `os9_cfg_generate` is set to true, the variable generates the configuration commands as a .part file in *build_dir* path. By default, the variable is set to false. It writes a simple playbook that only references the *os9_prefix_list* role. + +**Sample hosts file** + + leaf1 ansible_host= <ip_address> + +**Sample host_vars/leaf1** + + hostname: leaf1 + ansible_become: yes + ansible_become_method: xxxxx + ansible_become_pass: xxxxx + ansible_ssh_user: xxxxx + ansible_ssh_pass: xxxxx + ansible_network_os: dellemc.os9.os9 + build_dir: ../temp/os9 + os9_prefix_list: + - type: ipv4 + name: spine-leaf + description: Redistribute loopback and leaf networks + entries: + - number: 5 + permit: true + net_num: 10.0.0.0 + mask: 23 + condition_list: + - condition: ge + prelen: 32 + - number: 19 + permit: true + net_num: 20.0.0.0 + mask: 16 + condition_list: + - condition: ge + prelen: 17 + - condition: le + prelen: 18 + state: present + state: present + +**Simple playbook to setup system — leaf.yaml** + + - hosts: leaf1 + roles: + - dellemc.os9.os9_prefix_list + +**Run** + + ansible-playbook -i hosts leaf.yaml + +(c) 2017-2020 Dell Inc. or its subsidiaries. All rights reserved. diff --git a/ansible_collections/dellemc/os9/roles/os9_prefix_list/defaults/main.yml b/ansible_collections/dellemc/os9/roles/os9_prefix_list/defaults/main.yml new file mode 100644 index 000000000..3226617a9 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_prefix_list/defaults/main.yml @@ -0,0 +1,2 @@ +--- +# defaults file for dellemc.os9.os9_prefix_list
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_prefix_list/handlers/main.yml b/ansible_collections/dellemc/os9/roles/os9_prefix_list/handlers/main.yml new file mode 100644 index 000000000..e1a2d9595 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_prefix_list/handlers/main.yml @@ -0,0 +1,2 @@ +--- +# handlers file for dellemc.os9.os9_prefix_list
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_prefix_list/meta/main.yml b/ansible_collections/dellemc/os9/roles/os9_prefix_list/meta/main.yml new file mode 100644 index 000000000..27affba94 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_prefix_list/meta/main.yml @@ -0,0 +1,17 @@ +# Copyright (c) 2017-2020 Dell Inc. +--- +galaxy_info: + author: Dell EMC Networking Engineering + description: The os9_prefix_list role facilitates the configuration of prefix list attributes in devices running Dell EMC Networking Operating Systems. + license: GPLv3 + min_ansible_version: 2.9.6 + + platforms: + - name: os9 + + galaxy_tags: + - networking + - dell + - emc + - dellemc + - os9 diff --git a/ansible_collections/dellemc/os9/roles/os9_prefix_list/tasks/main.yml b/ansible_collections/dellemc/os9/roles/os9_prefix_list/tasks/main.yml new file mode 100644 index 000000000..4ab6c2245 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_prefix_list/tasks/main.yml @@ -0,0 +1,16 @@ +--- +# tasks file for os9 + - name: "Generating prefix list configuration for os9" + template: + src: os9_prefix_list.j2 + dest: "{{ build_dir }}/prefixlist9_{{ hostname }}.conf.part" + when: (ansible_network_os is defined and ansible_network_os == "dellemc.os9.os9") and ((os9_cfg_generate | default('False'))| bool) +# notify: save config os9 + register: generate_output + + - name: "Provisioning prefix list configuration for os9" + dellemc.os9.os9_config: + src: os9_prefix_list.j2 + when: (ansible_network_os is defined and ansible_network_os == "dellemc.os9.os9") +# notify: save config os9 + register: output diff --git a/ansible_collections/dellemc/os9/roles/os9_prefix_list/templates/os9_prefix_list.j2 b/ansible_collections/dellemc/os9/roles/os9_prefix_list/templates/os9_prefix_list.j2 new file mode 100644 index 000000000..63c7086a2 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_prefix_list/templates/os9_prefix_list.j2 @@ -0,0 +1,81 @@ +#jinja2: trim_blocks: True,lstrip_blocks: True +{#################################### +Purpose: +Configure pl on OS9 devices +os9_prefix_list: + - name: testpl + type: ipv4 + description: pl + entries: + - number: 19 + permit: true + net_num: 20.0.0.0 + mask: 16 + condition_list: + - condition: ge + prelen: 17 + - condition: le + prelen: 18 + state: present + state: present +#####################################} +{% if (os9_prefix_list is defined and os9_prefix_list) %} + {% for val in os9_prefix_list %} + {% if val.name is defined and val.name %} + {% if val.state is defined and val.state == "absent" %} + {% if val.type is defined and val.type == "ipv4" %} +no ip prefix-list {{ val.name }} + {% elif val.type is defined and val.type == "ipv6" %} +no ipv6 prefix-list {{ val.name }} + {% endif %} + {% else %} + {% if val.type is defined and val.type == "ipv4" %} +ip prefix-list {{ val.name }} + {% elif val.type is defined and val.type == "ipv6" %} +ipv6 prefix-list {{ val.name }} + {% endif %} + {% if val.description is defined %} + {% if val.description %} + description {{ val.description }} + {% else %} + no description + {% endif %} + {% endif %} + {% if val.entries is defined and val.entries %} + {% for rule in val.entries %} + {% if rule.number is defined and rule.number %} + {% if rule.state is defined and rule.state == "absent" %} + no seq {{ rule.number }} + {% else %} + {% if rule.permit is defined %} + {% if rule.permit %} + {% set is_permit = "permit" %} + {% else %} + {% set is_permit = "deny" %} + {% endif %} + {% endif %} + {% if rule.net_num is defined and rule.net_num %} + {% if rule.net_num == "any" %} + seq {{rule.number}} {{is_permit}} any + {% elif rule.mask is defined and rule.mask %} + {% if rule.condition_list is defined and rule.condition_list %} + {% set condition_string = [' '] %} + {% set item = "" %} + {% for condition in rule.condition_list %} + {% set item= condition_string[0] + condition.condition + ' ' + condition.prelen|string + ' ' %} + {% if condition_string.insert(0,item) %} {% endif %} + {% endfor %} + seq {{rule.number}} {{is_permit}} {{rule.net_num}}/{{rule.mask}}{{ condition_string[0] }} + {% else %} + seq {{rule.number}} {{is_permit}} {{rule.net_num}}/{{rule.mask}} + {% endif %} + {% endif %} + {% endif %} + {% endif %} + {% endif %} + {% endfor %} + {% endif %} + {% endif %} + {% endif %} + {%endfor%} +{%endif%}
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_prefix_list/tests/inventory.yaml b/ansible_collections/dellemc/os9/roles/os9_prefix_list/tests/inventory.yaml new file mode 100644 index 000000000..5fd33c945 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_prefix_list/tests/inventory.yaml @@ -0,0 +1,20 @@ +spine1 ansible_host=100.94.210.44 +spine2 ansible_host=10.11.182.26 +leaf1 ansible_host=10.11.182.27 +leaf2 ansible_host=10.11.182.28 +leaf3 ansible_host=10.11.182.29 +leaf4 ansible_host=10.11.182.30 + +[spine] +spine1 +spine2 + +[leaf] +leaf1 +leaf2 +leaf3 +leaf4 + +[datacenter:children] +spine +leaf diff --git a/ansible_collections/dellemc/os9/roles/os9_prefix_list/tests/main.os9.yaml b/ansible_collections/dellemc/os9/roles/os9_prefix_list/tests/main.os9.yaml new file mode 100644 index 000000000..aceb1cd49 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_prefix_list/tests/main.os9.yaml @@ -0,0 +1,33 @@ +--- +# vars file for dellemc.os9.os9_prefix_list, +# below gives a sample configuration +# Sample variables for OS9 device +os9_prefix_list: + - type: ipv4 + name: spine-leaf + description: Redistribute loopback and leaf networks + entries: + - number: 5 + permit: true + net_num: 10.0.0.0 + mask: 23 + condition_list: + - condition: ge + prelen: 32 + - number: 10 + permit: true + net_num: 10.0.0.0 + mask: 8 + condition_list: + - condition: ge + prelen: 26 + - number: 19 + permit: true + net_num: 20.0.0.0 + mask: 16 + condition_list: + - condition: ge + prelen: 17 + - condition: le + prelen: 18 + state: present
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_prefix_list/tests/test.yaml b/ansible_collections/dellemc/os9/roles/os9_prefix_list/tests/test.yaml new file mode 100644 index 000000000..09ef1a384 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_prefix_list/tests/test.yaml @@ -0,0 +1,5 @@ +--- +- hosts: datacenter + connection: network_cli + roles: + - dellemc.os9.os9_prefix_list
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_prefix_list/vars/main.yml b/ansible_collections/dellemc/os9/roles/os9_prefix_list/vars/main.yml new file mode 100644 index 000000000..9b3bccf52 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_prefix_list/vars/main.yml @@ -0,0 +1,2 @@ +--- +# vars file for dellemc.os9.os9_prefix_list
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_sflow/LICENSE b/ansible_collections/dellemc/os9/roles/os9_sflow/LICENSE new file mode 100644 index 000000000..2c9b8e1fd --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_sflow/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/> + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (c) 2020, Dell Inc. All rights reserved. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <https://www.gnu.org/licenses/>. + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + <program> Copyright (c) 2020, Dell Inc. All rights reserved. + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +<https://www.gnu.org/licenses/>. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +<https://www.gnu.org/licenses/why-not-lgpl.html>. diff --git a/ansible_collections/dellemc/os9/roles/os9_sflow/README.md b/ansible_collections/dellemc/os9/roles/os9_sflow/README.md new file mode 100644 index 000000000..80b3ed90e --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_sflow/README.md @@ -0,0 +1,120 @@ +sFlow role +========== + +This role facilitates the configuration of global and interface level sFlow attributes. It supports the configuration of sFlow collectors at the global level, enable/disable, and specification of sFlow polling-interval, sample-rate, max-datagram size, and so on are supported at the interface and global level. This role is abstracted for Dell EMC PowerSwitch platforms running Dell EMC OS9. + +The sFlow role requires an SSH connection for connectivity to a Dell EMC OS9 device. You can use any of the built-in OS connection variables. + + +Role variables +-------------- + +- Role is abstracted using the `ansible_network_os` variable that can take the `dellemc.os9.os9` as the value +- If `os9_cfg_generate` is set to true, the variable generates the role configuration commands in a file +- Any role variable with a corresponding state variable set to absent negates the configuration of that variable +- Setting an empty value for any variable negates the corresponding configuration +- `os9_sflow` (dictionary) contains keys along with *interface name* (dictionary) +- Interface name can correspond to any of the valid os9 physical interfaces with the unique interface identifier name +- Interface name must be in *<interfacename> <tuple>* format; physical interface name can be in *fortyGigE 1/1* format +- Variables and values are case-sensitive + +**os9_sflow keys** + +| Key | Type | Description | Support | +|------------|---------------------------|---------------------------------------------------------|-----------------------| +| ``sflow_enable`` | boolean: true,false\* | Enables sFlow at a global level | os9 | +| ``collector`` | list | Configures collector information (see ``collector.*``); only two collectors can be configured on os9 devices | os9 | +| ``collector.collector_ip`` | string (required) | Configures an IPv4/IPv6 address for the collector | os9 | +| ``collector.agent_addr`` | string (required) | Configures an IPv4/IPv6 address for the sFlow agent to the collector | os9 | +| ``collector.udp_port`` | integer | Configures UDP port range at the collector level (1 to 65535) | os9 | +| ``collector.max_datagram_size`` | integer | Configures the maximum datagram size for the sFlow datagrams generated (400 to 1500) | os9 | +| ``collector.vrf`` | boolean: true,false* | Configures the management VRF to reach collector if set to true; can be enabled only for IPv4 collector addresses | os9 | +| ``polling_interval`` | integer | Configures the global default counter polling-interval (15 to 86400) | os9 | +| ``sample_rate`` | integer | Configures the global default sample-rate (256 to 8388608) | os9 | +| ``extended_switch`` | boolean: true,false\* | Enables packing extended information for the switch if set to true | os9 | +| ``max_header_size`` | boolean: true,false\* | Enables extended header copy size of 256 bytes if set to true at the global level | os9 | + +> **NOTE**: Asterisk (\*) denotes the default value if none is specified. + +**interface name keys** + +| Key | Type | Notes | +|------------|---------------------------|---------------------------------------------------------| +| ``sflow_enable`` | boolean: true,false\* | Enables sFlow at the interface level | +| ``ingress_enable`` | boolean: true,false\* | Enables ingress sFlow at the interface level | +| ``polling_interval`` | integer | Configures the interface level default counter polling-interval (15 to 86400) | +| ``max_header_size`` | boolean: true,false\* | Enables extended header copy size of 256 bytes if set to true at the interface level | +| ``sample_rate`` | integer | Configures the interface level default sample-rate (256 to 8388608) | + +> **NOTE**: Asterisk (\*) denotes the default value if none is specified. + +Connection variables +-------------------- + +Ansible Dell EMC network roles require connection information to establish communication with the nodes in your inventory. This information can exist in the Ansible *group_vars* or *host_vars* directories,or inventory or in the playbook itself. + +| Key | Required | Choices | Description | +|-------------|----------|------------|-----------------------------------------------------| +| ``ansible_host`` | yes | | Specifies the hostname or address for connecting to the remote device over the specified transport | +| ``ansible_port`` | no | | Specifies the port used to build the connection to the remote device; if value is unspecified, the `ANSIBLE_REMOTE_PORT` option is used; it defaults to 22 | +| ``ansible_ssh_user`` | no | | Specifies the username that authenticates the CLI login for the connection to the remote device; if value is unspecified, the `ANSIBLE_REMOTE_USER` environment variable value is used | +| ``ansible_ssh_pass`` | no | | Specifies the password that authenticates the connection to the remote device | +| ``ansible_become`` | no | yes, no\* | Instructs the module to enter privileged mode on the remote device before sending any commands; if value is unspecified, the `ANSIBLE_BECOME` environment variable value is used, and the device attempts to execute all commands in non-privileged mode | +| ``ansible_become_method`` | no | enable, sudo\* | Instructs the module to allow the become method to be specified for handling privilege escalation; if value is unspecified, the `ANSIBLE_BECOME_METHOD` environment variable value is used | +| ``ansible_become_pass`` | no | | Specifies the password to use if required to enter privileged mode on the remote device; if ``ansible_become`` is set to no this key is not applicable | +| ``ansible_network_os`` | yes | os9, null\* | Loads the correct terminal and cliconf plugins to communicate with the remote device | + +> **NOTE**: Asterisk (\*) denotes the default value if none is specified. + +Example playbook +---------------- + +This example uses the *os9_sflow* role to configure sFlow attributes at interface and global level. It creates a *hosts* file with the switch details and corresponding variables. The hosts file should define the `ansible_network_os` variable with the corresponding Dell EMC OS9 name. + +When `os9_cfg_generate` is set to true, the variable generates the configuration commands as a .part file in *build_dir* path. By default, the variable is set to false. It writes a simple playbook that only references the *os9_sflow* role. By including the role, you automatically get access to all of the tasks to configure sFlow features. + +**Sample hosts file** + + leaf1 ansible_host= <ip_address> + +**Sample host_vars/leaf1** + + hostname: leaf1 + ansible_become: yes + ansible_become_method: xxxxx + ansible_become_pass: xxxxx + ansible_ssh_user: xxxxx + ansible_ssh_pass: xxxxx + ansible_network_os: dellemc.os9.os9 + build_dir: ../temp/os9 + os9_sflow: + sflow_enable: true + collector: + - collector_ip: 1.1.1.1 + agent_addr: 2.2.2.2 + udp_port: 2 + max_datagram_size: 1000 + vrf: true + state: present + polling_interval: 30 + sample_rate: 1024 + extended_switch : true + max_header_size: true + fortyGigE 1/1: + sflow_enable : true + ingress_enable: true + polling_interval: 30 + sample_rate: 1024 + max_header_size: true + +**Simple playbook to setup sflow — leaf.yaml** + + - hosts: leaf1 + roles: + - dellemc.os9.os9_sflow + +**Run** + + ansible-playbook -i hosts leaf.yaml + +(c) 2017-2020 Dell Inc. or its subsidiaries. All rights reserved. diff --git a/ansible_collections/dellemc/os9/roles/os9_sflow/defaults/main.yml b/ansible_collections/dellemc/os9/roles/os9_sflow/defaults/main.yml new file mode 100644 index 000000000..ecfc70664 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_sflow/defaults/main.yml @@ -0,0 +1,2 @@ +--- +# defaults file for dellemc.os9.os9_sflow
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_sflow/handlers/main.yml b/ansible_collections/dellemc/os9/roles/os9_sflow/handlers/main.yml new file mode 100644 index 000000000..1441cc304 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_sflow/handlers/main.yml @@ -0,0 +1,2 @@ +--- +# handlers file for dellemc.os9.os9_sflow
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_sflow/meta/main.yml b/ansible_collections/dellemc/os9/roles/os9_sflow/meta/main.yml new file mode 100644 index 000000000..ca9409c6a --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_sflow/meta/main.yml @@ -0,0 +1,18 @@ +# Copyright (c) 2020 Dell Inc. +--- +galaxy_info: + author: Dell EMC Networking Engineering + description: The os9_sflow role facilitates the configuration of sflow attributes in devices running Dell EMC Networking Operating Systems. + company: Dell Inc + license: GPLv3 + min_ansible_version: 2.9.6 + + platforms: + - name: os9 + + galaxy_tags: + - networking + - dell + - emc + - dellemc + - os9
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_sflow/tasks/main.yml b/ansible_collections/dellemc/os9/roles/os9_sflow/tasks/main.yml new file mode 100644 index 000000000..63d0c2a88 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_sflow/tasks/main.yml @@ -0,0 +1,16 @@ +--- +# tasks file for os9 + - name: "Generating sflow configuration for os9" + template: + src: os9_sflow.j2 + dest: "{{ build_dir }}/sflow9_{{ hostname }}.conf.part" + when: (ansible_network_os is defined and ansible_network_os == "dellemc.os9.os9") and ((os9_cfg_generate | default('False')) | bool) +# notify: save config os9 + register: generate_output + + - name: "Provisioning sflow configuration for os9" + dellemc.os9.os9_config: + src: os9_sflow.j2 + when: (ansible_network_os is defined and ansible_network_os == "dellemc.os9.os9") +# notify: save config os9 + register: output diff --git a/ansible_collections/dellemc/os9/roles/os9_sflow/templates/os9_sflow.j2 b/ansible_collections/dellemc/os9/roles/os9_sflow/templates/os9_sflow.j2 new file mode 100644 index 000000000..be9c47d14 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_sflow/templates/os9_sflow.j2 @@ -0,0 +1,143 @@ +#jinja2: trim_blocks: True,lstrip_blocks: True +{############################################# +Purpose: +Configure sflow commands for os9 Devices +os9_sflow: + sflow_enable: true + collector: + - collector_ip: 1.1.1.1 + agent_addr: 2.2.2.2 + udp_port: 2 + max_datagram_size: 1000 + vrf: true + state: present + polling_interval: 30 + sample_rate: 1024 + extended_switch : true + max_header_size: true + fortyGigE 1/1: + sflow_enable : true + ingress_enable: true + polling_interval: 30 + sample_rate: 1024 + max_header_size: true +###################################################} +{% if os9_sflow is defined and os9_sflow %} + +{% if os9_sflow %} +{% for key,value in os9_sflow.items() %} + {% if key == "sflow_enable" %} + {% if value %} +sflow enable + {% else %} +no sflow enable + {% endif %} + + {% elif key == "collector" %} + {% if value %} + {% for item in value %} + {% if item.state is defined and item.state == "absent" %} + {% if item.collector_ip is defined and item.agent_addr is defined %} + {% if item.collector_ip and item.agent_addr and item.udp_port is defined and item.udp_port and item.max_datagram_size is defined and item.max_datagram_size and item.vrf is defined and item.vrf %} +no sflow collector {{ item.collector_ip }} agent-addr {{ item.agent_addr }} {{ item.udp_port }} max-datagram-size {{ item.max_datagram_size }} vrf management + {% elif item.collector_ip and item.agent_addr and item.udp_port is defined and item.udp_port and item.max_datagram_size is defined and item.max_datagram_size %} +no sflow collector {{ item.collector_ip }} agent-addr {{ item.agent_addr }} {{ item.udp_port }} max-datagram-size {{ item.max_datagram_size }} + {% elif item.collector_ip and item.agent_addr and item.udp_port is defined and item.udp_port and item.vrf is defined and item.vrf %} +no sflow collector {{ item.collector_ip }} agent-addr {{ item.agent_addr }} {{ item.udp_port }} vrf management + {% elif item.collector_ip and item.agent_addr and item.vrf is defined and item.vrf and item.max_datagram_size is defined and item.max_datagram_size %} +no sflow collector {{ item.collector_ip }} agent-addr {{ item.agent_addr }} max-datagram-size {{ item.max_datagram_size }} vrf management + {% elif item.collector_ip and item.agent_addr and item.udp_port is defined and item.udp_port %} +no sflow collector {{ item.collector_ip }} agent-addr {{ item.agent_addr }} {{ item.udp_port }} + {% elif item.collector_ip and item.agent_addr and item.max_datagram_size is defined and item.max_datagram_size %} +no sflow collector {{ item.collector_ip }} agent-addr {{ item.agent_addr }} max-datagram-size {{ item.max_datagram_size }} + {% elif item.collector_ip and item.agent_addr and item.vrf is defined and item.vrf %} +no sflow collector {{ item.collector_ip }} agent-addr {{ item.agent_addr }} vrf management + {% elif item.collector_ip and item.agent_addr %} +no sflow collector {{ item.collector_ip }} agent-addr {{ item.agent_addr }} + {% endif %} + {% endif %} + {% else %} + {% if item.collector_ip is defined and item.agent_addr is defined %} + {% if item.collector_ip and item.agent_addr and item.udp_port is defined and item.udp_port and item.max_datagram_size is defined and item.max_datagram_size and item.vrf is defined and item.vrf %} +sflow collector {{ item.collector_ip }} agent-addr {{ item.agent_addr }} {{ item.udp_port }} max-datagram-size {{ item.max_datagram_size }} vrf management + {% elif item.collector_ip and item.agent_addr and item.udp_port is defined and item.udp_port and item.max_datagram_size is defined and item.max_datagram_size %} +sflow collector {{ item.collector_ip }} agent-addr {{ item.agent_addr }} {{ item.udp_port }} max-datagram-size {{ item.max_datagram_size }} + {% elif item.collector_ip and item.agent_addr and item.udp_port is defined and item.udp_port and item.vrf is defined and item.vrf %} +sflow collector {{ item.collector_ip }} agent-addr {{ item.agent_addr }} {{ item.udp_port }} vrf management + {% elif item.collector_ip and item.agent_addr and item.vrf is defined and item.vrf and item.max_datagram_size is defined and item.max_datagram_size %} +sflow collector {{ item.collector_ip }} agent-addr {{ item.agent_addr }} max-datagram-size {{ item.max_datagram_size }} vrf management + {% elif item.collector_ip and item.agent_addr and item.udp_port is defined and item.udp_port %} +sflow collector {{ item.collector_ip }} agent-addr {{ item.agent_addr }} {{ item.udp_port }} + {% elif item.collector_ip and item.agent_addr and item.max_datagram_size is defined and item.max_datagram_size %} +sflow collector {{ item.collector_ip }} agent-addr {{ item.agent_addr }} max-datagram-size {{ item.max_datagram_size }} + {% elif item.collector_ip and item.agent_addr and item.vrf is defined and item.vrf %} +sflow collector {{ item.collector_ip }} agent-addr {{ item.agent_addr }} vrf management + {% elif item.collector_ip and item.agent_addr %} +sflow collector {{ item.collector_ip }} agent-addr {{ item.agent_addr }} + {% endif %} + {% endif %} + {% endif %} + {% endfor %} + {% endif %} + + {% elif key =="polling_interval" %} + {% if value %} +sflow polling-interval {{ value }} + {% else %} +no sflow polling-interval + {% endif %} + + {% elif key =="sample_rate" %} + {% if value %} +sflow sample-rate {{ value }} + {% else %} +no sflow sample-rate + {% endif %} + + {% elif key == "extended_switch" %} + {% if value %} +sflow extended-switch enable + {% else %} +no sflow extended-switch enable + {% endif %} + + {% elif key == "max_header_size" %} + {% if value %} +sflow max-header-size extended + {% else %} +no sflow max-header-size extended + {% endif %} + + {% elif '/' in key %} + {% set intf_vars = os9_sflow[key] %} +interface {{ key }} + {% if intf_vars.sflow_enable is defined and intf_vars.sflow_enable %} + sflow enable + {% else %} + no sflow enable + {% endif %} + {% if intf_vars.ingress_enable is defined and intf_vars.ingress_enable %} + sflow ingress-enable + {% else %} + no sflow ingress-enable + {% endif %} + {% if intf_vars.max_header_size is defined and intf_vars.max_header_size %} + sflow max-header-size extended + {% else %} + no sflow max-header-size extended + {% endif %} + {% if intf_vars.polling_interval is defined and intf_vars.polling_interval %} + sflow polling-interval {{ intf_vars.polling_interval }} + {% else %} + no sflow polling-interval + {% endif %} + {% if intf_vars.sample_rate is defined and intf_vars.sample_rate %} + sflow sample-rate {{ intf_vars.sample_rate }} + {% else %} + no sflow sample-rate + {% endif %} + + {% endif %} +{% endfor %} +{% endif %} +{% endif %}
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_sflow/tests/inventory.yaml b/ansible_collections/dellemc/os9/roles/os9_sflow/tests/inventory.yaml new file mode 100644 index 000000000..5fd33c945 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_sflow/tests/inventory.yaml @@ -0,0 +1,20 @@ +spine1 ansible_host=100.94.210.44 +spine2 ansible_host=10.11.182.26 +leaf1 ansible_host=10.11.182.27 +leaf2 ansible_host=10.11.182.28 +leaf3 ansible_host=10.11.182.29 +leaf4 ansible_host=10.11.182.30 + +[spine] +spine1 +spine2 + +[leaf] +leaf1 +leaf2 +leaf3 +leaf4 + +[datacenter:children] +spine +leaf diff --git a/ansible_collections/dellemc/os9/roles/os9_sflow/tests/main.os9.yaml b/ansible_collections/dellemc/os9/roles/os9_sflow/tests/main.os9.yaml new file mode 100644 index 000000000..548611c05 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_sflow/tests/main.os9.yaml @@ -0,0 +1,35 @@ +--- +# vars file for dellemc.os9.os9_sflow, +# below gives a sample configuration +# Sample variables for OS9 device +os9_sflow: + sflow: true + collector: + - collector_ip: 1.1.1.1 + agent_addr: 2.2.2.2 + udp_port: + max_datagram_size: 1000 + vrf: true + state: present + - collector_ip: 2.2.2.2 + agent_addr: 2.2.2.2 + udp_port: 3 + max_datagram_size: 1002 + vrf: test + state: absent + polling_interval: 24 + sample_rate: 256 + extended_switch: true + max_header_size: true + fortyGigE 1/1: + sflow: true + ingress_enable: true + polling_interval: 30 + sample_rate: 1024 + max_header_size: true + fortyGigE 1/2: + sflow: true + ingress_enable: true + polling_interval: 20 + sample_rate: 256 + max_header_size: true
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_sflow/tests/test.yaml b/ansible_collections/dellemc/os9/roles/os9_sflow/tests/test.yaml new file mode 100644 index 000000000..8f931d3a1 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_sflow/tests/test.yaml @@ -0,0 +1,5 @@ +--- +- hosts: datacenter + connection: network_cli + roles: + - dellemc.os9.os9_sflow
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_sflow/vars/main.yml b/ansible_collections/dellemc/os9/roles/os9_sflow/vars/main.yml new file mode 100644 index 000000000..e79c81ba2 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_sflow/vars/main.yml @@ -0,0 +1,2 @@ +--- +# vars file for dellemc.os9.os9_sflow
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_snmp/LICENSE b/ansible_collections/dellemc/os9/roles/os9_snmp/LICENSE new file mode 100644 index 000000000..2c9b8e1fd --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_snmp/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/> + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (c) 2020, Dell Inc. All rights reserved. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <https://www.gnu.org/licenses/>. + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + <program> Copyright (c) 2020, Dell Inc. All rights reserved. + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +<https://www.gnu.org/licenses/>. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +<https://www.gnu.org/licenses/why-not-lgpl.html>. diff --git a/ansible_collections/dellemc/os9/roles/os9_snmp/README.md b/ansible_collections/dellemc/os9/roles/os9_snmp/README.md new file mode 100644 index 000000000..0e458b962 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_snmp/README.md @@ -0,0 +1,192 @@ +SNMP role +========= + +This role facilitates the configuration of global SNMP attributes. It supports the configuration of SNMP server attributes including users, group, community, location, and traps. This role is abstracted for Dell EMC PowerSwitch platforms running Dell EMC OS9. + +The SNMP role requires an SSH connection for connectivity to a Dell EMC OS9 device. You can use any of the built-in OS connection variables. + + +Role variables +-------------- + +- Role is abstracted using the `ansible_network_os` variable that can take `dellemc.os9.os9` as the value +- If `os9_cfg_generate` is set to true, the variable generates the role configuration commands in a file +- Any role variable with a corresponding state variable set to absent negates the configuration of that variable +- Setting an empty value for any variable negates the corresponding configuration +- Variables and values are case-sensitive + +**os9_snmp keys** + +| Key | Type | Description | Support | +|------------|---------------------------|---------------------------------------------------------|-----------------------| +| ``snmp_contact`` | string | Configures SNMP contact information | os9 | +| ``snmp_server_vrf`` | string | Specifies vrf instance for snmp requests, removes the vrf instance for snmp requests if kept blank | os9 | +| ``snmp_location`` | string | Configures SNMP location information | os9 | +| ``snmp_community`` | list | Configures SNMP community information (see ``snmp_community.*``) | os9 | +| ``snmp_community.name`` | string (required) | Configures the SNMP community string | os9 | +| ``snmp_community.access_mode`` | string: ro,rw | Configures access-mode for the community | os9 | +| ``snmp_community.state`` | string: absent,present\* | Deletes the SNMP community information if set to absent | os9 | +| ``snmp_host`` | list | Configures SNMP hosts to receive SNMP traps (see ``snmp_host.*``) | os9 | +| ``snmp_host.ipv4`` | string | Configures the IPv4 address for the SNMP trap host | os9 | +| ``snmp_host.ipv6`` | stirng | Configures the IPv6 address for the SNMP trap host | os9 | +| ``snmp_host.communitystring`` | string | Configures the SNMP community string of the trap host | os9 | +| ``snmp_host.udpport`` | string | Configures the UDP number of the SNMP trap host (0 to 65535) | os9 | +| ``snmp_host.version`` | string (required) | Specifies the SNMP version of the host (either 1 or 2c or 3) | os9 | +| ``snmp_host.vrf`` | list | Configures the SNMP VRF trap for the SNMP host (list of VRF names) | os9 | +| ``snmp_host.state`` | string: absent,present\* | Deletes the SNMP trap host if set to absent | os9 | +| ``snmp_traps`` | list | Configures SNMP traps (see ``snmp_traps.*``) | os9 | +| ``snmp_traps.name`` | string | Enables SNMP traps | os9 | +| ``snmp_traps.state`` | string: absent,present\* | Deletes the SNMP trap if set to absent | os9 | +| ``snmp_engine_id`` | string | Configures the SNMPv3 engineID for the local agent | os9 | +| ``snmp_view`` | list | Configures SNMPv3 view information (see ``snmp_view.*``) | os9 | +| ``snmp_view.name`` | string | Configures the SNMP view name (up to 20 characters) | os9 | +| ``snmp_view.oid_subtree`` | integer | Configures the SNMP view for the OID subtree | os9 | +| ``snmp_view.include`` | boolean: true,false | Specifies whether the MIB family should be included or excluded from the view | os9 | +| ``snmp_user`` | list | Configures SNMP users for each group name (see ``snmp_user.*``) | os9 | +| ``snmp_user.name`` | string (required) | Configures the SNMP user name | os9 | +| ``snmp_user.group_name`` | string (required) | Configures the SNMP group name for the user | os9 | +| ``snmp_user.version`` | string: 1,2c,3 (required) | Configures a user entry with the specified SNMP version (either 1 or 2c or 3) | os9 | +| ``snmp_user.access_list`` | dictionary | Configures access-list details; required to configure or negate if defined | os9 | +| ``snmp_user.access_list.access`` | string | Configures the access-list associated with the user | os9 | +| ``snmp_user.access_list.ipv6`` | string | Configures the IPv6 access-list associated with the user | os9 | +| ``snmp_user.encryption`` | boolean: true,false\* | Specifies the encryption for the SNMP user if set to true | os9 | +| ``snmp_user.auth_algorithm`` | string: md5,sha | Configures the authorization algorithm for the SNMP user | os9 | +| ``snmp_user.auth_pass`` | string | Configures the authentication password for the user | os9 | +| ``snmp_user.state`` | string: absent,present\* | Deletes the SNMP user if set to absent | os9 | +| ``snmp_group`` | list | Configures SNMP groups (see ``snmp_group.*``) | os9 | +| ``snmp_group.name`` | string (required) | Configures the SNMP group name | os9 | +| ``snmp_group.version`` | string (required) | Configures the group entry with the specified SNMP version (either 1 or 2c or 3) | os9 | +| ``snmp_group.access_list`` | dict | Configures access-list entries for the group; required to configure or negate if defined | os9 | +| ``snmp_group.access_list.access`` | string | Configures the access-list associated with the group | os9 | +| ``snmp_group.access_list.ipv6`` | string | Configures the IPv6 access-list associated with the group | os9 | +| ``snmp_group.view`` | dict | Configures view entries for the group; required to configure or negate if defined | os9 | +| ``snmp_group.view.notify`` | string | Configures notify view associated with the group | os9 | +| ``snmp_group.view.read`` | string | Configures read view associated with the group | os9 | +| ``snmp_group.view.write`` | string | Configures write view associated with the group | os9 | +| ``snmp_group.context`` | list | Configures context list entries (see ``snmp_group.context.*``) | os9 | +| ``snmp_group.context.context_name`` | string | Configures SNMP-group entries with specified context name | os9 | +| ``snmp_group.context.access_list`` | dictionary | Configures access-list entries for the group with context | os9 | +| ``snmp_group.context.access_list.access`` | string | Configures the access-list associated with the group | os9 | +| ``snmp_group.context.access_list.ipv6`` | string | Configures the IPv6 access-list associated with the group | os9 | +| ``snmp_group.context.view`` | dictionary | Configures view entries for the group with context | os9 | +| ``snmp_group.context.view.notify`` | string | Configures notify view associated with the group | os9 | +| ``snmp_group.context.view.read`` | string | Configures read view associated with the group | os9 | +| ``snmp_group.context.view.write`` | string | Configures write view associated with the group | os9 | +| ``snmp_group.context.state`` | string: absent,present | Deletes the context entries with the group if set to absent | os9 | +| ``snmp_group.state`` | string: absent,present\* | Deletes the associated SNMP group if set to absent | os9 | + +> **NOTE**: Asterisk (\*) denotes the default value if none is specified. + +Connection variables +-------------------- + +Ansible Dell EMC network roles require connection information to establish communication with the nodes in your inventory. This information can exist in the Ansible *group_vars* or *host_vars* directories, or inventory or in the playbook itself. + +| Key | Required | Choices | Description | +|-------------|----------|------------|-----------------------------------------------------| +| ``ansible_host`` | yes | | Specifies the hostname or address for connecting to the remote device over the specified transport | +| ``ansible_port`` | no | | Specifies the port used to build the connection to the remote device; if value is unspecified, the `ANSIBLE_REMOTE_PORT` option is used; it defaults to 22 | +| ``ansible_ssh_user`` | no | | Specifies the username that authenticates the CLI login for the connection to the remote device; if value is unspecified, the `ANSIBLE_REMOTE_USER` environment variable value is used | +| ``ansible_ssh_pass`` | no | | Specifies the password that authenticates the connection to the remote device | +| ``ansible_become`` | no | yes, no\* | Instructs the module to enter privileged mode on the remote device before sending any commands; if value is unspecified, the `ANSIBLE_BECOME` environment variable value is used, and the device attempts to execute all commands in non-privileged mode | +| ``ansible_become_method`` | no | enable, sudo\* | Instructs the module to allow the become method to be specified for handling privilege escalation; if value is unspecified, the `ANSIBLE_BECOME_METHOD` environment variable value is used | +| ``ansible_become_pass`` | no | | Specifies the password to use if required to enter privileged mode on the remote device; if ``ansible_become`` is set to no this key is not applicable | +| ``ansible_network_os`` | yes | os9, null\* | Loads the correct terminal and cliconf plugins to communicate with the remote device | + +> **NOTE**: Asterisk (\*) denotes the default value if none is specified. + +Example playbook +---------------- + +This example uses the *os9_snmp* role to completely set up the SNMP server attributes. It creates a *hosts* file with the switch details and corresponding variables. The hosts file should define the `ansible_network_os` variable with corresponding Dell EMC OS9 name. + +When `os9_cfg_generate` is set to true, the variable generates the configuration commands as a .part file in *build_dir* path. By default, the variable is set to false. It writes a simple playbook that only references the *os9_snmp* role. By including the role, you automatically get access to all of the tasks to configure SNMP features. + +**Sample hosts file** + + leaf1 ansible_host= <ip_address> + +**Sample host_vars/leaf1** + + hostname: leaf1 + ansible_become: yes + ansible_become_method: xxxxx + ansible_become_pass: xxxxx + ansible_ssh_user: xxxxx + ansible_ssh_pass: xxxxx + ansible_network_os: dellemc.os9.os9 + build_dir: ../temp/os9 + + os9_snmp: + snmp_contact: test + snmp_location: chennai + snmp_server_vrf: test + snmp_community: + - name: public + access_mode: ro + state: present + - name: private + access_mode: rw + state: present + snmp_host: + - ipv6: 2001:4898:f0:f09b::2000 + version: "3" + security_level: auth + communitystring: + udpport: + state: absent + snmp_traps: + - name: config + state: present + snmp_engine_id: 1234567890 + snmp_view: + - name: view_1 + oid_subtree: 2 + include: false + state: absent + snmp_user: + - name: user_1 + group_name: grp1 + version: 3 + access_list: + access: a1 + ipv6: ip1 + encryption: true + auth_algorithm: md5 + auth_pass: 12345678 + state: present + snmp_group: + - name: group_1 + version: 2c + access_list: + access: a1 + ipv6: ip1 + state: absent + - name: group_2 + version: 3 + security_level: priv + access_list: + access: a1 + ipv6: ip1 + context: + - context_name: c1 + state: present + - context_name: c2 + access_list: + access: a1 + view: + read: r1 + state: present + state: present + +**Simple playbook to setup snmp — leaf.yaml** + + - hosts: leaf1 + roles: + - dellemc.os9.os9_snmp + +**Run** + + ansible-playbook -i hosts leaf.yaml + +(c) 2017-2020 Dell Inc. or its subsidiaries. All rights reserved. diff --git a/ansible_collections/dellemc/os9/roles/os9_snmp/defaults/main.yml b/ansible_collections/dellemc/os9/roles/os9_snmp/defaults/main.yml new file mode 100644 index 000000000..22c7b89bb --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_snmp/defaults/main.yml @@ -0,0 +1,2 @@ +--- +# defaults file for dellemc.os9.os9_snmp
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_snmp/handlers/main.yml b/ansible_collections/dellemc/os9/roles/os9_snmp/handlers/main.yml new file mode 100644 index 000000000..f04bb2b58 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_snmp/handlers/main.yml @@ -0,0 +1,2 @@ +--- +# handlers file for dellemc.os9.os9_snmp
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_snmp/meta/main.yml b/ansible_collections/dellemc/os9/roles/os9_snmp/meta/main.yml new file mode 100644 index 000000000..9c7bc2e01 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_snmp/meta/main.yml @@ -0,0 +1,18 @@ +# Copyright (c) 2020 Dell Inc. +--- +galaxy_info: + author: Dell EMC Networking Engineering + description: The os9_snmp role facilitates the configuration of snmp attributes in devices running Dell EMC Networking Operating Systems. + company: Dell Inc + license: GPLv3 + min_ansible_version: 2.9.6 + + platforms: + - name: os9 + + galaxy_tags: + - networking + - dell + - emc + - dellemc + - os9 diff --git a/ansible_collections/dellemc/os9/roles/os9_snmp/tasks/main.yml b/ansible_collections/dellemc/os9/roles/os9_snmp/tasks/main.yml new file mode 100644 index 000000000..18e77e056 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_snmp/tasks/main.yml @@ -0,0 +1,16 @@ +--- +# tasks file for os9 + - name: "Generating SNMP configuration for os9" + template: + src: os9_snmp.j2 + dest: "{{ build_dir }}/snmp9_{{ hostname }}.conf.part" + when: (ansible_network_os is defined and ansible_network_os == "dellemc.os9.os9") and ((os9_cfg_generate | default('False'))| bool) +# notify: save config os9 + register: generate_output + + - name: "Provisioning SNMP configuration for os9" + dellemc.os9.os9_config: + src: os9_snmp.j2 + when: (ansible_network_os is defined and ansible_network_os == "dellemc.os9.os9") +# notify: save config os9 + register: output diff --git a/ansible_collections/dellemc/os9/roles/os9_snmp/templates/os9_snmp.j2 b/ansible_collections/dellemc/os9/roles/os9_snmp/templates/os9_snmp.j2 new file mode 100644 index 000000000..6033604e0 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_snmp/templates/os9_snmp.j2 @@ -0,0 +1,524 @@ +#jinja2: trim_blocks: True,lstrip_blocks: True +{############################################# +Purpose: +Configure snmp commands for os9 Devices +os9_snmp: + snmp_contact: test + snmp_location: chennai + snmp_server_vrf: test + snmp_community: + - name: public + access_mode: ro + state: present + - name: private + access_mode: rw + state: present + snmp_context: + - name: SNMP1 + state: absent + snmp_packet_size: 8 + snmp_host: + - ipv4: 1.1.1.1 + version: 3 + security_level: auth + vrf: + - test + - management + communitystring: msft + udpport: 162 + state: absent + - ipv6: 2001:4898:f0:f09b::2000 + version: 1 + state: present + snmp_traps: + - name: config + state: present + snmp_engine_id: 1234567890 + snmp_view: + - name: view_1 + oid_subtree: 2 + include: true + state: absent + snmp_user: + - name: user_1 + group_name: grp1 + encryption : true + auth_algorithm: md5 + auth_pass: 12345678 + version: 3 + access_list: + access: a2 + ipv6: ip1 + state: present + - name: user_2 + group_name: grp2 + version: "2c" + access_list: + ipv6: ip1 + state: absent + snmp_group: + - name: group_1 + version: 2c + access_list: + access: a1 + ipv6: ip1 + view: + read: r1 + write: w1 + notify: n1 + context: + - context_name: c1 + access_list: + access: a1 + ipv6: ip1 + view: + read: r1 + write: w1 + notify: n1 + state: present + - context_name: c2 + state: present + state: present + - name: group_2 + version: 3 + security_level: auth + access_list: + access: a1 + ipv6: ip1 + state: present +###################################################} +{% if os9_snmp is defined and os9_snmp %} + +{% if os9_snmp %} +{% for key,value in os9_snmp.items() %} + {% if key == "snmp_contact" %} + {% if value %} +snmp-server contact {{ value }} + {% else %} +no snmp-server contact + {% endif %} + + {% elif key == "snmp_location" %} + {% if value %} +snmp-server location {{ value }} + {% else %} +no snmp-server location + {% endif %} + + {% elif key == "snmp_server_vrf" %} + {% if value %} +snmp-server vrf {{ value }} + {% else %} +no snmp-server vrf + {% endif %} + + {% elif key == "snmp_community" %} + {% if value %} + {% for item in value %} + {% if item.name is defined and item.name %} + {% if item.state is defined and item.state == "absent" %} +no snmp-server community {{ item.name }} + {% else %} + {% if item.access_mode is defined and item.access_mode %} +snmp-server community {{ item.name }} {{ item.access_mode }} + {% endif %} + {% endif %} + {% endif %} + {% endfor %} + {% endif %} + + {% elif key == "snmp_packet_size" %} + {% if value %} +snmp-server packetsize {{ value }} + {% else %} +no snmp-server packetsize + {% endif %} + + {% elif key == "snmp_context" %} + {% if value %} + {% for item in value %} + {% if item.name is defined and item.name %} + {% if item.state is defined and item.state == "absent" %} +no snmp-server context {{ item.name }} + {% else %} +snmp-server context {{ item.name }} + {% endif %} + {% endif %} + {% endfor %} + {% endif %} + + {% elif key == "snmp_host" and value %} + {% for item in value %} + {% if item.version is defined and item.version == "2c" or item.version == 1 %} + {% set my_version = item.version|string %} + {% elif item.version is defined and item.version == 3 %} + {% if item.security_level is defined and item.security_level %} + {% set my_version = "3"+" "+item.security_level %} + {% endif %} + {% endif %} + {% if item.state is defined and item.state == "absent" %} + {% if item.vrf is defined and item.vrf %} + {% for vrf_name in item.vrf %} + {% if item.ipv4 is defined and item.ipv4 %} + {% if item.communitystring is defined and item.communitystring %} + {% if item.udpport is defined and item.udpport %} +no snmp-server host {{ item.ipv4 }} vrf {{ vrf_name }} traps version {{ my_version }} {{ item.communitystring }} udp-port {{ item.udpport }} + {% else %} +no snmp-server host {{ item.ipv4 }} vrf {{ vrf_name }} traps version {{ my_version }} {{ item.communitystring }} + {% endif %} + {% else %} +no snmp-server host {{ item.ipv4 }} vrf {{ vrf_name }} traps version {{ my_version }} public udp-port 162 + {% endif %} + {% endif %} + {% endfor %} + {% else %} + {% if item.ipv4 is defined and item.ipv4 %} + {% if item.communitystring is defined and item.communitystring %} + {% if item.udpport is defined and item.udpport %} +no snmp-server host {{ item.ipv4 }} traps version {{ my_version }} {{ item.communitystring }} udp-port {{ item.udpport }} + {% else %} +no snmp-server host {{ item.ipv4 }} traps version {{ my_version }} {{ item.communitystring }} + {% endif %} + {% else %} +no snmp-server host {{ item.ipv4 }} traps version {{ my_version }} public udp-port 162 + {% endif %} + {% elif item.ipv6 is defined and item.ipv6 %} + {% if item.communitystring is defined and item.communitystring %} + {% if item.udpport is defined and item.udpport %} +no snmp-server host {{ item.ipv6 }} traps version {{ my_version }} {{ item.communitystring }} udp-port {{ item.udpport }} + {% else %} +no snmp-server host {{ item.ipv6 }} traps version {{ my_version }} {{ item.communitystring }} + {% endif %} + {% else %} +no snmp-server host {{ item.ipv6 }} traps version {{ my_version }} public udp-port 162 + {% endif %} + {% endif %} + {% endif %} + {% else %} + {% if item.vrf is defined and item.vrf %} + {% for vrf_name in item.vrf %} + {% if item.ipv4 is defined and item.ipv4 %} + {% if item.communitystring is defined and item.communitystring %} + {% if item.udpport is defined and item.udpport %} +snmp-server host {{ item.ipv4 }} vrf {{ vrf_name }} traps version {{ my_version }} {{ item.communitystring }} udp-port {{ item.udpport }} + {% else %} +snmp-server host {{ item.ipv4 }} vrf {{ vrf_name }} traps version {{ my_version }} {{ item.communitystring }} udp-port 162 + {% endif %} + {% else %} +snmp-server host {{ item.ipv4 }} vrf {{ vrf_name }} traps version {{ my_version }} public udp-port 162 + {% endif %} + {% endif %} + {% endfor %} + {% else %} + {% if item.ipv4 is defined and item.ipv4 %} + {% if item.communitystring is defined and item.communitystring %} + {% if item.udpport is defined and item.udpport %} +snmp-server host {{ item.ipv4 }} traps version {{ my_version }} {{ item.communitystring }} udp-port {{ item.udpport }} + {% else %} +snmp-server host {{ item.ipv4 }} traps version {{ my_version }} {{ item.communitystring }} udp-port 162 + {% endif %} + {% else %} +snmp-server host {{ item.ipv4 }} traps version {{ my_version }} public udp-port 162 + {% endif %} + {% elif item.ipv6 is defined and item.ipv6 %} + {% if item.communitystring is defined and item.communitystring %} + {% if item.udpport is defined and item.udpport %} +snmp-server host {{ item.ipv6 }} traps version {{ my_version }} {{ item.communitystring }} udp-port {{ item.udpport }} + {% else %} +snmp-server host {{ item.ipv6 }} traps version {{ my_version }} {{ item.communitystring }} udp-port 162 + {% endif %} + {% else %} +snmp-server host {{ item.ipv6 }} traps version {{ my_version }} public udp-port 162 + {% endif %} + {% endif %} + {% endif %} + {% endif %} + {% endfor %} + + {% elif key == "snmp_traps" %} + {% if value %} + {% for val in value %} + {% if val.name is defined and val.name %} + {% if val.state is defined and val.state == "absent" %} + {% if val.name == "all" %} +no snmp-server enable traps + {% else %} +no snmp-server enable traps {{ val.name }} + {% endif %} + {% else %} + {% if val.name == "all" %} + {% set trap_list = ['bgp','snmp authentication coldstart linkdown linkup syslog-reachable syslog-unreachable','vrrp','lacp','entity','stack','stp','ecfm','vlt','fips','ets','xstp','isis','config','pfc','envmon cam-utilization fan supply temperature','ecmp'] %} + {% for name in trap_list %} +snmp-server enable traps {{ name }} + {% endfor %} + {% else %} +snmp-server enable traps {{ val.name }} + {% endif %} + {% endif %} + {% endif %} + {% endfor %} + {% endif %} + + {% elif key == "snmp_engine_id" %} + {% if value %} +snmp-server engineID local {{ value }} + {% else %} +no snmp-server engineID local + {% endif %} + + {% elif key == "snmp_view" %} + {% if value %} + {% for item in value %} + {% if item.name is defined and item.name %} + {% if item.oid_subtree is defined and item.oid_subtree %} + {% if item.state is defined and item.state == "absent" %} +no snmp-server view {{ item.name }} {{ item.oid_subtree }} + {% else %} + {% if item.include is defined %} + {% if item.include %} +snmp-server view {{ item.name }} {{ item.oid_subtree }} included + {% elif not item.include %} +snmp-server view {{ item.name }} {{ item.oid_subtree }} excluded + {% endif %} + {% endif %} + {% endif %} + {% endif %} + {% endif %} + {% endfor %} + {% endif %} + + {% elif key == "snmp_user" %} + {% if value %} + {% for item in value %} + {% if item.name is defined and item.name %} + {% if item.group_name is defined and item.group_name %} + {% if item.version is defined and item.version == "2c" or item.version == 1 %} + {% if item.state is defined and item.state == "absent" %} +no snmp-server user {{ item.name }} {{ item.group_name }} {{ item.version|string }} + {% else %} + {% if item.access_list is defined and item.access_list %} + {% if item.access_list.access is defined and item.access_list.access and item.access_list.ipv6 is defined and item.access_list.ipv6 %} +snmp-server user {{ item.name }} {{ item.group_name }} {{ item.version|string }} access {{ item.access_list.access }} ipv6 {{ item.access_list.ipv6 }} + {% elif item.access_list.access is defined and item.access_list.access %} +snmp-server user {{ item.name }} {{ item.group_name }} {{ item.version|string }} access {{ item.access_list.access }} + {% elif item.access_list.ipv6 is defined and item.access_list.ipv6 %} +snmp-server user {{ item.name }} {{ item.group_name }} {{ item.version|string }} ipv6 {{ item.access_list.ipv6 }} + {% endif %} + {% else %} +snmp-server user {{ item.name }} {{ item.group_name }} {{ item.version|string }} + {% endif %} + {% endif %} + {% elif item.version is defined and item.version == 3 %} + {% if item.state is defined and item.state == "absent" %} +no snmp-server user {{ item.name }} {{ item.group_name }} 3 + {% else %} + {% if item.access_list is defined and item.access_list %} + {% if item.encryption is defined and item.encryption and item.auth_algorithm is defined and item.auth_algorithm and item.auth_pass is defined and item.auth_pass and item.access_list.access is defined and item.access_list.access and item.access_list.ipv6 is defined and item.access_list.ipv6 %} +snmp-server user {{ item.name }} {{ item.group_name }} 3 encrypted auth {{ item.auth_algorithm }} {{ item.auth_pass }} access {{ item.access_list.access }} ipv6 {{ item.access_list.ipv6 }} + {% elif item.encryption is defined and item.encryption and item.auth_algorithm is defined and item.auth_algorithm and item.auth_pass is defined and item.auth_pass and item.access_list.access is defined and item.access_list.access %} +snmp-server user {{ item.name }} {{ item.group_name }} 3 encrypted auth {{ item.auth_algorithm }} {{ item.auth_pass }} access {{ item.access_list.access }} + {% elif item.encryption is defined and item.encryption and item.auth_algorithm is defined and item.auth_algorithm and item.auth_pass is defined and item.auth_pass and item.access_list.ipv6 is defined and item.access_list.ipv6 %} +snmp-server user {{ item.name }} {{ item.group_name }} 3 encrypted auth {{ item.auth_algorithm }} {{ item.auth_pass }} ipv6 {{ item.access_list.ipv6 }} + {% elif item.encryption is defined and item.encryption and item.auth_algorithm is defined and item.auth_algorithm and item.auth_pass is defined and item.auth_pass %} +snmp-server user {{ item.name }} {{ item.group_name }} 3 encrypted auth {{ item.auth_algorithm }} {{ item.auth_pass }} + {% elif item.auth_algorithm is defined and item.auth_algorithm and item.auth_pass is defined and item.auth_pass and item.access_list.access is defined and item.access_list.access and item.access_list.ipv6 is defined and item.access_list.ipv6 %} +snmp-server user {{ item.name }} {{ item.group_name }} 3 auth {{ item.auth_algorithm }} {{ item.auth_pass }} access {{ item.access_list.access }} ipv6 {{ item.access_list.ipv6 }} + {% elif item.auth_algorithm is defined and item.auth_algorithm and item.auth_pass is defined and item.auth_pass and item.access_list.access is defined and item.access_list.access %} +snmp-server user {{ item.name }} {{ item.group_name }} 3 auth {{ item.auth_algorithm }} {{ item.auth_pass }} access {{ item.access_list.access }} + {% elif item.auth_algorithm is defined and item.auth_algorithm and item.auth_pass is defined and item.auth_pass and item.access_list.ipv6 is defined and item.access_list.ipv6 %} +snmp-server user {{ item.name }} {{ item.group_name }} 3 auth {{ item.auth_algorithm }} {{ item.auth_pass }} access {{ item.access_list.access }} ipv6 {{ item.access_list.ipv6 }} + {% elif item.auth_algorithm is defined and item.auth_algorithm and item.auth_pass is defined and item.auth_pass %} +snmp-server user {{ item.name }} {{ item.group_name }} 3 auth {{ item.auth_algorithm }} {{ item.auth_pass }} + {% elif item.access_list.access is defined and item.access_list.access and item.access_list.ipv6 is defined and item.access_list.ipv6 %} +snmp-server user {{ item.name }} {{ item.group_name }} 3 access {{ item.access_list.access }} ipv6 {{ item.access_list.ipv6 }} + {% elif item.access_list.access is defined and item.access_list.access %} +snmp-server user {{ item.name }} {{ item.group_name }} 3 access {{ item.access_list.access }} + {% elif item.access_list.ipv6 is defined and item.access_list.ipv6 %} +snmp-server user {{ item.name }} {{ item.group_name }} 3 ipv6 {{ item.access_list.ipv6 }} + {% endif %} + {% endif %} + {% endif %} + {% endif %} + {% endif %} + {% endif %} + {% endfor %} + {% endif %} + + {% elif key == "snmp_group" and value %} + {% for item in value %} + {% if item.name is defined and item.name %} + {% if item.version is defined and item.version == "2c" or item.version == 1 %} + {% set my_version = item.version|string %} + {% elif item.version is defined and item.version == 3 %} + {% if item.security_level is defined and item.security_level %} + {% set my_version = "3"+" "+item.security_level %} + {% endif %} + {% endif %} + {% if item.context is defined and item.context %} + {% set my_entry = [] %} + {% for it in item.context %} + {% if it.context_name is defined and it.context_name %} + {% if it.access_list is defined and it.access_list and it.view is defined and it.view %} + {% if it.access_list.access is defined and it.access_list.access and it.access_list.ipv6 is defined and it.access_list.ipv6 and it.view.notify is defined and it.view.notify and it.view.read is defined and it.view.read and it.view.write is defined and it.view.write %} + {% if my_entry.append("context "+it.context_name+" access "+it.access_list.access+" ipv6 "+it.access_list.ipv6 +" notify "+it.view.notify+" read "+it.view.read+" write "+it.view.write) %}{% endif %} + {% elif it.access_list.access is defined and it.access_list.access and it.access_list.ipv6 is defined and it.access_list.ipv6 and it.view.notify is defined and it.view.notify and it.view.read is defined and it.view.read %} + {% if my_entry.append("context "+it.context_name+" access "+it.access_list.access+" ipv6 "+it.access_list.ipv6 +" notify "+it.view.notify+" read "+it.view.read) %}{% endif %} + {% elif it.access_list.access is defined and it.access_list.access and it.access_list.ipv6 is defined and it.access_list.ipv6 and it.view.notify is defined and it.view.notify and it.view.write is defined and it.view.write %} + {% if my_entry.append("context "+it.context_name+" access "+it.access_list.access+" ipv6 "+it.access_list.ipv6 +" notify "+it.view.notify+" write "+it.view.write) %}{% endif %} + {% elif it.access_list.access is defined and it.access_list.access and it.access_list.ipv6 is defined and it.access_list.ipv6 and it.view.write is defined and it.view.write and it.view.read is defined and it.view.read %} + {% if my_entry.append("context "+it.context_name+" access "+it.access_list.access+" ipv6 "+it.access_list.ipv6 +" write "+it.view.write+" read "+it.view.read) %}{% endif %} + {% elif it.access_list.access is defined and it.access_list.access and it.access_list.ipv6 is defined and it.access_list.ipv6 and it.view.notify is defined and it.view.notify %} + {% if my_entry.append("context "+it.context_name+" access "+it.access_list.access+" ipv6 "+it.access_list.ipv6 +" notify "+it.view.notify) %}{% endif %} + {% elif it.access_list.access is defined and it.access_list.access and it.access_list.ipv6 is defined and it.access_list.ipv6 and it.view.read is defined and it.view.read %} + {% if my_entry.append("context "+it.context_name+" access "+it.access_list.access+" ipv6 "+it.access_list.ipv6 +" read "+it.view.read) %}{% endif %} + {% elif it.access_list.access is defined and it.access_list.access and it.access_list.ipv6 is defined and it.access_list.ipv6 and it.view.write is defined and it.view.write %} + {% if my_entry.append("context "+it.context_name+" access "+it.access_list.access+" ipv6 "+it.access_list.ipv6 +" write "+it.view.write) %}{% endif %} + {% elif it.access_list.access is defined and it.access_list.access and it.view.notify is defined and it.view.notify and it.view.read is defined and it.view.read and it.view.write is defined and it.view.write%} + {% if my_entry.append("context "+it.context_name+" access "+it.access_list.access+" notify "+it.view.notify+" read "+it.view.read+" write "+it.view.write) %}{% endif %} + {% elif it.access_list.access is defined and it.access_list.access and it.view.notify is defined and it.view.notify and it.view.read is defined and it.view.read %} + {% if my_entry.append("context "+it.context_name+" access "+it.access_list.access+" notify "+it.view.notify+" read "+it.view.read) %}{% endif %} + {% elif it.access_list.access is defined and it.access_list.access and it.view.notify is defined and it.view.notify and it.view.write is defined and it.view.write %} + {% if my_entry.append("context "+it.context_name+" access "+it.access_list.access+" notify "+it.view.notify+" write "+it.view.write) %}{% endif %} + {% elif it.access_list.access is defined and it.access_list.access and it.view.write is defined and it.view.write and it.view.read is defined and it.view.read %} + {% if my_entry.append("context "+it.context_name+" access "+it.access_list.access+" write "+it.view.write+" read "+it.view.read) %}{% endif %} + {% elif it.access_list.access is defined and it.access_list.access and it.view.notify is defined and it.view.notify %} + {% if my_entry.append("context "+it.context_name+" access "+it.access_list.access+" notify "+it.view.notify) %}{% endif %} + {% elif it.access_list.access is defined and it.access_list.access and it.view.read is defined and it.view.read %} + {% if my_entry.append("context "+it.context_name+" access "+it.access_list.access+" read "+it.view.read) %}{% endif %} + {% elif it.access_list.access is defined and it.access_list.access and it.view.write is defined and it.view.write %} + {% if my_entry.append("context "+it.context_name+" access "+it.access_list.access+" write "+it.view.write) %}{% endif %} + {% elif it.access_list.ipv6 is defined and it.access_list.ipv6 and it.view.notify is defined and it.view.notify and it.view.read is defined and it.view.read and it.view.write is defined and it.view.write%} + {% if my_entry.append("context "+it.context_name+" ipv6 "+it.access_list.ipv6+" notify "+it.view.notify+" read "+it.view.read+" write "+it.view.write) %}{% endif %} + {% elif it.access_list.ipv6 is defined and it.access_list.ipv6 and it.view.notify is defined and it.view.notify and it.view.read is defined and it.view.read %} + {% if my_entry.append("context "+it.context_name+" ipv6 "+it.access_list.ipv6+" notify "+it.view.notify+" read "+it.view.read) %}{% endif %} + {% elif it.access_list.ipv6 is defined and it.access_list.ipv6 and it.view.notify is defined and it.view.notify and it.view.write is defined and it.view.write %} + {% if my_entry.append("context "+it.context_name+" ipv6 "+it.access_list.ipv6+" notify "+it.view.notify+" write "+it.view.write) %}{% endif %} + {% elif it.access_list.ipv6 is defined and it.access_list.ipv6 and it.view.write is defined and it.view.write and it.view.read is defined and it.view.read %} {% if my_entry.append("context "+it.context_name+" ipv6 "+it.access_list.ipv6+" write "+it.view.write+" read "+it.view.read) %}{% endif %} + {% elif it.access_list.ipv6 is defined and it.access_list.ipv6 and it.view.notify is defined and it.view.notify %} {% if my_entry.append("context "+it.context_name+" ipv6 "+it.access_list.ipv6+" notify "+it.view.notify) %}{% endif %} + {% elif it.access_list.ipv6 is defined and it.access_list.ipv6 and it.view.read is defined and it.view.read %} + {% if my_entry.append("context "+it.context_name+" ipv6 "+it.access_list.ipv6+"read "+it.view.read) %}{% endif %} + {% elif it.access_list.ipv6 is defined and it.access_list.ipv6 and it.view.write is defined and it.view.write %} {% if my_entry.append("context "+it.context_name+" ipv6 "+it.access_list.ipv6+" write "+it.view.write) %}{% endif %} + {% endif %} + {% elif it.access_list is defined and it.access_list %} + {% if it.access_list.access is defined and it.access_list.access and it.access_list.ipv6 is defined and it.access_list.ipv6 %} + {% if my_entry.append("context "+it.context_name+" access "+it.access_list.access+" ipv6 "+it.access_list.ipv6) %}{% endif %} + {% elif it.access_list.access is defined and it.access_list.access %} + {% if my_entry.append("context "+it.context_name+" access "+it.access_list.access) %}{% endif %} + {% elif it.access_list.ipv6 is defined and it.access_list.ipv6 %} + {% if my_entry.append("context "+it.context_name+" ipv6 "+it.access_list.ipv6) %}{% endif %} + {% endif %} + {% elif it.view is defined and it.view %} + {% if it.view.notify is defined and it.view.notify and it.view.read is defined and it.view.read and it.view.write is defined and it.view.write %} + {% if my_entry.append("context "+it.context_name+" notify "+it.view.notify+" read "+it.view.read+" write "+it.view.write) %}{% endif %} + {% elif it.view.notify is defined and it.view.notify and it.view.read is defined and it.view.read %} + {% if my_entry.append("context "+it.context_name+" notify "+it.view.notify+" read "+it.view.read) %}{% endif %} + {% elif it.view.notify is defined and it.view.notify and it.view.write is defined and it.view.write %} + {% if my_entry.append("context "+it.context_name+" notify "+it.view.notify+" write "+it.view.write) %}{% endif %} + {% elif it.view.read is defined and it.view.read and it.view.write is defined and it.view.write %} + {% if my_entry.append("context "+it.context_name+" read "+it.view.read+" write "+it.view.write) %}{% endif %} + {% elif it.view.read is defined and it.view.read %} + {% if my_entry.append("context "+it.context_name+" read "+it.view.read) %}{% endif %} + {% elif it.view.notify is defined and it.view.notify %} + {% if my_entry.append("context "+it.context_name+" notify "+it.view.notify) %}{% endif %} + {% elif it.view.write is defined and it.view.write %} + {% if my_entry.append("context "+it.context_name+" write "+it.view.write) %}{% endif %} + {% endif %} + {% else %} + {% if my_entry.append("context "+it.context_name) %}{% endif %} + {% endif %} + {% endif %} + {% endfor %} + {% endif %} + {% if item.access_list is defined and item.access_list and item.view is defined and item.view %} + {% if item.access_list.access is defined and item.access_list.access and item.access_list.ipv6 is defined and item.access_list.ipv6 and item.view.notify is defined and item.view.notify and item.view.read is defined and item.view.read and item.view.write is defined and item.view.write %} + {% set my_en = "access "+item.access_list.access+" ipv6 "+item.access_list.ipv6 +" notify "+item.view.notify+" read "+item.view.read+" write "+item.view.write %} + {% elif item.access_list.access is defined and item.access_list.access and item.access_list.ipv6 is defined and item.access_list.ipv6 and item.view.notify is defined and item.view.notify and item.view.read is defined and item.view.read %} + {% set my_en = "access "+item.access_list.access+" ipv6 "+item.access_list.ipv6 +" notify "+item.view.notify+" read "+item.view.read %} + {% elif item.access_list.access is defined and item.access_list.access and item.access_list.ipv6 is defined and item.access_list.ipv6 and item.view.read is defined and item.view.read and item.view.write is defined and item.view.write %} + {% set my_en = "access "+item.access_list.access+" ipv6 "+item.access_list.ipv6 +" read "+item.view.read+" write "+item.view.write %} + {% elif item.access_list.access is defined and item.access_list.access and item.access_list.ipv6 is defined and item.access_list.ipv6 and item.view.notify is defined and item.view.notify and item.view.write is defined and item.view.write %} + {% set my_en = "access "+item.access_list.access+" ipv6 "+item.access_list.ipv6 +" notify "+item.view.notify+" write "+item.view.write %} + {% elif item.access_list.access is defined and item.access_list.access and item.access_list.ipv6 is defined and item.access_list.ipv6 and item.view.notify is defined and item.view.notify %} + {% set my_en = "access "+item.access_list.access+" ipv6 "+item.access_list.ipv6 +" notify "+item.view.notify %} + {% elif item.access_list.access is defined and item.access_list.access and item.access_list.ipv6 is defined and item.access_list.ipv6 and item.view.read is defined and item.view.read %} + {% set my_en = "access "+item.access_list.access+" ipv6 "+item.access_list.ipv6 +" read "+item.view.read %} + {% elif item.access_list.access is defined and item.access_list.access and item.access_list.ipv6 is defined and item.access_list.ipv6 and item.view.write is defined and item.view.write %} + {% set my_en = "access "+item.access_list.access+" ipv6 "+item.access_list.ipv6+" write "+item.view.write %} + {% elif item.access_list.access is defined and item.access_list.access and item.view.notify is defined and item.view.notify and item.view.read is defined and item.view.read and item.view.write is defined and item.view.write %} + {% set my_en = "access "+item.access_list.access+" notify "+item.view.notify+" read "+item.view.read+" write "+item.view.write %} + {% elif item.access_list.access is defined and item.access_list.access and item.view.notify is defined and item.view.notify and item.view.read is defined and item.view.read %} + {% set my_en = "access "+item.access_list.access+" notify "+item.view.notify+" read "+item.view.read %} {% elif item.access_list.access is defined and item.access_list.access and item.view.read is defined and item.view.read and item.view.write is defined and item.view.write %} + {% set my_en = "access "+item.access_list.access+" read "+item.view.read+" write "+item.view.write %} {% elif item.access_list.access is defined and item.access_list.access and item.view.notify is defined and item.view.notify and item.view.write is defined and item.view.write %} + {% set my_en = "access "+item.access_list.access +" notify "+item.view.notify+" write "+item.view.write %} + {% elif item.access_list.access is defined and item.access_list.access and item.view.notify is defined and item.view.notify %} + {% set my_en = "access "+item.access_list.access +" notify "+item.view.notify %} + {% elif item.access_list.access is defined and item.access_list.access and item.view.read is defined and item.view.read %} + {% set my_en = "access "+item.access_list.access+" read "+item.view.read %} + {% elif item.access_list.access is defined and item.access_list.access and item.view.write is defined and item.view.write %} + {% set my_en = "access "+item.access_list.access+" write "+item.view.write %} + {% elif item.access_list.ipv6 is defined and item.access_list.ipv6 and item.view.notify is defined and item.view.notify and item.view.read is defined and item.view.read and item.view.write is defined and item.view.write %} + {% set my_en = "ipv6 "+item.access_list.ipv6+" notify "+item.view.notify+" read "+item.view.read+" write "+item.view.write %} + {% elif item.access_list.ipv6 is defined and item.access_list.ipv6 and item.view.notify is defined and item.view.notify and item.view.read is defined and item.view.read %} + {% set my_en = "ipv6 "+item.access_list.ipv6+" notify "+item.view.notify+" read "+item.view.read %} {% elif item.access_list.ipv6 is defined and item.access_list.ipv6 and item.view.read is defined and item.view.read and item.view.write is defined and item.view.write %} + {% set my_en = "ipv6 "+item.access_list.ipv6+" read "+item.view.read+" write "+item.view.write %} {% elif item.access_list.ipv6 is defined and item.access_list.ipv6 and item.view.notify is defined and item.view.notify and item.view.write is defined and item.view.write %} + {% set my_en = "ipv6 "+item.access_list.ipv6 +" notify "+item.view.notify+" write "+item.view.write %} + {% elif item.access_list.ipv6 is defined and item.access_list.ipv6 and item.view.notify is defined and item.view.notify %} + {% set my_en = "ipv6 "+item.access_list.ipv6 +" notify "+item.view.notify %} + {% elif item.access_list.ipv6 is defined and item.access_list.ipv6 and item.view.read is defined and item.view.read %} + {% set my_en = "ipv6 "+item.access_list.ipv6+" read "+item.view.read %} + {% elif item.access_list.ipv6 is defined and item.access_list.ipv6 and item.view.write is defined and item.view.write %} + {% set my_en = "ipv6 "+item.access_list.ipv6+" write "+item.view.write %} + + {% endif %} + {% elif item.access_list is defined and item.access_list %} + {% if item.access_list.access is defined and item.access_list.access and item.access_list.ipv6 is defined and item.access_list.ipv6 %} + {% set my_en = "access "+item.access_list.access+" ipv6 "+item.access_list.ipv6 %} + {% elif item.access_list.access is defined and item.access_list.access %} + {% set my_en = "access "+item.access_list.access %} + {% elif item.access_list.ipv6 is defined and item.access_list.ipv6 %} + {% set my_en = "ipv6 "+item.access_list.ipv6 %} + {% endif %} + {% elif item.view is defined and item.view %} + {% if item.view.notify is defined and item.view.notify and item.view.read is defined and item.view.read and item.view.write is defined and item.view.write %} + {% set my_en = "notify "+item.view.notify+" read "+item.view.read+" write "+item.view.write %} + {% elif item.view.notify is defined and item.view.notify and item.view.read is defined and item.view.read %} + {% set my_en = "notify "+item.view.notify+" read "+item.view.read %} + {% elif item.view.notify is defined and item.view.notify and item.view.write is defined and item.view.write %} + {% set my_en ="notify "+item.view.notify+" write "+item.view.write %} + {% elif item.view.read is defined and item.view.read and item.view.write is defined and item.view.write %} + {% set my_en = "read "+item.view.read+" write "+item.view.write %} + {% elif item.view.read is defined and item.view.read %} + {% set my_en = "read "+item.view.read %} + {% elif item.view.notify is defined and item.view.notify %} + {% set my_en = "notify "+item.view.notify %} + {% elif item.view.write is defined and item.view.write %} + {% set my_en = "write "+item.view.write %} + {% endif %} + {% endif %} + {% if item.state is defined and item.state == "absent" %} +no snmp-server group {{ item.name }} {{ my_version }} + {% else %} + {% if my_en is defined and my_en %} +snmp-server group {{ item.name }} {{ my_version }} {{ my_en }} + {% else %} +snmp-server group {{ item.name }} {{ my_version }} + {% endif %} + {% endif %} + {% set my_en = "" %} + {% if item.context is defined %} + {% set i = 0 %} + {% for it in item.context %} + {% if it.state is defined and it.state == "absent" %} +no snmp-server group {{ item.name }} {{ my_version }} context {{ it.context_name }} + {% else %} +snmp-server group {{ item.name }} {{ my_version }} {{ my_entry[i] }} + {% endif %} + {% set i = i+1 %} + {% endfor %} + {% endif %} + {% endif %} + {% endfor %} + {% endif %} +{% endfor %} +{% endif %} +{% endif %}
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_snmp/tests/inventory.yaml b/ansible_collections/dellemc/os9/roles/os9_snmp/tests/inventory.yaml new file mode 100644 index 000000000..5fd33c945 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_snmp/tests/inventory.yaml @@ -0,0 +1,20 @@ +spine1 ansible_host=100.94.210.44 +spine2 ansible_host=10.11.182.26 +leaf1 ansible_host=10.11.182.27 +leaf2 ansible_host=10.11.182.28 +leaf3 ansible_host=10.11.182.29 +leaf4 ansible_host=10.11.182.30 + +[spine] +spine1 +spine2 + +[leaf] +leaf1 +leaf2 +leaf3 +leaf4 + +[datacenter:children] +spine +leaf diff --git a/ansible_collections/dellemc/os9/roles/os9_snmp/tests/main.os9.yaml b/ansible_collections/dellemc/os9/roles/os9_snmp/tests/main.os9.yaml new file mode 100644 index 000000000..98cba1e5a --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_snmp/tests/main.os9.yaml @@ -0,0 +1,83 @@ +--- +# vars file for dellemc.os9.os9_snmp, +# below gives a sample configuration +# Sample variables for OS9 device +os9_snmp: + snmp_contact: test + snmp_location: chennai + snmp_server_vrf: test + snmp_context: + - name: SNMP1 + state: present + snmp_packet_size: 16 + snmp_community: + - name: public + access_mode: ro + state: present + - name: private + access_mode: rw + state: present + snmp_host: + - ipv4: 1.1.1.1 + version: 3 + vrf: + - test + - management + security_level: noauth + communitystring: ab + udpport: 1 + state: absent + - ipv6: 2001:4898:f0:f09b::2000 + version: 1 + state: present + snmp_traps: + - name: config + state: present + snmp_engine_id: 1234567890 + snmp_view: + - name: view_1 + oid_subtree: 2 + include: false + state: absent + snmp_user: + - name: user_1 + group_name: grp1 + version: 3 + access_list: + access: a1 + encryption: true + auth_algorithm: md5 + auth_pass: 12345678 + state: present + - name: user_2 + group_name: grp1 + version: "2c" + access_list: + access: a2 + ipv6: ip1 + state: present + snmp_group: + - name: group_1 + version: 2c + access_list: + access: a1 + ipv6: ip1 + context: + - context_name: c1 + state: present + - context_name: c2 + access_list: + access: a1 + ipv6: ip1 + view: + notify: n1 + read: r1 + write: w1 + state: absent + - name: group_2 + version: 3 + security_level: priv + access_list: + access: a1 + ipv6: ip1 + state: present
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_snmp/tests/test.yaml b/ansible_collections/dellemc/os9/roles/os9_snmp/tests/test.yaml new file mode 100644 index 000000000..cc1736a4a --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_snmp/tests/test.yaml @@ -0,0 +1,5 @@ +--- +- hosts: datacenter + connection: network_cli + roles: + - dellemc.os9.os9_snmp
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_snmp/vars/main.yml b/ansible_collections/dellemc/os9/roles/os9_snmp/vars/main.yml new file mode 100644 index 000000000..9fa364343 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_snmp/vars/main.yml @@ -0,0 +1,2 @@ +--- +# vars file for dellemc.os9.os9_snmp
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_system/LICENSE b/ansible_collections/dellemc/os9/roles/os9_system/LICENSE new file mode 100644 index 000000000..2c9b8e1fd --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_system/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/> + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (c) 2020, Dell Inc. All rights reserved. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <https://www.gnu.org/licenses/>. + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + <program> Copyright (c) 2020, Dell Inc. All rights reserved. + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +<https://www.gnu.org/licenses/>. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +<https://www.gnu.org/licenses/why-not-lgpl.html>. diff --git a/ansible_collections/dellemc/os9/roles/os9_system/README.md b/ansible_collections/dellemc/os9/roles/os9_system/README.md new file mode 100644 index 000000000..36e5e1633 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_system/README.md @@ -0,0 +1,223 @@ +System role +=========== + +This role facilitates the configuration of global system attributes, and it specifically enables configuration of hostname and enable password. It supports the configuration of management route, hash alogrithm, clock, line terminal, banner, and reload type. This role is abstracted for Dell EMC PowerSwitch platforms running Dell EMC OS9. + +The System role requires an SSH connection for connectivity to a Dell EMC OS9 device. You can use any of the built-in OS connection variables. + +Role variables +-------------- + +- Role is abstracted using the `ansible_network_os` variable that can take `dellemc_netowrking.os9.os9` as the value +- If `os9_cfg_generate` is set to true, the variable generates the role configuration commands in a file +- Any role variable with a corresponding state variable set to absent negates the configuration of that variable +- Setting an empty value for any variable negates the corresponding configuration +- Variables and values are case-sensitive + +**os9_system keys** + +| Key | Type | Description | Support | +|------------|---------------------------|---------------------------------------------------------|-----------------------| +| ``hostname`` | string | Configures a hostname to the device (no negate command) | os9 | +| ``unique_hostname`` | boolean: true,false\* | Configures a unique hostname in the switch, only applicable to the FN IOM and MXL platform modules | os9 | +| ``enable_password`` | string | Configures the enable password | os9 | +| ``management_rt`` | list | Configures the management route | os9 | +| ``management_rt.ip`` | string (required) | Configures the IP destination prefix for the management route (A.B.C.D format for IPv4, A:B:C:D::E format for IPv6) | os9 | +| ``management_rt.ipv4`` | boolean: true\*,false | Specifies if the management route is an IPv4 or IPv6 address; if false or undefined, the IP is set as IPv6 | os9 | +| ``management_rt.state`` | string: absent,present\* | Deletes the management route if set to absent | os9 | +| ``line_terminal`` | dictionary | Configures the terminal line (see ``line_terminal.*``) | os9 | +| ``line_terminal.<terminal>`` | dictionary | Configures the primary or virtual terminal line (console <line_number> or vty <line_number> values) | os9 | +| ``<terminal>.exec_timeout`` | string | Configures the EXEC timeout (<min> <sec> values) | os9 | +| ``<terminal>.exec_banner`` | boolean: true,false\* | Configures the EXEC banner | os9 | +| ``<terminal>.login_banner`` | boolean: true,false\* | Configures the login banner | os9 | +| ``<terminal>.motd_banner`` | boolean: true,false\* | Configures the MOTD banner | os9 | +| ``service_passwd_encryption`` | boolean: true,false | Configures system password encryption | os9 | +| ``hash_algo`` | dictionary | Configures hash algorithm commands (see ``hash_algo.*``) | os9 | +| ``hash_algo.algo`` | list | Configures hashing algorithm (see ``algo.*``) | os9 | +| ``algo.name`` | string (required) | Configures the name of the hashing algorithm | os9 | +| ``algo.mode`` | string (required) | Configures the hashing algorithm mode | os9 | +| ``algo.stack_unit`` | integer | Configures the stack-unit for the hashing algorithm | os9 | +| ``algo.port_set`` | integer | Configures the port-pipe set for the hashing algorithm | os9 | +| ``algo.state`` | string: absent,present\* | Deletes the hashing algorithm if set to absent | os9 | +| ``hash_algo.seed`` | list | Configures the hashing algorithm seed (see ``seed.*``) | os9 | +| ``seed.value`` | integer (required) | Configures the hashing algorithm seed value | os9 | +| ``seed.stack_unit`` | integer | Configures the stack-unit for the hashing algorithm seed | os9 | +| ``seed.port_set`` | integer | Configures the port-pipe set for the hashing algorithm seed | os9 | +| ``seed.state`` | string: absent,present\* | Deletes the hashing algorithm seed if set to absent | os9 | +| ``banner`` | dictionary | Configures global banner commands (see ``banner.*``) | os9 | +| ``banner.login`` | dictionary | Configures the login banner (see ``login.*``) | os9 | +| ``login.ack_enable`` | boolean: true,false | Configures positive acknowledgement | os9 | +| ``login.ack_prompt`` | string | Configures the positive acknowledgement prompt | os9 | +| ``login.keyboard_interactive`` | boolean: true,false | Configures the keyboard interactive prompt | os9 | +| ``login.banner_text`` | string | Configures the banner text for the login banner; 'c <banner-text> c' format where 'c' is a delimiting character | os9 | +| ``banner.exec`` | string | Configures the banner text for EXEC process creation banner; 'c <banner-text> c' where 'c' is a delimiting character for os9 | os9 | +| ``banner.motd`` | string | Configures the banner text for the message of the day banner; 'c <banner-text> c' where 'c' is a delimiting character for os9 | os9 | +| ``load_balance`` | dictionary | Configures the global traffic load balance (see ``load_balance.*``) | os9 | +| ``load_balance.ingress_port`` | boolean: true,false | Specifies whether to use the source port ID for the hashing algorithm | os9 | +| ``load_balance.tcp_udp`` | boolean: true, false | Configures whether to use TCP/UDP ports in packets for hashing algorithm | os9 | +| ``load_balance.ip_selection`` | list | Configures IPv4 key fields to use in hashing algorithm; mutually exclusive with *load_balance.tcp_udp* for os9 devices (see ``ip_selection.*``) | os9 | +| ``ip_selection.field`` | string | Configures IPv4 key fields to use in hashing algorithm | os9 | +| ``ip_selection.state`` | string: absent,present\* | Deletes the IPv4 key fields if set to absent | os9 | +| ``load_balance.ipv6_selection`` | list | Configures IPv6 key fields to use in hashing algorithm; mutually exclusive with *load_balance.tcp_udp* for os9 devices (see ``ipv6_selection.*``) | os9 | +| ``ipv6_selection.field`` | string | Configures IPv6 key fields to use in hashing algorithm | os9 | +| ``ipv6_selection.state`` | string: absent,present\* | Deletes the IPv6 key fields if set to absent | os9 | +| ``load_balance.tunnel`` | dictionary | Configures tunnel key fields to use in hashing algorithm (see ``tunnel.*``) | os9 | +| ``tunnel.hash_field`` | list | Configures hash field selection (see ``hash_field.*``) | os9 | +| ``hash_field.name`` | string (required) | Configures the hash field selection | os9 | +| ``hash_field.header`` | string | Configures header for load balance | os9 | +| ``hash_field.state`` | string: absent,present\* | Deletes the hash key selection field if set to absent | os9 | +| ``clock`` | dictionary | Configures time-of-day clock (see ``clock.*``) | os9 | +| ``clock.summer_time`` | dictionary | Configures summer (daylight savings) time (see ``summer_time.*``) | os9 | +| ``summer_time.timezone_name`` | string (required) | Configures the time zone name | os9 | +| ``summer_time.type`` | string (required) | Configures absolute or recurring summer time | os9 | +| ``summer_time.start_datetime`` | string | Configures start datetime; <date> <month> <year> <hrs:mins> format | os9 | +| ``summer_time.end_datetime`` | string | Configures end datetime; <date> <month> <year> <hrs:mins> format | os9 | +| ``summer_time.offset_mins`` | integer | Configures offset minutes to add (1 to 1440) | os9 | +| ``summer_time.state`` | string: absent,present\* | Deletes the summer time clock if set to absent | os9 | +| ``clock.timezone`` | dictionary | Configures timezone (see ``timezone.*``) | os9 | +| ``timezone.name`` | string (required) | Configures the timezone name | os9 | +| ``timezone.offset_hours`` | integer | Configures offset hours to add (-23 to 23) | os9 | +| ``timezone.offset_mins`` | integer | Configures offset minutes to add (0 to 59) | os9 | +| ``timezone.state`` | string: absent,present\* | Deletes the time zone if set to absent | os9 | +| ``reload_type`` | dictionary | Configures the reload type (see ``reload_type.*``) | os9 | +| ``reload_type.auto_save`` | boolean: true,false\* | Configures the auto save option for downloaded configuration/script file | os9 | +| ``reload_type.boot_type`` | string: bmp-reload,normal-reload | Configures the boot type | os9 | +| ``reload_type.boot_type_state`` | string: absent,present\* | Deletes the boot type if set to absent | os9 | +| ``reload_type.config_scr_download`` | boolean: true,false\* | Configures whether config/script file needs to be downloaded | os9 | +| ``reload_type.dhcp_timeout`` | integer | Configures DHCP timeout in minutes (0 to 50) | os9 | +| ``reload_type.retry_count`` | integer | Configures the number of retries for image and configuration download (0 to 6) | os9 | +| ``reload_type.relay`` | boolean: true,false\* | Configures the addition of option82 in DHCP client packets | os9 | +| ``reload_type.relay_remote_id`` | string | Configures customize remote ID | os9 | +| ``reload_type.vendor_class_identifier`` | boolean: true,false\* | Configures vendor-class-identifier for DHCP option60 | os9 | + +> **NOTE**: Asterisk (\*) denotes the default value if none is specified. + +Connection variables +******************** + +Ansible Dell EMC network roles require connection information to establish communication with the nodes in your inventory. This information can exist in the Ansible *group_vars* or *host_vars* directories, or inventory or in the playbook itself. + +| Key | Required | Choices | Description | +|-------------|----------|------------|-----------------------------------------------------| +| ``ansible_host`` | yes | | Specifies the hostname or address for connecting to the remote device over the specified transport | +| ``ansible_port`` | no | | Specifies the port used to build the connection to the remote device; if value is unspecified, the `ANSIBLE_REMOTE_PORT` option is used; it defaults to 22 | +| ``ansible_ssh_user`` | no | | Specifies the username that authenticates the CLI login for the connection to the remote device; if value is unspecified, the `ANSIBLE_REMOTE_USER` environment variable value is used | +| ``ansible_ssh_pass`` | no | | Specifies the password that authenticates the connection to the remote device | +| ``ansible_become`` | no | yes, no\* | Instructs the module to enter privileged mode on the remote device before sending any commands; if value is unspecified, the `ANSIBLE_BECOME` environment variable value is used, and the device attempts to execute all commands in non-privileged mode | +| ``ansible_become_method`` | no | enable, sudo\* | Instructs the module to allow the become method to be specified for handling privilege escalation; if value is unspecified, the `ANSIBLE_BECOME_METHOD` environment variable value is used | +| ``ansible_become_pass`` | no | | Specifies the password to use if required to enter privileged mode on the remote device; if ``ansible_become`` is set to no this key is not applicable | +| ``ansible_network_os`` | yes | os9, null\* | Loads the correct terminal and cliconf plugins to communicate with the remote device | + +> **NOTE**: Asterisk (\*) denotes the default value if none is specified. + +Example playbook +---------------- + +This example uses the *os9_system role* to completely set the NTP server, hostname, enable password, management route, hash alogrithm, clock, line terminal, banner and reload type. It creates a *hosts* file with the switch details and corresponding variables. The hosts file should define the `ansible_network_os` variable with corresponding Dell EMC OS9 name. + +When `os9_cfg_generate` is set to true, the variable generates the configuration commands as a .part file in *build_dir* path. By default, the variable is set to false. The system role writes a simple playbook that only references the *os9_system* role. By including the role, you automatically get access to all of the tasks to configure system features. + +**Sample hosts file** + + leaf1 ansible_host= <ip_address> + +**Sample host_vars/leaf1** + + hostname: leaf1 + ansible_become: yes + ansible_become_method: xxxxx + ansible_become_pass: xxxxx + ansible_ssh_user: xxxxx + ansible_ssh_pass: xxxxx + ansible_network_os: dellemc.os9.os9 + build_dir: ../temp/os9 + + os9_system: + hostname: host1 + unique_hostname: True + enable_password: dell + service_passwd_encryption: true + banner: + exec: t hai t + login: + ack_enable: true + ack_prompt: testbanner + keyboard_interactive: true + banner_text: cloginbannerc + motd: t ansibletest t + hash_algo: + algo: + - name: lag + mode: xor1 + stack_unit: 0 + port_set: 0 + state: present + - name: ecmp + mode: xor1 + stack_unit: 0 + port_set: 0 + state: present + seed: + - value: 3 + stack_unit: 0 + port_set: 0 + state: present + - value: 2 + state: present + load_balance: + ingress_port: true + ip_selection: + - field: vlan dest-ip + state: present + ipv6_selection: + - field: dest-ipv6 vlan + state: present + tunnel: + hash_field: + - name: mac-in-mac + header: tunnel-header-mac + state: present + clock: + summer_time: + timezone_name: PST + type: date + start_datetime: 2 jan 1993 22:33 + end_datetime: 3 jan 2017 22:33 + offset_mins: 20 + timezone: + name: IST + offset_hours: -5 + offset_mins: 20 + reload_type: + auto_save: true + boot_type: normal-reload + boot_type_state: absent + config_scr_download: true + dhcp_timeout: 5 + retry_count: 3 + relay: true + relay_remote_id: ho + vendor_class_identifier: aa + management_rt: + - ip: 10.16.148.254 + state: present + ipv4: True + line_terminal: + vty 0: + exec_timeout: 40 + exec_banner: true + vty 1: + exec_timeout: 40 200 + motd_banner: true + +**Simple playbook to setup system — leaf.yaml** + + - hosts: leaf1 + roles: + - dellemc.os9.os9_system + +**Run** + + ansible-playbook -i hosts leaf.yaml + +(c) 2017-2020 Dell Inc. or its subsidiaries. All rights reserved. diff --git a/ansible_collections/dellemc/os9/roles/os9_system/defaults/main.yml b/ansible_collections/dellemc/os9/roles/os9_system/defaults/main.yml new file mode 100644 index 000000000..2892046b6 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_system/defaults/main.yml @@ -0,0 +1,2 @@ +--- +# defaults file for dellemc.os9.os9_system
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_system/handlers/main.yml b/ansible_collections/dellemc/os9/roles/os9_system/handlers/main.yml new file mode 100644 index 000000000..d19126d07 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_system/handlers/main.yml @@ -0,0 +1,2 @@ +--- +# handlers file for dellemc.os9.os9_system
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_system/meta/main.yml b/ansible_collections/dellemc/os9/roles/os9_system/meta/main.yml new file mode 100644 index 000000000..9b7164400 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_system/meta/main.yml @@ -0,0 +1,18 @@ +# Copyright (c) 2020 Dell Inc. +--- +galaxy_info: + author: Dell EMC Networking Engineering + description: The os9_system role facilitates the configuration of system attributes in devices running Dell EMC Networking Operating Systems. + company: Dell Inc + license: GPLv3 + min_ansible_version: 2.9.6 + + platforms: + - name: os9 + + galaxy_tags: + - networking + - dell + - emc + - dellemc + - os9 diff --git a/ansible_collections/dellemc/os9/roles/os9_system/tasks/main.yml b/ansible_collections/dellemc/os9/roles/os9_system/tasks/main.yml new file mode 100644 index 000000000..a52c5041d --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_system/tasks/main.yml @@ -0,0 +1,16 @@ +--- +# tasks file for os9 + - name: "Generating system configuration for os9" + template: + src: os9_system.j2 + dest: "{{ build_dir }}/system9_{{ hostname }}.conf.part" + when: (ansible_network_os is defined and ansible_network_os == "dellemc.os9.os9") and ((os9_cfg_generate | default('False')) | bool) +# notify: save config os9 + register: generate_output + + - name: "Provisioning system configuration for os9" + dellemc.os9.os9_config: + src: os9_system.j2 + when: (ansible_network_os is defined and ansible_network_os == "dellemc.os9.os9") +# notify: save config os9 + register: output diff --git a/ansible_collections/dellemc/os9/roles/os9_system/templates/os9_system.j2 b/ansible_collections/dellemc/os9/roles/os9_system/templates/os9_system.j2 new file mode 100644 index 000000000..594179c94 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_system/templates/os9_system.j2 @@ -0,0 +1,422 @@ +#jinja2: trim_blocks: True,lstrip_blocks: True +{############################################# + +Purpose: +Configure system commands for os9 Devices + +os9_system: + hostname: os9 + unique_hostname: true + enable_password: xxxxx + service_passwd_encryption: true + banner: + exec: t hai t + login: + ack_enable: true + ack_prompt: testbanner + keyboard_interactive: true + banner_text: cloginbannerc + motd: t ansibletest t + hash_algo: + algo: + - name: lag + mode: xor1 + stack_unit: 0 + port_set: 0 + state: present + - name: ecmp + mode: xor1 + stack_unit: 0 + port_set: 0 + state: present + seed: + - value: 3 + stack_unit: 0 + port_set: 0 + state: present + - value: 2 + state: present + load_balance: + ingress_port: true + ip_selection: + - field: vlan dest-ip + state: present + ipv6_selection: + - field: dest-ipv6 vlan + state: present + tunnel: + hash_field: + - name: mac-in-mac + header: tunnel-header-ipv4 + state: present + clock: + summer_time: + timezone_name: PST + type: date + start_datetime: 2 jan 1991 22:33 + end_datetime: 3 jan 2017 22:33 + offset_mins: 20 + timezone: + name: IST + offset_hours: -5 + offset_mins: 20 + reload_type: + auto_save: true + boot_type: normal-reload + config_scr_download: true + dhcp_timeout: 5 + retry_count: 3 + relay: true + relay_remote_id: host + vendor_class_identifier: aa + management_rt: + - ip: 10.16.148.254 + state: present + ipv4: True + line_terminal: + vty 0: + exec_timeout: 40 + exec_banner: true + vty 1: + exec_timeout: 40 200 + motd_banner: true +###################################################} +{% if os9_system is defined and os9_system %} + +{% if os9_system.hostname is defined and os9_system.hostname %} +hostname {{ os9_system.hostname }} +{% endif %} +{% if os9_system %} +{% for key,value in os9_system.items() %} + {% if key == "unique_hostname" %} + {% if value %} +feature unique-name + {% else %} +no feature unique-name + {% endif %} + + {% elif key == "enable_password" %} + {% if value %} +enable password {{ value }} + {% else %} +no enable password + {% endif %} + + {% elif key == "service_passwd_encryption" %} + {% if value %} +service password-encryption + {% else %} +no service password-encryption + {% endif %} + + {% elif key == "clock" and value %} + {% if value.summer_time is defined and value.summer_time %} + {% set time_vars = value.summer_time %} + {% if time_vars.state is defined and time_vars.state == "absent" %} +no clock summer-time + {% else %} + {% if time_vars.timezone_name is defined and time_vars.timezone_name %} + {% if time_vars.type is defined and time_vars.type %} + {% if time_vars.start_datetime is defined and time_vars.start_datetime %} + {% if time_vars.end_datetime is defined and time_vars.end_datetime %} + {% if time_vars.offset_mins is defined and time_vars.offset_mins %} +clock summer-time {{ time_vars.timezone_name }} {{ time_vars.type }} {{ time_vars.start_datetime }} {{ time_vars.end_datetime }} {{ time_vars.offset_mins }} + {% else %} +clock summer-time {{ time_vars.timezone_name }} {{ time_vars.type }} {{ time_vars.start_datetime }} {{ time_vars.end_datetime }} + {% endif %} + {% endif %} + {% endif %} + {% endif %} + {% endif %} + {% endif %} + {% endif %} + {% if value.timezone is defined and value.timezone %} + {% set timezone_vars = value.timezone %} + {% if timezone_vars.state is defined and timezone_vars.state == "absent" %} +no clock timezone + {% else %} + {% if timezone_vars.name is defined and timezone_vars.name %} + {% if timezone_vars.offset_hours is defined and timezone_vars.offset_hours %} + {% if timezone_vars.offset_mins is defined and timezone_vars.offset_mins %} +clock timezone {{ timezone_vars.name }} {{ timezone_vars.offset_hours }} {{ timezone_vars.offset_mins }} + {% else %} +clock timezone {{ timezone_vars.name }} {{ timezone_vars.offset_hours }} + {% endif %} + {% endif %} + {% endif %} + {% endif %} + {% endif %} + + + {% elif key == "hash_algo" and value %} + {% if value.algo is defined and value.algo %} + {% for item in value.algo %} + {% if item.name is defined and item.name %} + {% if item.mode is defined and item.mode %} + {% if item.state is defined and item.state == "absent" %} + {% if item.stack_unit is defined and item.stack_unit >= 0 %} + {% if item.port_set is defined and item.port_set >= 0 %} +no hash-algorithm {{ item.name }} {{ item.mode }} stack-unit {{ item.stack_unit }} port-set {{ item.port_set }} + {% else %} +no hash-algorithm {{ item.name }} {{ item.mode }} stack-unit {{ item.stack_unit }} + {% endif %} + {% else %} +no hash-algorithm {{ item.name }} {{ item.mode }} + {% endif %} + {% else %} + {% if item.stack_unit is defined and item.stack_unit >= 0 %} + {% if item.port_set is defined and item.port_set >= 0 %} +hash-algorithm {{ item.name }} {{ item.mode }} stack-unit {{ item.stack_unit }} port-set {{ item.port_set }} + {% else %} +hash-algorithm {{ item.name }} {{ item.mode }} stack-unit {{ item.stack_unit }} + {% endif %} + {% else %} +hash-algorithm {{ item.name }} {{ item.mode }} + {% endif %} + {% endif %} + {% endif %} + {% endif %} + {% endfor %} + {% endif %} + {% if value.seed is defined and value.seed %} + {% for item in value.seed %} + {% if item.value is defined and item.value >= 0 %} + {% if item.state is defined and item.state == "absent" %} + {% if item.stack_unit is defined and item.stack_unit >= 0 %} + {% if item.port_set is defined and item.port_set >= 0 %} +no hash-algorithm seed {{ item.value }} stack-unit {{ item.stack_unit }} port-set {{ item.port_set }} + {% else %} +no hash-algorithm seed {{ item.value }} stack-unit {{ item.stack_unit }} + {% endif %} + {% else %} +no hash-algorithm seed {{ item.value }} + {% endif %} + {% else %} + {% if item.stack_unit is defined and item.stack_unit >= 0 %} + {% if item.port_set is defined and item.port_set >= 0 %} +hash-algorithm seed {{ item.value }} stack-unit {{ item.stack_unit }} port-set {{ item.port_set }} + {% else %} +hash-algorithm seed {{ item.value }} stack-unit {{ item.stack_unit }} + {% endif %} + {% else %} +hash-algorithm seed {{ item.value }} + {% endif %} + {% endif %} + {% endif %} + {% endfor %} + {% endif %} + + {% elif key == "banner" and value %} + {% if value.exec is defined %} + {% if value.exec %} +banner exec {{ value.exec }} + {% else %} +no banner exec + {% endif %} + {% endif %} + {% if value.motd is defined %} + {% if value.motd %} +banner motd {{ value.motd }} + {% else %} +no banner motd + {% endif %} + {% endif %} + {% if value.login is defined and value.login %} + {% set login_vars = value.login %} + {% if login_vars.ack_enable is defined %} + {% if login_vars.ack_enable %} +banner login acknowledgment enable + {% else %} +no banner login acknowledgment enable + {% endif %} + {% endif %} + {% if login_vars.ack_prompt is defined %} + {% if login_vars.ack_prompt %} +banner login acknowledgment prompt {{ login_vars.ack_prompt }} + {% else %} +no banner login acknowledgment prompt + {% endif %} + {% endif %} + {% if login_vars.keyboard_interactive is defined %} + {% if login_vars.keyboard_interactive %} +banner login keyboard-interactive + {% else %} +no banner login keyboard-interactive + {% endif %} + {% endif %} + {% if login_vars.banner_text is defined %} + {% if login_vars.banner_text %} +banner login {{ login_vars.banner_text }} + {% else %} +no banner login + {% endif %} + {% endif %} + {% endif %} + {% elif key == "load_balance" and value %} + {% if value.ingress_port is defined %} + {% if value.ingress_port %} +load-balance ingress-port enable + {% else %} +no load-balance ingress-port enable + {% endif %} + {% endif %} + {% if value.tcp_udp is defined %} + {% if value.tcp_udp %} +load-balance tcp-udp enable + {% else %} +no load-balance tcp-udp enable + {% endif %} + {% endif %} + {% if value.ip_selection is defined and value.ip_selection %} + {% for item in value.ip_selection %} + {% if item.field is defined and item.field %} + {% if item.state is defined and item.state == "absent" %} +no load-balance ip-selection + {% else %} +load-balance ip-selection {{ item.field }} + {% endif %} + {% endif %} + {% endfor %} + {% endif %} + {% if value.ipv6_selection is defined and value.ipv6_selection %} + {% for item in value.ipv6_selection %} + {% if item.field is defined and item.field %} + {% if item.state is defined and item.state == "absent" %} +no load-balance ipv6-selection + {% else %} +load-balance ipv6-selection {{ item.field }} + {% endif %} + {% endif %} + {% endfor %} + {% endif %} + {% if value.tunnel is defined and value.tunnel %} + {% set tunnel_vars = value.tunnel %} + {% if tunnel_vars.hash_field is defined and tunnel_vars.hash_field %} + {% for item in tunnel_vars.hash_field %} + {% if item.name is defined and item.name %} + {% if item.header is defined and item.header %} + {% if item.state is defined and item.state == "absent" %} +no load-balance tunnel {{ item.name }} {{ item.header }} + {% else %} +load-balance tunnel {{ item.name }} {{ item.header }} + {% endif %} + {% endif %} + {% endif %} + {% endfor %} + {% endif %} + {% endif %} + + {% elif key == "reload_type" and value %} +reload-type + {% if value.auto_save is defined %} + {% if value.auto_save %} + auto-save enable + {% else %} + auto-save disable + {% endif %} + {% endif %} + {% if value.boot_type is defined and value.boot_type %} + {% if boot_type_state is defined and boot_type_state =="absent" %} + no boot-type {{ value.boot_type }} + {% else %} + boot-type {{ value.boot_type }} + {% endif %} + {% endif %} + {% if value.config_scr_download is defined %} + {% if value.config_scr_download %} + config-scr-download enable + {% else %} + config-scr-download disable + {% endif %} + {% endif %} + {% if value.dhcp_timeout is defined %} + {% if value.dhcp_timeout >=0 %} + dhcp-timeout {{ value.dhcp_timeout }} + {% else %} + no dhcp-timeout 0 + {% endif %} + {% endif %} + {% if value.retry_count is defined %} + {% if value.retry_count >=0 %} + retry-count {{ value.retry_count }} + {% else %} + no retry-count 0 + {% endif %} + {% endif %} + {% if value.relay is defined %} + {% if value.relay %} + relay enable + {% else %} + relay disable + {% endif %} + {% endif %} + {% if value.relay_remote_id is defined %} + {% if value.relay_remote_id %} + relay remote-id {{ value.relay_remote_id }} + {% else %} + no relay remote-id a + {% endif %} + {% endif %} + {% if value.vendor_class_identifier is defined %} + {% if value.vendor_class_identifier %} + vendor-class-identifier {{ value.vendor_class_identifier }} + {% else %} + no vendor-class-identifier a + {% endif %} + {% endif %} + + {% elif key == "management_rt" and value %} + {% for item in value %} + {% if item.ip is defined and item.ip %} + {% if item.ipv4 is defined and item.ipv4 %} + {% if item.state is defined and item.state == "absent" %} +no management route 0.0.0.0/0 {{ item.ip }} + {% else %} +management route 0.0.0.0/0 {{ item.ip }} + {% endif %} + {% else %} + {% if item.state is defined and item.state == "absent" %} +no management route ::/0 {{ item.ip }} + {% else %} +management route ::/0 {{ item.ip }} + {% endif %} + {% endif%} + {% endif %} + {% endfor %} + + {% elif key == "line_terminal" and value %} + {% for key in value.keys() %} + {% set vty_vars = value[key] %} +line {{ key }} + {% if vty_vars.exec_timeout is defined %} + {% if vty_vars.exec_timeout %} + {% set timeout = (vty_vars.exec_timeout | string).split(" ") %} + {% if timeout | length > 1 %} + exec-timeout {{ vty_vars.exec_timeout }} + {% else %} + exec-timeout {{ vty_vars.exec_timeout }} 0 + {% endif %} + {% else %} + no exec-timeout + {% endif %} + {% endif %} + {% if vty_vars.exec_banner is defined %} + {% if vty_vars.exec_banner %} + exec-banner + {% else %} + no exec-banner + {% endif %} + {% endif %} + {% if vty_vars.motd_banner is defined %} + {% if vty_vars.motd_banner %} + motd-banner + {% else %} + no motd-banner + {% endif %} + {% endif %} + {% endfor %} + {% endif %} + +{% endfor %} +{% endif %} +{% endif %}
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_system/tests/inventory.yaml b/ansible_collections/dellemc/os9/roles/os9_system/tests/inventory.yaml new file mode 100644 index 000000000..5fd33c945 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_system/tests/inventory.yaml @@ -0,0 +1,20 @@ +spine1 ansible_host=100.94.210.44 +spine2 ansible_host=10.11.182.26 +leaf1 ansible_host=10.11.182.27 +leaf2 ansible_host=10.11.182.28 +leaf3 ansible_host=10.11.182.29 +leaf4 ansible_host=10.11.182.30 + +[spine] +spine1 +spine2 + +[leaf] +leaf1 +leaf2 +leaf3 +leaf4 + +[datacenter:children] +spine +leaf diff --git a/ansible_collections/dellemc/os9/roles/os9_system/tests/main.os9.yaml b/ansible_collections/dellemc/os9/roles/os9_system/tests/main.os9.yaml new file mode 100644 index 000000000..474f282d0 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_system/tests/main.os9.yaml @@ -0,0 +1,74 @@ +--- +# vars file for dellemc.os9.os9_system, +# below gives a sample configuration +# Sample variables for OS9 device +os9_system: + hostname: os9 + enable_password: calvin + line_terminal: + vty 0: + exec_timeout: 40 + vty 1: + exec_timeout: 40 200 + service_passwd_encryption: true + banner: + exec: t hai t + login: + ack_enable: true + ack_prompt: testbanner + keyboard_interactive: true + banner_text: cloginbannerc + motd: t ansibletest t + hash_algo: + algo: + - name: lag + mode: xor1 + stack_unit: 0 + port_set: 0 + state: present + - name: ecmp + mode: xor1 + stack_unit: 0 + port_set: 0 + state: present + seed: + - value: 3 + stack_unit: 0 + port_set: 0 + state: present + - value: 2 + state: present + load_balance: + ingress_port: true + ip_selection: + - field: vlan dest-ip + state: present + ipv6_selection: + - field: dest-ipv6 vlan + state: present + tunnel: + hash_field: + - name: mac-in-mac + header: tunnel-header-mac + state: present + clock: + summer_time: + timezone_name: PST + type: date + start_datetime: 2 jan 1993 22:33 + end_datetime: 3 jan 2017 22:33 + offset_mins: 20 + timezone: + name: IST + offset_hours: -5 + offset_mins: 20 + reload_type: + auto_save: true + boot_type: normal-reload + boot_type_state: absent + config_scr_download: true + dhcp_timeout: 5 + retry_count: 3 + relay: true + relay_remote_id: ho + vendor_class_identifier: aa
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_system/tests/test.yaml b/ansible_collections/dellemc/os9/roles/os9_system/tests/test.yaml new file mode 100644 index 000000000..4d1422200 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_system/tests/test.yaml @@ -0,0 +1,5 @@ +--- +- hosts: datacenter + connection: network_cli + roles: + - dellemc.os9.os9_system
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_system/vars/main.yml b/ansible_collections/dellemc/os9/roles/os9_system/vars/main.yml new file mode 100644 index 000000000..f056f57be --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_system/vars/main.yml @@ -0,0 +1,2 @@ +--- +# vars file for dellemc.os9.os9_system
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_users/LICENSE b/ansible_collections/dellemc/os9/roles/os9_users/LICENSE new file mode 100644 index 000000000..2c9b8e1fd --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_users/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/> + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (c) 2020, Dell Inc. All rights reserved. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <https://www.gnu.org/licenses/>. + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + <program> Copyright (c) 2020, Dell Inc. All rights reserved. + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +<https://www.gnu.org/licenses/>. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +<https://www.gnu.org/licenses/why-not-lgpl.html>. diff --git a/ansible_collections/dellemc/os9/roles/os9_users/README.md b/ansible_collections/dellemc/os9/roles/os9_users/README.md new file mode 100644 index 000000000..2fadbe708 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_users/README.md @@ -0,0 +1,109 @@ +Users role +========== + +This role facilitates the configuration of global system user attributes, and it supports the configuration of CLI users. This role is abstracted for Dell EMC PowerSwitch platforms running Dell EMC OS9. + +The users role requires an SSH connection for connectivity to a Dell EMC OS9 device. You can use any of the built-in OS connection variables. + +Role variables +-------------- + +- Role is abstracted using the `ansible_network_os` variable that can take `dellemc.os9.os9` as the value +- If `os9_cfg_generate` is set to true, the variable generates the role configuration commands in a file +- Any role variable with a corresponding state variable set to absent negates the configuration of that variable +- Setting an empty value for any variable negates the corresponding configuration +- Variables and values are case-sensitive + +**os9_users list keys** + +| Key | Type | Description | Support | +|------------|---------------------------|---------------------------------------------------------|-----------------------| +| ``userrole`` | stirng (required) | Configures the role name which can be configured for users | os9 | +| ``userrole_state`` | string: absent,present\* | Deletes the user role with specified name if set to absent | os9 | +| ``userrole_inherit`` | string: netadmin,netoperator,secadmin,sysadmin\* | Specifies the existing role name to inherit the permissions | os9 | +| ``username`` | string (required) | Configures the username which must adhere to specific format guidelines (valid usernames begin with A-Z, a-z, or 0-9 and can also contain `@#$%^&*-_= +;<>,.~` characters) | os9 | +| ``password`` | string | Configures the password set for the username; | os9 | +| ``role`` | string | Configures the role assigned to the user | os9 | +| ``privilege`` | int | Configures the privilege level for the user (0 to 15); if this key is ommitted, the default privilege is 1 for both os9 | os9 | +| ``access_class`` | string | Configures the access-class for the user | os9 | +| ``pass_key`` | integer: 0\*,7 | Configures the password as encrypted if set to 7 in os9 devices | os9 | +| ``secret`` | string | Configures line password as secret in os9 devices | os9 | +| ``secret_key`` | integer: 0\*,5 | Configures the secret line password using md5 encrypted algorithm | os9 | +| ``state`` | string: absent,present\* | Deletes a user account if set to absent | os9 | + +> **NOTE**: Asterisk (\*) denotes the default value if none is specified. + +Connection variables +-------------------- + +Ansible Dell EMC network roles require connection information to establish communication with the nodes in your inventory. This information can exist in the Ansible *group_vars* or *host_vars* directories, or inventory or in the playbook itself. + +| Key | Required | Choices | Description | +|-------------|----------|------------|-----------------------------------------------------| +| ``ansible_host`` | yes | | Specifies the hostname or address for connecting to the remote device over the specified transport | +| ``ansible_port`` | no | | Specifies the port used to build the connection to the remote device; if value is unspecified, the `ANSIBLE_REMOTE_PORT` option is used; it defaults to 22 | +| ``ansible_ssh_user`` | no | | Specifies the username that authenticates the CLI login for the connection to the remote device; if value is unspecified, the `ANSIBLE_REMOTE_USER` environment variable value is used | +| ``ansible_ssh_pass`` | no | | Specifies the password that authenticates the connection to the remote device | +| ``ansible_become`` | no | yes, no\* | Instructs the module to enter privileged mode on the remote device before sending any commands; if value is unspecified, the `ANSIBLE_BECOME` environment variable value is used, and the device attempts to execute all commands in non-privileged mode | +| ``ansible_become_method`` | no | enable, sudo\* | Instructs the module to allow the become method to be specified for handling privilege escalation; if value is unspecified, the `ANSIBLE_BECOME_METHOD` environment variable value is used | +| ``ansible_become_pass`` | no | | Specifies the password to use if required to enter privileged mode on the remote device; if ``ansible_become`` is set to no this key is not applicable | +| ``ansible_network_os`` | yes | os9, null\* | Loads the correct terminal and cliconf plugins to communicate with the remote device | + +> **NOTE**: Asterisk (\*) denotes the default value if none is specified. + +Example playbook +---------------- + +This example uses the *os9_users* role to configure global system user attributes. The example creates a hosts file with the switch details and corresponding variables. The hosts file should define the `ansible_network_os` variable with corresponding Dell EMC OS9 name. + +If `os9_cfg_generate` is set to true, the variable generates the role configuration commands in a file. It writes a simple playbook that only references the *os9_users* role. By including the role, you automatically get access to all of the tasks to configure user features. + +**Sample hosts file** + + leaf1 ansible_host= <ip_address> + +**Sample host_vars/leaf1** + + hostname: leaf1 + ansible_become: yes + ansible_become_method: xxxxx + ansible_become_pass: xxxxx + ansible_ssh_user: xxxxx + ansible_ssh_pass: xxxxx + ansible_network_os: dellemc.os9.os9 + build_dir: ../temp/os9 + + os9_users: + - userrole: role1 + userrole_state: present + userrole_inherit: sysadmin + - username: u1 + password: test + role: sysadmin + privilege: 0 + state: absent + - username: u1 + password: false + privilege: 1 + access_class: a1 + role: netadmin + state: present + - username: u2 + secret: test1 + secret_key : 0 + access_class: a2 + privilege: 3 + role: sysadmin + state: present + +**Simple playbook to setup users — leaf.yaml** + + - hosts: leaf1 + roles: + - dellemc.os9.os9_users + +**Run** + + ansible-playbook -i hosts leaf.yaml + +(c) 2017-2020 Dell Inc. or its subsidiaries. All rights reserved. diff --git a/ansible_collections/dellemc/os9/roles/os9_users/defaults/main.yml b/ansible_collections/dellemc/os9/roles/os9_users/defaults/main.yml new file mode 100644 index 000000000..b0770388f --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_users/defaults/main.yml @@ -0,0 +1,2 @@ +--- +# defaults file for dellemc.os9.os9_users
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_users/handlers/main.yml b/ansible_collections/dellemc/os9/roles/os9_users/handlers/main.yml new file mode 100644 index 000000000..0b4397912 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_users/handlers/main.yml @@ -0,0 +1,2 @@ +--- +# handlers file for dellemc.os9.os9_users
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_users/meta/main.yml b/ansible_collections/dellemc/os9/roles/os9_users/meta/main.yml new file mode 100644 index 000000000..9dae624a2 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_users/meta/main.yml @@ -0,0 +1,18 @@ +# Copyright (c) 2020 Dell Inc. +--- +galaxy_info: + author: Dell EMC Networking Engineering + description: The os9_users role facilitates the configuration of user attributes in devices running Dell EMC Networking Operating Systems. + company: Dell Inc + license: GPLv3 + min_ansible_version: 2.9.6 + + platforms: + - name: os9 + + galaxy_tags: + - networking + - dell + - emc + - dellemc + - os9
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_users/tasks/main.yml b/ansible_collections/dellemc/os9/roles/os9_users/tasks/main.yml new file mode 100644 index 000000000..6708c02ae --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_users/tasks/main.yml @@ -0,0 +1,16 @@ +--- +# tasks file for os9 + - name: "Generating users configuration for os9" + template: + src: os9_users.j2 + dest: "{{ build_dir }}/users9_{{ hostname }}.conf.part" + when: (ansible_network_os is defined and ansible_network_os == "dellemc.os9.os9") and ((os9_cfg_generate | default('False')) | bool) +# notify: save config os9 + register: generate_output + + - name: "Provisioning users configuration for os9" + dellemc.os9.os9_config: + src: os9_users.j2 + when: (ansible_network_os is defined and ansible_network_os == "dellemc.os9.os9") +# notify: save config os9 + register: output diff --git a/ansible_collections/dellemc/os9/roles/os9_users/templates/os9_users.j2 b/ansible_collections/dellemc/os9/roles/os9_users/templates/os9_users.j2 new file mode 100644 index 000000000..64f8256a4 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_users/templates/os9_users.j2 @@ -0,0 +1,141 @@ +#jinja2: trim_blocks: True,lstrip_blocks: True +{############################################# +Purpose: +Configure users commands for os9 Devices +os9_users: + - userrole: role1 + userrole_state: present + userrole_inherit: sysadmin + - username: test + password: test + pass_key: 7 + access_class: a1 + role: sysadmin + privilege: 0 + state: present + - username: u1 + password: false + privilege: 1 + access_class: a1 + role: netadmin + state: present + - username: u2 + secret: test1 + secret_key : 0 + access_class: a2 + privilege: 3 + role: sysadmin + state: present +###################################################} +{% if os9_users is defined and os9_users %} +{% for item in os9_users %} + {% if item.userrole is defined and item.userrole %} + {% if item.userrole_state is defined and item.userrole_state == "absent" %} + {% for item in os9_users %} + {% if item.username is defined and item.username %} + {% if item.state is defined and item.state == "absent" %} +no username {{ item.username }} + {% endif %} + {% endif %} + {% endfor %} +no userrole {{ item.userrole }} + {% else %} + {% if item.userrole_inherit is defined and item.userrole_inherit %} +userrole {{ item.userrole }} inherit {{ item.userrole_inherit }} + {% else %} +userrole {{ item.userrole }} + {% endif %} + {% endif %} + {% endif %} + {% if item.role_permission is defined and item.role_permission %} + {% if item.role_permission.mode is defined and (item.role_permission.mode == "configure" or item.role_permission.mode == "exec" or item.role_permission.mode == "interface" or item.role_permission.mode == "line" or item.role_permission.mode == "route-map" or item.role_permission.mode == "router") %} + {% if item.role_permission.action is defined and (item.role_permission.action == "reset" or item.role_permission.action == "addrole" or item.role_permission.action == "deleterole") %} + {% if item.role_permission.line is defined and item.role_permission.line %} + {% if item.role_permission.action != "reset" and item.role_permission.role_name is defined and item.role_permission.role_name %} + {% if item.role_permission.state is defined and item.role_permission.state == "absent" %} +norole {{ item.role_permission.mode }} {{ item.role_permission.action }} {{ item.role_permission.role_name }} {{ item.role_permission.line }} + {% else %} +role {{ item.role_permission.mode }} {{ item.role_permission.action }} {{ item.role_permission.role_name }} {{ item.role_permission.line }} + {% endif %} + {% else %} +role {{ item.role_permission.mode }} reset {{ item.role_permission.line }} + {% endif %} + {% endif %} + {% endif %} + {% endif %} + {% endif %} + {% if item.username is defined and item.username %} + {% if item.state is defined and item.state == "absent" %} +no username {{ item.username }} + {% else %} + {% if item.password is defined and item.password %} + {% if item.pass_key is defined and item.pass_key %} +{% set passwd = item.pass_key|string+" "+item.password %} + {% else %} +{% set passwd = item.password %} + {% endif %} + {% if item.privilege is defined and item.privilege and item.access_class is defined and item.access_class and item.role is defined and item.role %} +username {{ item.username }} password {{ passwd }} privilege {{ item.privilege }} role {{ item.role }} access-class {{ item.access_class }} + {% elif item.role is defined and item.role and item.privilege is defined and item.privilege %} +username {{ item.username }} password {{ passwd }} privilege {{ item.privilege }} role {{ item.role }} + {% elif item.role is defined and item.role and item.access_class is defined and item.access_class %} +username {{ item.username }} password {{ passwd }} access-class {{ item.access_class }} role {{ item.role }} + {% elif item.privilege is defined and item.privilege and item.access_class is defined and item.access_class %} +username {{ item.username }} password {{ passwd }} access-class {{ item.access_class }} privilege {{ item.privilege }} + {% elif item.role is defined and item.role %} +username {{ item.username }} password {{ passwd }} role {{ item.role }} + {% elif item.privilege is defined and item.privilege %} +username {{ item.username }} password {{ passwd }} privilege {{ item.privilege }} + {% elif item.access_class is defined and item.access_class %} +username {{ item.username }} password {{ passwd }} access-class {{ item.access_class }} + {% else %} +username {{ item.username }} password {{ passwd }} + {% endif %} + {% elif item.secret is defined and item.secret %} + {% if item.secret_key is defined and item.secret_key %} +{% set passwd = item.secret_key|string+" " +item.secret %} + {% else %} +{% set passwd = item.secret %} + {% endif %} + {% if item.privilege is defined and item.privilege and item.access_class is defined and item.access_class and item.role is defined and item.role %} +username {{ item.username }} secret {{ passwd }} role {{ item.role }} privilege {{ item.privilege }} access-class {{ + item.access_class }} + {% elif item.role is defined and item.role and item.privilege is defined and item.privilege %} +username {{ item.username }} secret {{ passwd }} role {{ item.role }} privilege {{ item.privilege }} + {% elif item.role is defined and item.role and item.access_class is defined and item.access_class %} +username {{ item.username }} secret {{ passwd }} role {{ item.role }} access-class {{ item.access_class }} + {% elif item.privilege is defined and item.privilege and item.access_class is defined and item.access_class %} +username {{ item.username }} secret {{ passwd }} privilege {{ item.privilege }} access-class {{ item.access_class }} + {% elif item.role is defined and item.role %} +username {{ item.username }} secret {{ passwd }} role {{ item.role }} + {% elif item.privilege is defined and item.privilege %} +username {{ item.username }} secret {{ passwd }} privilege {{ item.privilege }} + {% elif item.access_class is defined and item.access_class %} +username {{ item.username }} secret {{ passwd }} access-class {{ item.access_class }} + {% else %} +username {{ item.username }} secret {{ passwd }} + {% endif %} + {% else %} + {% if item.privilege is defined and item.privilege and item.access_class is defined and item.access_class and item.role is defined and item.role %} +username {{ item.username }} nopassword role {{ item.role }} privilege {{ item.privilege }} access-class {{ item.access_class }} + {% elif item.role is defined and item.role and item.privilege is defined and item.privilege %} +username {{ item.username }} nopassword role {{ item.role }} privilege {{ item.privilege }} + {% elif item.role is defined and item.role and item.access_class is defined and item.access_class %} +username {{ item.username }} nopassword role {{ item.role }} access-class {{ item.access_class }} + {% elif item.privilege is defined and item.privilege and item.access_class is defined and item.access_class %} +username {{ item.username }} nopassword privilege {{ item.privilege }} access-class {{ item.access_class }} + {% elif item.role is defined and item.role %} +username {{ item.username }} nopassword role {{ item.role }} + {% elif item.privilege is defined and item.privilege %} +username {{ item.username }} nopassword privilege {{ item.privilege }} + {% elif item.access_class is defined and item.access_class %} +username {{ item.username }} nopassword access-class {{ item.access_class }} + {% else %} +username {{ item.username }} nopassword + {% endif %} + + {% endif %} + {% endif %} + {% endif %} +{% endfor %} +{% endif %}
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_users/tests/inventory.yaml b/ansible_collections/dellemc/os9/roles/os9_users/tests/inventory.yaml new file mode 100644 index 000000000..5fd33c945 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_users/tests/inventory.yaml @@ -0,0 +1,20 @@ +spine1 ansible_host=100.94.210.44 +spine2 ansible_host=10.11.182.26 +leaf1 ansible_host=10.11.182.27 +leaf2 ansible_host=10.11.182.28 +leaf3 ansible_host=10.11.182.29 +leaf4 ansible_host=10.11.182.30 + +[spine] +spine1 +spine2 + +[leaf] +leaf1 +leaf2 +leaf3 +leaf4 + +[datacenter:children] +spine +leaf diff --git a/ansible_collections/dellemc/os9/roles/os9_users/tests/main.os9.yaml b/ansible_collections/dellemc/os9/roles/os9_users/tests/main.os9.yaml new file mode 100644 index 000000000..e2882d20a --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_users/tests/main.os9.yaml @@ -0,0 +1,28 @@ +--- +# vars file for dellemc.os9.os9_users, +# below gives a sample configuration +# Sample variables for OS9 device +os9_users: + - userrole: role1 + userrole_state: present + userrole_inherit: sysadmin + - username: test + password: test + pass_key: 7 + access_class: a1 + role: role1 + privilege: 0 + state: present + - username: u1 + password: false + privilege: 1 + access_class: a1 + role: netadmin + state: present + - username: u2 + secret: test1 + secret_key: 0 + access_class: a2 + privilege: 3 + role: sysadmin + state: present
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_users/tests/test.yaml b/ansible_collections/dellemc/os9/roles/os9_users/tests/test.yaml new file mode 100644 index 000000000..1e2649112 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_users/tests/test.yaml @@ -0,0 +1,5 @@ +--- +- hosts: datacenter + connection: network_cli + roles: + - dellemc.os9.os9_users
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_users/vars/main.yml b/ansible_collections/dellemc/os9/roles/os9_users/vars/main.yml new file mode 100644 index 000000000..05fc40b84 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_users/vars/main.yml @@ -0,0 +1,2 @@ +--- +# vars file for dellemc.os9.os9_users
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_vlan/LICENSE b/ansible_collections/dellemc/os9/roles/os9_vlan/LICENSE new file mode 100644 index 000000000..2c9b8e1fd --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_vlan/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/> + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (c) 2020, Dell Inc. All rights reserved. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <https://www.gnu.org/licenses/>. + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + <program> Copyright (c) 2020, Dell Inc. All rights reserved. + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +<https://www.gnu.org/licenses/>. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +<https://www.gnu.org/licenses/why-not-lgpl.html>. diff --git a/ansible_collections/dellemc/os9/roles/os9_vlan/README.md b/ansible_collections/dellemc/os9/roles/os9_vlan/README.md new file mode 100644 index 000000000..b2ea5ec1c --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_vlan/README.md @@ -0,0 +1,105 @@ +VLAN role +========= + +This role facilitates configuring virtual LAN (VLAN) attributes. It supports the creation and deletion of a VLAN and its member ports. This role is abstracted for Dell EMC PowerSwitch platforms running Dell EMC OS9. + +The VLAN role requires an SSH connection for connectivity to a Dell EMC OS9 device. You can use any of the built-in OS connection variables. + +Role variables +-------------- + +- Role is abstracted using the `ansible_network_os` variable that can take `dellemc.os9.os9` as the value +- If `os9_cfg_generate` is set to true, the variable generates the role configuration commands in a file +- Any role variable with a corresponding state variable set to absent negates the configuration of that variable +- For variables with no state variable, setting an empty value for the variable negates the corresponding configuration +- `os9_vlan` (dictionary) holds the key with the VLAN ID key and default-vlan key. +- VLAN ID key should be in format "vlan <ID>" (1 to 4094) +- Variables and values are case-sensitive + +**os9_vlan** + +| Key | Type | Notes | Support | +|------------|---------------------------|---------------------------------------------------------|-----------------------| +| ``default_vlan`` | boolean | Configures the default VLAN feature as diabled if set to true | os9 | + +**VLAN ID keys** + +| Key | Type | Notes | Support | +|------------|---------------------------|---------------------------------------------------------|-----------------------| +| ``name`` | string | Configures the name of the VLAN | os9 | +| ``description`` | string | Configures a single line description for the VLAN | os9 | +| ``tagged_members`` | list | Specifies the list of port members to be tagged to the corresponding VLAN (see ``tagged_members.*``) | os9 | +| ``tagged_members.port`` | string | Specifies valid device interface names to be tagged for each VLAN | os9 | +| ``tagged_members.state`` | string: absent,present | Deletes the tagged association for the VLAN if set to absent | os9 | +| ``untagged_members`` | list | Specifies the list of port members to be untagged to the corresponding VLAN (see ``untagged_members.*``) | os9 | +| ``untagged_members.port`` | string | Specifies valid device interface names to be untagged for each VLAN | os9 | +| ``untagged_members.state`` | string: absent,present | Deletes the untagged association for the VLAN if set to absent | os9 | +| ``state`` | string: absent,present\* | Deletes the VLAN corresponding to the ID if set to absent | os9 | + +> **NOTE**: Asterisk (\*) denotes the default value if none is specified. + +Connection variables +-------------------- + +Ansible Dell EMC network roles require connection information to establish communication with the nodes in your inventory. This information can exist in the Ansible *group_vars* or *host_vars directories* or inventory, or in the playbook itself. + +| Key | Required | Choices | Description | +|-------------|----------|------------|-----------------------------------------------------| +| ``ansible_host`` | yes | | Specifies the hostname or address for connecting to the remote device over the specified transport | +| ``ansible_port`` | no | | Specifies the port used to build the connection to the remote device; if value is unspecified, the `ANSIBLE_REMOTE_PORT` option is used; it defaults to 22 | +| ``ansible_ssh_user`` | no | | Specifies the username that authenticates the CLI login for the connection to the remote device; if value is unspecified, the `ANSIBLE_REMOTE_USER` environment variable value is used | +| ``ansible_ssh_pass`` | no | | Specifies the password that authenticates the connection to the remote device | +| ``ansible_become`` | no | yes, no\* | Instructs the module to enter privileged mode on the remote device before sending any commands; if value is unspecified, the `ANSIBLE_BECOME` environment variable value is used, and the device attempts to execute all commands in non-privileged mode | +| ``ansible_become_method`` | no | enable, sudo\* | Instructs the module to allow the become method to be specified for handling privilege escalation; if value is unspecified, the `ANSIBLE_BECOME_METHOD` environment variable value is used | +| ``ansible_become_pass`` | no | | Specifies the password to use if required to enter privileged mode on the remote device; if ``ansible_become`` is set to no this key is not applicable | +| ``ansible_network_os`` | yes | os9, null\* | Loads the correct terminal and cliconf plugins to communicate with the remote device | + + +> **NOTE**: Asterisk (\*) denotes the default value if none is specified. + +## Example playbook + +This example uses the *os9_vlan* role to setup the VLAN ID and name, and it configures tagged and untagged port members for the VLAN. You can also delete the VLAN with the ID or delete the members associated to it. It creates a *hosts* file with the switch details and corresponding variables. The hosts file should define the `ansible_network_os` variable with corresponding Dell EMC OS9 name. + +When `os9_cfg_generate` is set to true, the variable generates the configuration commands as a .part file in *build_dir* path. By default, the variable is set to false. It writes a simple playbook that only references the os9_vlan role. + +**Sample hosts file** + + leaf1 ansible_host= <ip_address> + +**Sample host_vars/leaf1** + + hostname: leaf1 + ansible_become: yes + ansible_become_method: xxxxx + ansible_become_pass: xxxxx + ansible_ssh_user: xxxxx + ansible_ssh_pass: xxxxx + ansible_network_os: dellemc.os9.os9 + build_dir: ../temp/os9 + + os9_vlan: + default_vlan: true + vlan 100: + name: "Mgmt Network" + description: "Int-vlan" + tagged_members: + - port: fortyGigE 1/30 + state: absent + untagged_members: + - port: fortyGigE 1/14 + state: present + state: present + + +**Simple playbook to setup system — leaf.yaml** + + - hosts: leaf1 + roles: + - dellemc.os9.os9_vlan + +**Run** + + ansible-playbook -i hosts leaf.yaml + +(c) 2017-2020 Dell Inc. or its subsidiaries. All rights reserved. diff --git a/ansible_collections/dellemc/os9/roles/os9_vlan/defaults/main.yml b/ansible_collections/dellemc/os9/roles/os9_vlan/defaults/main.yml new file mode 100644 index 000000000..2e62ad6e5 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_vlan/defaults/main.yml @@ -0,0 +1,2 @@ +--- +# defaults file for dellemc.os9.os9_vlan
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_vlan/handlers/main.yml b/ansible_collections/dellemc/os9/roles/os9_vlan/handlers/main.yml new file mode 100644 index 000000000..93bec0dca --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_vlan/handlers/main.yml @@ -0,0 +1,2 @@ +--- +# handlers file for dellemc.os9.os9_vlan
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_vlan/meta/main.yml b/ansible_collections/dellemc/os9/roles/os9_vlan/meta/main.yml new file mode 100644 index 000000000..74ac54cd7 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_vlan/meta/main.yml @@ -0,0 +1,18 @@ +# Copyright (c) 2017-2020 Dell Inc. +--- +galaxy_info: + author: Dell EMC Networking Engineering + description: The os9_vlan role facilitates the configuration of VLAN attributes in devices running Dell EMC Networking Operating Systems. + company: Dell Inc + license: GPLv3 + min_ansible_version: 2.9.6 + + platforms: + - name: os9 + + galaxy_tags: + - networking + - dell + - emc + - dellemc + - os9
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_vlan/tasks/main.yml b/ansible_collections/dellemc/os9/roles/os9_vlan/tasks/main.yml new file mode 100644 index 000000000..d460f275d --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_vlan/tasks/main.yml @@ -0,0 +1,16 @@ +--- +# tasks file for os9 + - name: "Generating VLAN configuration for os9" + template: + src: os9_vlan.j2 + dest: "{{ build_dir }}/vlan9_{{ hostname }}.conf.part" + when: (ansible_network_os is defined and ansible_network_os == "dellemc.os9.os9") and ((os9_cfg_generate | default('False')) | bool) +# notify: save config os9 + register: generate_output + + - name: "Provisioning VLAN configuration for os9" + dellemc.os9.os9_config: + src: os9_vlan.j2 + when: (ansible_network_os is defined and ansible_network_os == "dellemc.os9.os9") +# notify: save config os9 + register: output diff --git a/ansible_collections/dellemc/os9/roles/os9_vlan/templates/os9_vlan.j2 b/ansible_collections/dellemc/os9/roles/os9_vlan/templates/os9_vlan.j2 new file mode 100644 index 000000000..e9da9e5f6 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_vlan/templates/os9_vlan.j2 @@ -0,0 +1,79 @@ +#jinja2: trim_blocks: True, lstrip_blocks: True +{########################################## +Purpose: +Configure VLAN Interface commands for os9 Devices +os9_vlan: + default_vlan: true + VLAN 1: + name: "vlan2" + description: "int-vlan" + tagged_members: + - port: fortyGigE 0/32 + state: present + - port: fortyGigE 0/40 + state: absent + untagged_members: + - port: fortyGigE 0/92 + state: absent + - port: fortyGigE 0/44 + state: present + state: present +#########################################} +{% if os9_vlan is defined and os9_vlan %} +{% for key,value in os9_vlan.items() %} + {% if key == "default_vlan" %} + {% if value %} +default-vlan disable + {% else %} +no default-vlan disable + {% endif %} + {% else %} + + {% set vlan_id = key.split(" ") %} + {% set vlan_vars = os9_vlan[key] %} + {% if vlan_vars.state is defined and vlan_vars.state == "absent" %} +no interface Vlan {{ vlan_id[1] }} + {% else %} +interface Vlan {{ vlan_id[1] }} + {% if vlan_vars.name is defined%} + {% if vlan_vars.name %} + name {{ vlan_vars.name }} + {% else %} + no name + {% endif %} + {% endif %} + {% if vlan_vars.description is defined %} + {% if vlan_vars.description %} + description {{ vlan_vars.description }} + {% else %} + no description + {% endif %} + {% endif %} + {% if vlan_vars.untagged_members is defined %} + {% for ports in vlan_vars.untagged_members %} + {% if ports.port is defined and ports.port %} + {% if ports.state is defined and ports.state == "absent" %} + no untagged {{ ports.port }} + {% else %} + untagged {{ ports.port }} + {% endif %} + {% endif %} + {% endfor %} + {% endif %} + + {% if vlan_vars.tagged_members is defined %} + {% for ports in vlan_vars.tagged_members %} + {% if ports.port is defined and ports.port %} + {% if ports.state is defined and ports.state == "absent" %} + no tagged {{ ports.port }} + {% else %} + tagged {{ ports.port }} + {% endif %} + {% endif %} + {% endfor %} + {% endif %} + + {% endif %} + {% endif %} +{% endfor %} +{% endif %}
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_vlan/tests/inventory.yaml b/ansible_collections/dellemc/os9/roles/os9_vlan/tests/inventory.yaml new file mode 100644 index 000000000..5fd33c945 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_vlan/tests/inventory.yaml @@ -0,0 +1,20 @@ +spine1 ansible_host=100.94.210.44 +spine2 ansible_host=10.11.182.26 +leaf1 ansible_host=10.11.182.27 +leaf2 ansible_host=10.11.182.28 +leaf3 ansible_host=10.11.182.29 +leaf4 ansible_host=10.11.182.30 + +[spine] +spine1 +spine2 + +[leaf] +leaf1 +leaf2 +leaf3 +leaf4 + +[datacenter:children] +spine +leaf diff --git a/ansible_collections/dellemc/os9/roles/os9_vlan/tests/main.os9.yaml b/ansible_collections/dellemc/os9/roles/os9_vlan/tests/main.os9.yaml new file mode 100644 index 000000000..7f74b3b4d --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_vlan/tests/main.os9.yaml @@ -0,0 +1,20 @@ +--- +# vars file for dellemc.os9.os9_vlan, +# below gives a example configuration +# Sample variables for OS9 device +os9_vlan: + default_vlan: true + vlan 100: + name: "Blue Network" + description: "Interface-vlan" + tagged_members: + - port: fortyGigE 1/2 + state: present + - port: fortyGigE 1/11 + state: present + untagged_members: + - port: fortyGigE 1/3 + state: present + - port: fortyGigE 1/10 + state: present + state: present
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_vlan/tests/test.yaml b/ansible_collections/dellemc/os9/roles/os9_vlan/tests/test.yaml new file mode 100644 index 000000000..1dfd42bd7 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_vlan/tests/test.yaml @@ -0,0 +1,5 @@ +--- +- hosts: datacenter + connection: network_cli + roles: + - dellemc.os9.os9_vlan
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_vlan/vars/main.yml b/ansible_collections/dellemc/os9/roles/os9_vlan/vars/main.yml new file mode 100644 index 000000000..cd2ceef64 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_vlan/vars/main.yml @@ -0,0 +1,2 @@ +--- +# vars file for dellemc.os9.os9_vlan
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_vlt/LICENSE b/ansible_collections/dellemc/os9/roles/os9_vlt/LICENSE new file mode 100644 index 000000000..2c9b8e1fd --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_vlt/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/> + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (c) 2020, Dell Inc. All rights reserved. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <https://www.gnu.org/licenses/>. + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + <program> Copyright (c) 2020, Dell Inc. All rights reserved. + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +<https://www.gnu.org/licenses/>. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +<https://www.gnu.org/licenses/why-not-lgpl.html>. diff --git a/ansible_collections/dellemc/os9/roles/os9_vlt/README.md b/ansible_collections/dellemc/os9/roles/os9_vlt/README.md new file mode 100644 index 000000000..2154fbd81 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_vlt/README.md @@ -0,0 +1,132 @@ +VLT role +======== + +This role facilitates the configuration of the basics of virtual link trunking (VLT) to provide a loop-free topology. This role is abstracted for Dell EMC PowerSwitch platforms running Dell EMC OS9. + +The VLT role requires an SSH connection for connectivity to your Dell EMC OS9 device. You can use any of the built-in OS connection variables. + +Role variables +-------------- + +- Role is abstracted using the `ansible_network_os` variable that can take `dellemc.os9.os9` as the value +- If `os9_cfg_generate` is set to true, the variable generates the role configuration commands in a file +- Any role variable with a corresponding state variable set to absent negates the configuration of that variable +- Setting an empty value for any variable negates the corresponding configuration +- Variables and values are case-sensitive + +**os9_vlt keys** + +| Key | Type | Description | Support | +|------------|---------------------------|---------------------------------------------------------|-----------------------| +| ``domain`` | integer (required) | Configures the VLT domain identification number (1 to 1000) | os9 | +| ``backup_destination`` | string | Configures an IPv4 address for the VLT backup link (A.B.C.D format or X:X:X:X::X format) | os9 | +| ``destination_type`` | string | Configures the backup destination based on this destination type (IPv4 or IPv6)| os9 | +| ``backup_destination_vrf`` | string | Configures the virtual routing and forwarding (VRF) instance through which the backup destination IP is reachable (*vrfname* must be present) | os9| +| ``VLTi`` | integer | Configures the peer link port-channel ID for the VLT domain (1 to 4096) | os9 | +| ``peer_routing`` | boolean | Configures VLT peer routing | os9 | +| ``peer_routing_timeout`` | integer | Configures the timeout for peer routing (1 to 65535)| os9 | +| ``multicast_peer_routing_timeout`` | integer | Configures the timeout for multicast peer routing (1 to 1200) | os9 | +| ``priority`` | integer | Configures the primary priority to the corresponding channel ID | os9 | +| ``unit_id`` | integer | Configures the system unit ID for VLT (either 0 or 1) | os9 | +| ``vlt_peers`` | dictionary | Contains objects to configure the VLT peer port-channel (see ``vlt_peers.*``) | os9 | +| ``vlt_peers.<portchannelid>`` | dictionary | Configures the VLT peer port-channel (`Po <portchannelid> value`) | os9 | +| ``vlt_peers.<portchannelid>.peer_lag`` | integer | Configures the port-channel ID of the VLT peer lag | os9 | +| ``system_mac`` | string | Configures the system MAC address for VLT | os9 | +| ``delay_restore`` | integer | Configures the delay in bringing up VLT ports after reload or peer-link restoration (default 90)| os9 | +| ``delay_restore_abort_threshold`` | integer | Configures the wait interval for VLT delay-restore timer to abort (default 60) | os9 | +| ``proxy_gateway`` | dictionary | Contains objects to configure the VLT proxy gateway (see ``proxy_gateway.*``) | os9 | +| ``proxy_gateway.static`` | dictionary | Contains objects to configure the static VLT proxy gateway (see ``static.*``) | os9 | +| ``static.remote_mac`` | list | Configures the remote MAC for static VLT proxy gateway (see ``remote_mac.*``) | os9 | +| ``remote_mac.address`` | string | Configures the remote MAC address for the static VLT proxy gateway | os9 | +| ``remote_mac.exclude_vlan_range`` | string | Configures the exclude VLAN for the static VLT proxy gateway | os9 | +| ``remote_mac.state`` | string: absent,present | Deletes the remote MAC address or exclude VLAN configured on the proxy gateway if set to absent | os9 | +| ``static.proxy_static_state`` | string: absent,present | Deletes the static VLT proxy gateway if set to absent | os9 | +| ``proxy_gateway.lldp`` | dictionary | Contains objects to configure LLDP VLT proxy gateway (see ``lldp.*`` for each item); mutually exclusive with *proxy_gateway.static* | os9 | +| ``lldp.peer_domain_link`` | list | Configures the VLT proxy gateway interface (see ``peer_domain_link.*``) | os9 | +| ``peer_domain_link.port_channel_id`` | integer | Configures the port-channel for the VLT proxy gateway | os9 | +| ``peer_domain_link.exclude_vlan_range`` | string | Configures to exclude VLAN for LLDP VLT proxy gateway | os9 | +| ``peer_domain_link.state`` | string: absent,present | Deletes the port-channel or exclude VLAN configured on the proxy gateway if set to absent | os9 | +| ``lldp.proxy_lldp_state`` | string: absent,present | Deletes the LLDP VLT proxy gateway if set to absent | os9 | +| ``lldp.vlt_peer_mac`` | boolean | Configures the proxy gateway transmit for square VLT | os9 | +| ``lldp.peer_timeout`` | integer | Configures the proxy gateway restore timer (1 to 65535) | os9 | +| ``state`` | string: absent,present | Deletes the VLT instance if set to absent | os9 | + +> **NOTE**: Asterisk (\*) denotes the default value if none is specified. + +Connection variables +-------------------- + +Ansible Dell EMC network OS roles require connection information to establish communication with the nodes in your inventory. This information can exist in the Ansible *group_vars* or *host_vars* directories or inventory, or in the playbook itself. + +| Key | Required | Choices | Description | +|-------------|----------|------------|-----------------------------------------------------| +| ``ansible_host`` | yes | | Specifies the hostname or address for connecting to the remote device over the specified transport | +| ``ansible_port`` | no | | Specifies the port used to build the connection to the remote device; if value is unspecified, the `ANSIBLE_REMOTE_PORT` option is used; it defaults to 22 | +| ``ansible_ssh_user`` | no | | Specifies the username that authenticates the CLI login for the connection to the remote device; if value is unspecified, the `ANSIBLE_REMOTE_USER` environment variable value is used | +| ``ansible_ssh_pass`` | no | | Specifies the password that authenticates the connection to the remote device | +| ``ansible_become`` | no | yes, no\* | Instructs the module to enter privileged mode on the remote device before sending any commands; if value is unspecified, the `ANSIBLE_BECOME` environment variable value is used, and the device attempts to execute all commands in non-privileged mode | +| ``ansible_become_method`` | no | enable, sudo\* | Instructs the module to allow the become method to be specified for handling privilege escalation; if value is unspecified, the `ANSIBLE_BECOME_METHOD` environment variable value is used | +| ``ansible_become_pass`` | no | | Specifies the password to use if required to enter privileged mode on the remote device; if ``ansible_become`` is set to no this key is not applicable | +| ``ansible_network_os`` | yes | os9, null\* | Loads the correct terminal and cliconf plugins to communicate with the remote device | + +> **NOTE**: Asterisk (\*) denotes the default value if none is specified. + +Example playbook +---------------- + +This example uses the *os9_vlt* role to setup a VLT-domain. It creates a *hosts* file with the switch details and corresponding variables.The hosts file should define the `ansible_network_os` variable with corresponding Dell EMC OS9 name. + +When `os9_cfg_generate` is set to true, the variable generates the configuration commands as a .part file in *build_dir* path. By default, the variable is set to false. It writes a simple playbook that only references the *os9_vlt* role. + +**Sample hosts file** + + leaf1 ansible_host= <ip_address> + +**Sample host_vars/leaf1** + + hostname: leaf1 + ansible_become: yes + ansible_become_method: xxxxx + ansible_become_pass: xxxxx + ansible_ssh_user: xxxxx + ansible_ssh_pass: xxxxx + ansible_network_os: dellemc.os9.os9 + build_dir: ../temp/os9 + + os9_vlt: + domain: 1 + backup_destination: 192.168.1.1 + destination_type: "ipv4" + priority: 1 + VLTi: 101 + backup_destination_vrf: VLTi-KEEPALIVE + peer_routing: true + peer_routing_timeout: 200 + multicast_peer_routing_timeout: 250 + unit_id: 0 + system_mac: aa:aa:aa:aa:aa:aa + delay_restore: 100 + delay_restore_abort_threshold: 110 + proxy_gateway: + static: + remote_mac: + - address: aa:aa:aa:aa:aa:aa + exclude_vlan_range: 2 + state: present + proxy_static_state: present + vlt_peers: + Po 12: + peer_lag: 13 + state: present + +**Simple playbook to setup system — leaf.yaml** + + - hosts: leaf1 + roles: + - dellemc.os9.os9_vlt + +**Run** + + ansible-playbook -i hosts leaf.yaml + +(c) 2017-2020 Dell Inc. or its subsidiaries. All rights reserved. diff --git a/ansible_collections/dellemc/os9/roles/os9_vlt/defaults/main.yml b/ansible_collections/dellemc/os9/roles/os9_vlt/defaults/main.yml new file mode 100644 index 000000000..7d2e3ec8b --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_vlt/defaults/main.yml @@ -0,0 +1,2 @@ +--- +# defaults file for dellemc.os9.os9_vlt
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_vlt/handlers/main.yml b/ansible_collections/dellemc/os9/roles/os9_vlt/handlers/main.yml new file mode 100644 index 000000000..703bdba9b --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_vlt/handlers/main.yml @@ -0,0 +1,2 @@ +--- +# handlers file for dellemc.os9.os9_vlt
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_vlt/meta/main.yml b/ansible_collections/dellemc/os9/roles/os9_vlt/meta/main.yml new file mode 100644 index 000000000..bb33e1c1b --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_vlt/meta/main.yml @@ -0,0 +1,18 @@ +# Copyright (c) 2017-2020 Dell Inc. or its subsidiaries. All Rights Reserved. +--- +galaxy_info: + author: Dell EMC Networking Engineering + description: The os9_vlt role facilitates the configuration of VLT attributes in devices running Dell EMC Networking Operating Systems. + company: Dell Inc + license: GPLv3 + min_ansible_version: 2.9.6 + + platforms: + - name: os9 + + galaxy_tags: + - networking + - dell + - emc + - dellemc + - os9
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_vlt/tasks/main.yml b/ansible_collections/dellemc/os9/roles/os9_vlt/tasks/main.yml new file mode 100644 index 000000000..34a532452 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_vlt/tasks/main.yml @@ -0,0 +1,16 @@ +--- +# tasks file for os9 + - name: "Generating VLT configuration for os9" + template: + src: os9_vlt.j2 + dest: "{{ build_dir }}/vlt9_{{ hostname }}.conf.part" + when: (ansible_network_os is defined and ansible_network_os == "dellemc.os9.os9") and ((os9_cfg_generate | default('False')) | bool) +# notify: save config os9 + register: generate_output + + - name: "Provisioning VLT configuration for os9" + dellemc.os9.os9_config: + src: os9_vlt.j2 + when: (ansible_network_os is defined and ansible_network_os == "dellemc.os9.os9") +# notify: save config os9 + register: output diff --git a/ansible_collections/dellemc/os9/roles/os9_vlt/templates/os9_vlt.j2 b/ansible_collections/dellemc/os9/roles/os9_vlt/templates/os9_vlt.j2 new file mode 100644 index 000000000..6dd6303ee --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_vlt/templates/os9_vlt.j2 @@ -0,0 +1,217 @@ +#jinja2: trim_blocks: True,lstrip_blocks: True +{################################ +Purpose: +Configure VLT commands for os9 Devices. +os9_vlt: + domain: 1 + backup_destination: 192.168.1.1 + destination_type: ipv4 + priority: 1 + VLTi: 101 + backup_destination_vrf: VLTi-KEEPALIVE + unit_id: 0 + peer_routing: True + peer_routing_timeout: 200 + multicast_peer_routing_timeout: 300 + vlt_peers: + Po 12: + peer_lag: 13 + system_mac: aa:aa:aa:aa:aa:aa + delay_restore: 100 + delay_restore_abort_threshold: 110 + proxy_gateway: + static: + remote_mac: + - address: aa:aa:aa:aa:aa:aa + exclude_vlan_range: 2 + state: present + proxy_static_state: present + lldp: + vlt_peer_mac: true + peer_timeout: 20 + peer_domain_link: + - port_channel_id: 10 + exclude_vlan_range: 3 + state: present + proxy_lldp_state: present + + state: present +################################} +{% if os9_vlt is defined and os9_vlt %} + {% if os9_vlt.vlt_peers is defined and os9_vlt.vlt_peers %} + {% for key in os9_vlt.vlt_peers.keys() %} + {% set channel_id = key.split(" ") %} + {% set peer_vars = os9_vlt.vlt_peers[key] %} +interface Port-channel {{ channel_id[1] }} + {% if peer_vars.peer_lag is defined %} + {% if peer_vars.peer_lag %} + vlt-peer-lag port-channel {{ peer_vars.peer_lag}} + {% else %} + no vlt-peer-lag + {% endif %} + {% endif %} + {% endfor %} + {% endif %} + {% if os9_vlt.domain is defined and os9_vlt.domain %} + {% if os9_vlt.state is defined and os9_vlt.state == 'absent' %} +no vlt domain {{ os9_vlt.domain }} + {% else %} +vlt domain {{ os9_vlt.domain }} + {% if os9_vlt.backup_destination is defined %} + {% if os9_vlt.backup_destination %} + {% if os9_vlt.destination_type is defined %} + {% if os9_vlt.destination_type == 'ipv6' %} + back-up destination ipv6 {{ os9_vlt.backup_destination }} + {% elif os9_vlt.destination_type == 'ipv4' %} + {% if os9_vlt.backup_destination_vrf is defined and os9_vlt.backup_destination_vrf %} + back-up destination {{ os9_vlt.backup_destination }} vrf {{ os9_vlt.backup_destination_vrf }} + {% else %} + back-up destination {{ os9_vlt.backup_destination }} + {% endif %} + {% endif %} + {% endif %} + {% else %} + no back-up destination + {% endif %} + {% endif %} + {% if os9_vlt.VLTi is defined %} + {% if os9_vlt.VLTi %} + peer-link port-channel {{ os9_vlt.VLTi }} + {% else %} + no peer-link + {% endif %} + {% endif %} + {% if os9_vlt.priority is defined %} + {% if os9_vlt.priority %} + primary-priority {{ os9_vlt.priority }} + {% else %} + no primary-priority + {% endif %} + {% endif %} + {% if os9_vlt.unit_id is defined %} + {% if os9_vlt.unit_id >= 0 %} + unit-id {{ os9_vlt.unit_id }} + {% else %} + no unit-id + {% endif %} + {% endif %} + {% if os9_vlt.peer_routing is defined %} + {% if os9_vlt.peer_routing == True %} + peer-routing + {% else %} + no peer-routing + {% endif %} + {% endif %} + {% if os9_vlt.peer_routing_timeout is defined %} + {% if os9_vlt.peer_routing_timeout %} + peer-routing-timeout {{ os9_vlt.peer_routing_timeout }} + {% else %} + no peer-routing-timeout + {% endif %} + {% endif %} + {% if os9_vlt.multicast_peer_routing_timeout is defined %} + {% if os9_vlt.multicast_peer_routing_timeout %} + multicast peer-routing timeout {{ os9_vlt.multicast_peer_routing_timeout }} + {% else %} + no multicast peer-routing timeout + {% endif %} + {% endif %} + {% if os9_vlt.system_mac is defined and os9_vlt.system_mac %} + system-mac mac-address {{ os9_vlt.system_mac }} + {% else %} + no system-mac + {% endif %} + {% if os9_vlt.delay_restore is defined %} + {% if os9_vlt.delay_restore %} + delay-restore {{ os9_vlt.delay_restore }} + {% else %} + no delay-restore + {% endif %} + {% endif %} + {% if os9_vlt.delay_restore_abort_threshold is defined %} + {% if os9_vlt.delay_restore_abort_threshold %} + delay-restore abort-threshold {{ os9_vlt.delay_restore_abort_threshold }} + {% else %} + no delay-restore abort-threshold + {% endif %} + {% endif %} + + {% if os9_vlt.proxy_gateway is defined and os9_vlt.proxy_gateway %} + {% for key in os9_vlt.proxy_gateway.keys() %} + {% if key == "static" %} + {% set static_vars = os9_vlt.proxy_gateway[key] %} + {% if static_vars.proxy_static_state is defined and static_vars.proxy_static_state =="absent" %} + no proxy-gateway static + {% else %} + proxy-gateway static + {% if static_vars.remote_mac is defined and static_vars.remote_mac %} + {% for mac in static_vars.remote_mac %} + {% if mac.state is defined and mac.state =="absent" %} + {% if mac.address is defined and mac.address %} + {% if mac.exclude_vlan_range is defined and mac.exclude_vlan_range %} + no remote-mac-address {{ mac.address }} exclude-vlan {{ mac.exclude_vlan_range }} + {% else %} + no remote-mac-address {{ mac.address }} + {% endif %} + {% endif %} + {% else %} + {% if mac.address is defined and mac.address %} + {% if mac.exclude_vlan_range is defined and mac.exclude_vlan_range %} + remote-mac-address {{ mac.address }} exclude-vlan {{ mac.exclude_vlan_range }} + {% else %} + remote-mac-address {{ mac.address }} + {% endif %} + {% endif %} + {% endif %} + {% endfor %} + {% endif %} + {% endif %} + {% elif key == "lldp" %} + {% set lldp_vars = os9_vlt.proxy_gateway[key] %} + {% if lldp_vars.proxy_lldp_state is defined and lldp_vars.proxy_lldp_state =="absent" %} + no proxy-gateway lldp + {% else %} + proxy-gateway lldp + {% if lldp_vars.peer_domain_link is defined and lldp_vars.peer_domain_link %} + {% for mac in lldp_vars.peer_domain_link %} + {% if mac.state is defined and mac.state =="absent" %} + {% if mac.port_channel_id is defined and mac.port_channel_id %} + {% if mac.exclude_vlan_range is defined and mac.exclude_vlan_range %} + no peer-domain-link port-channel {{ mac.port_channel_id }} exclude-vlan {{ mac.exclude_vlan_range }} + {% else %} + no peer-domain-link port-channel {{ mac.port_channel_id }} + {% endif %} + {% endif %} + {% else %} + {% if mac.port_channel_id is defined and mac.port_channel_id %} + {% if mac.exclude_vlan_range is defined and mac.exclude_vlan_range %} + peer-domain-link port-channel {{ mac.port_channel_id }} exclude-vlan {{ mac.exclude_vlan_range }} + {% else %} + peer-domain-link port-channel {{ mac.port_channel_id }} + {% endif %} + {% endif %} + {% endif %} + {% endfor %} + {% endif %} + {% if lldp_vars.vlt_peer_mac is defined %} + {% if lldp_vars.vlt_peer_mac %} + vlt-peer-mac transmit + {% else %} + no vlt-peer-mac transmit + {% endif %} + {% endif %} + {% if lldp_vars.peer_timeout is defined %} + {% if lldp_vars.peer_timeout %} + peer-timeout {{ lldp_vars.peer_timeout }} + {% else %} + no peer-timeout 2 + {% endif %} + {% endif %} + {% endif %} + {% endif %} + {% endfor %} + {% endif %} + + {% endif %} + {% endif %} +{% endif %}
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_vlt/tests/inventory.yaml b/ansible_collections/dellemc/os9/roles/os9_vlt/tests/inventory.yaml new file mode 100644 index 000000000..5fd33c945 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_vlt/tests/inventory.yaml @@ -0,0 +1,20 @@ +spine1 ansible_host=100.94.210.44 +spine2 ansible_host=10.11.182.26 +leaf1 ansible_host=10.11.182.27 +leaf2 ansible_host=10.11.182.28 +leaf3 ansible_host=10.11.182.29 +leaf4 ansible_host=10.11.182.30 + +[spine] +spine1 +spine2 + +[leaf] +leaf1 +leaf2 +leaf3 +leaf4 + +[datacenter:children] +spine +leaf diff --git a/ansible_collections/dellemc/os9/roles/os9_vlt/tests/main.os9.yaml b/ansible_collections/dellemc/os9/roles/os9_vlt/tests/main.os9.yaml new file mode 100644 index 000000000..999d3b5c0 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_vlt/tests/main.os9.yaml @@ -0,0 +1,39 @@ +--- +# vars file for dellemc.os9.os9_vlt, +# below gives a example configuration +# Sample variables for OS9 device +os9_vlt: + domain: 3 + backup_destination: 1.1.1.1 + destination_type: ipv4 + backup_destination_vrf: test + priority: 1 + VLTi: 100 + peer_routing: True + peer_routing_timeout: 200 + multicast_peer_routing_timeout: 250 + system_mac: aa:aa:aa:aa:aa:aa + delay_restore: 100 + delay_restore_abort_threshold: 110 + proxy_gateway: + static: + remote_mac: + - address: aa:aa:aa:aa:aa:aa + exclude_vlan_range: 2 + state: present + proxy_static_state: present + lldp: + vlt_peer_mac: true + peer_timeout: 20 + peer_domain_link: + - port_channel_id: 10 + exclude_vlan_range: 3 + state: present + proxy_lldp_state: present + vlt_peers: + Po 12: + peer_lag: 13 + Po 10: + peer_lag: 14 + unit_id: 1 + state: present
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_vlt/tests/test.yaml b/ansible_collections/dellemc/os9/roles/os9_vlt/tests/test.yaml new file mode 100644 index 000000000..c5a1dcf08 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_vlt/tests/test.yaml @@ -0,0 +1,5 @@ +--- +- hosts: datacenter + connection: network_cli + roles: + - dellemc.os9.os9_vlt
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_vlt/vars/main.yml b/ansible_collections/dellemc/os9/roles/os9_vlt/vars/main.yml new file mode 100644 index 000000000..115316740 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_vlt/vars/main.yml @@ -0,0 +1,2 @@ +--- +# vars file for dellemc.os9.os9_vlt
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_vrf/LICENSE b/ansible_collections/dellemc/os9/roles/os9_vrf/LICENSE new file mode 100644 index 000000000..2c9b8e1fd --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_vrf/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/> + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (c) 2020, Dell Inc. All rights reserved. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <https://www.gnu.org/licenses/>. + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + <program> Copyright (c) 2020, Dell Inc. All rights reserved. + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +<https://www.gnu.org/licenses/>. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +<https://www.gnu.org/licenses/why-not-lgpl.html>. diff --git a/ansible_collections/dellemc/os9/roles/os9_vrf/README.md b/ansible_collections/dellemc/os9/roles/os9_vrf/README.md new file mode 100644 index 000000000..22792b6fc --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_vrf/README.md @@ -0,0 +1,125 @@ +VRF role +======== + +This role facilitates to configure the basics of virtual routing and forwarding (VRF) that helps in the partition of physical routers to multiple virtual routers. This role is abstracted for Dell EMC PowerSwitch platforms running Dell EMC OS9. + +The vrf role requires an SSH connection for connectivity to a Dell EMC OS9 device. You can use any of the built-in OS connection variables. + +Role variables +-------------- + +- Role is abstracted using the variable `ansible_network_os` that can take the `dellemc.os9.os9` as the value +- If `os9_cfg_generate` is set to true, the variable generates the role configuration commands in a file +- Any role variable with a corresponding state variable set to absent negates the configuration of that variable +- Setting an empty value for any variable negates the corresponding configuration +- Variables and values are case-sensitive + +**os9_vrf keys** + +| Key | Type | Description | Support | +|------------|---------------------------|---------------------------------------------------------|-----------------------| +| ``vrfdetails`` | list | Configures the list of VRF instances (see ``instances.*``) | os9 | +| ``vrfdetails.vrf_name`` | string | Specifies the VRF instance name (default is management) | os9 | +| ``vrfdetails.vrf_id`` | integer (required) | Configures the VRF ID for the corresponding VRF | os9 | +| ``vrfdetails.description`` | string | Configures a one line description for the VRF | os9 | +| ``vrfdetails.state`` | string | Deletes the VRF instance name if set to absent | os9 | +| ``vrfdetails.tagged_portname`` | list | Specifies list of valid interface names | os9 | +| ``tagged_portname.port`` | string | Specifies valid interface name | os9 | +| ``tagged_portname.state`` | string | Deletes VRF association in the interface if set to absent | os9 | + +> **NOTE**: Asterisk (\*) denotes the default value if none is specified. + +Connection variables +-------------------- + +Ansible Dell EMC network roles require connection information to establish communication with the nodes in your inventory. This information can exist in the Ansible *group_vars* or *host_vars* directories, or inventory or in the playbook itself. + +| Key | Required | Choices | Description | +|-------------|----------|------------|-----------------------------------------------------| +| ``ansible_host`` | yes | | Specifies the hostname or address for connecting to the remote device over the specified transport | +| ``ansible_port`` | no | | Specifies the port used to build the connection to the remote device; if value is unspecified, the `ANSIBLE_REMOTE_PORT` option is used; it defaults to 22 | +| ``ansible_ssh_user`` | no | | Specifies the username that authenticates the CLI login for the connection to the remote device; if value is unspecified, the `ANSIBLE_REMOTE_USER` environment variable value is used | +| ``ansible_ssh_pass`` | no | | Specifies the password that authenticates the connection to the remote device | +| ``ansible_become`` | no | yes, no\* | Instructs the module to enter privileged mode on the remote device before sending any commands; if value is unspecified, the `ANSIBLE_BECOME` environment variable value is used, and the device attempts to execute all commands in non-privileged mode | +| ``ansible_become_method`` | no | enable, sudo\* | Instructs the module to allow the become method to be specified for handling privilege escalation; if value is unspecified, the `ANSIBLE_BECOME_METHOD` environment variable value is used | +| ``ansible_become_pass`` | no | | Specifies the password to use if required to enter privileged mode on the remote device; if ``ansible_become`` is set to no this key is not applicable | +| ``ansible_network_os`` | yes | os9, null\* | Loads the correct terminal and cliconf plugins to communicate with the remote device | + +> **NOTE**: Asterisk (\*) denotes the default value if none is specified. + +Dependencies +------------ + +The *os9_vrf* role is built on modules included in the core Ansible code. These modules were added in Ansible version 2.2.0 + +Example playbook +---------------- + +This example uses the *os9_vrf* role to setup a VRF and associate it to an interface. It creates a *hosts* file with the switch details and corresponding variables. The hosts file should define the `ansible_network_os` variable with corresponding Dell EMC OS9 name. + +When `os9_cfg_generate` is set to true, the variable generates the configuration commands as a .part file in *build_dir* path. By default, the variable is set to false. It writes a simple playbook that references the *os9_vrf* role. + +*upd_src_ip_loopback_id* has an dependency with association of the interface in a VRF, and the *os9_vrf* role needs to be invoked twice with different input dictionary one for the create and one for *upd_src_ip_loopback_id*. + +**Sample hosts file** + + leaf1 ansible_host= <ip_address> + +**Sample host_vars/leaf1 for os9 device + + hostname: leaf1 + ansible_become: yes + ansible_become_method: xxxxx + ansible_become_pass: xxxxx + ansible_ssh_user: xxxxx + ansible_ssh_pass: xxxxx + ansible_network_os: dellemc.os9.os9 + build_dir: ../temp/os9 + os9_vrf: + vrfdetails: + - vrf_name: "os9vrf" + state: "present" + ip_route_import: + community_value: "10:20" + state: "present" + ip_route_export: + community_value: "30:40" + state: "present" + ipv6_route_import: + community_value: "40:50" + state: "absent" + ipv6_route_export: + community_value: "60:70" + state: "absent" + map_ip_interface: + - intf_id : "loopback11" + state : "present" + + os9_vrf_upd_src_loopback: + vrfdetails: + - vrf_name: "os9vrf" + state: "present" + upd_src_ip_loopback_id: 11 + +**Simple playbook to setup system — leaf.yaml** + + - hosts: leaf1 + roles: + - dellemc.os9.os9_vrf + +**Simple playbook to setup os9 with upd_src_ip_loopback_id — leaf.yaml** + + - hosts: leaf1 + roles: + - dellemc.os9.os9_vrf + - hosts: leaf1 + vars: + os9_vrf: "{{ os9_vrf_upd_src_loopback }}" + roles: + - dellemc.os9.os9_vrf + +**Run** + + ansible-playbook -i hosts leaf.yaml + +(c) 2017-2020 Dell Inc. or its subsidiaries. All rights reserved. diff --git a/ansible_collections/dellemc/os9/roles/os9_vrf/defaults/main.yml b/ansible_collections/dellemc/os9/roles/os9_vrf/defaults/main.yml new file mode 100644 index 000000000..5f46d6469 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_vrf/defaults/main.yml @@ -0,0 +1,2 @@ +--- +# defaults file for dellemc.os9.os9_vrf
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_vrf/handlers/main.yml b/ansible_collections/dellemc/os9/roles/os9_vrf/handlers/main.yml new file mode 100644 index 000000000..accc50fbf --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_vrf/handlers/main.yml @@ -0,0 +1,2 @@ +--- +# handlers file for dellemc.os9.os9_vrf
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_vrf/meta/main.yml b/ansible_collections/dellemc/os9/roles/os9_vrf/meta/main.yml new file mode 100644 index 000000000..f70f98b6a --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_vrf/meta/main.yml @@ -0,0 +1,18 @@ +# Copyright (c) 2017-2020 Dell Inc. or its subsidiaries. All Rights Reserved. +--- +galaxy_info: + author: Dell EMC Networking Engineering + description: The os9_vrf role facilitates the configuration of VRF attributes in devices running Dell EMC Networking Operating Systems. + company: Dell Inc + license: GPLv3 + min_ansible_version: 2.9.6 + + platforms: + - name: os9 + + galaxy_tags: + - networking + - dell + - emc + - dellemc + - os9
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_vrf/tasks/main.yml b/ansible_collections/dellemc/os9/roles/os9_vrf/tasks/main.yml new file mode 100644 index 000000000..8f4592123 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_vrf/tasks/main.yml @@ -0,0 +1,16 @@ +--- +# tasks file for os9 + - name: "Generating VRF configuration for os9" + template: + src: os9_vrf.j2 + dest: "{{ build_dir }}/vrf9_{{ hostname }}.conf.part" + when: (ansible_network_os is defined and ansible_network_os == "dellemc.os9.os9") and ((os9_cfg_generate | default('False'))| bool) +# notify: save config os9 + register: generate_output + + - name: "Provisioning VRF configuration for os9" + dellemc.os9.os9_config: + src: os9_vrf.j2 + when: (ansible_network_os is defined and ansible_network_os == "dellemc.os9.os9") +# notify: save config os9 + register: output diff --git a/ansible_collections/dellemc/os9/roles/os9_vrf/templates/os9_vrf.j2 b/ansible_collections/dellemc/os9/roles/os9_vrf/templates/os9_vrf.j2 new file mode 100644 index 000000000..20690130e --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_vrf/templates/os9_vrf.j2 @@ -0,0 +1,68 @@ +#jinja2: trim_blocks: True,lstrip_blocks: True +{################################ +Purpose: +Configure VRF on os9 Devices. +os9_vrf: + vrfdetails: + - vrf_id: 1 + vrf_name: VLTi-KEEPALIVE + description: VRF-to-support-Peer-Keepalive-Link + state: present + tagged_portname: + - port: fortyGige 1/2 + state: present + - port: fortyGige 1/3 + state: absent +################################} +{% if (os9_vrf is defined and os9_vrf) %} +{% if os9_vrf.vrfdetails is defined %} + {% for vrf in os9_vrf.vrfdetails %} + {% if vrf.vrf_name is defined %} + {% if vrf.vrf_name %} + {% if vrf.state is defined and vrf.state == 'absent' %} + {% if vrf.tagged_portname is defined and vrf.tagged_portname %} + {% for tag in vrf.tagged_portname %} + {% if tag.state is defined and tag.state == 'absent' %} + {% if tag.port is defined and tag.port %} +interface {{ tag.port }} + no ip vrf forwarding + exit + {% endif %} + {% endif %} + {% endfor %} + {% endif %} +no ip vrf {{ vrf.vrf_name }} + {% else %} + {% if vrf.vrf_id is defined %} + {% if vrf.vrf_id %} +feature vrf +ip vrf {{ vrf.vrf_name }} {{ vrf.vrf_id }} + {% if vrf.description is defined %} + {% if vrf.description %} + description {{ vrf.description }} + {% else %} + no description sample + {% endif %} + {% endif %} + {% if vrf.tagged_portname is defined %} + {% if vrf.tagged_portname %} + {% for tag in vrf.tagged_portname %} + {% if tag.port is defined and tag.port %} +interface {{ tag.port }} + {% if tag.state is defined and tag.state == 'absent' %} + no ip vrf forwarding + {% else %} + ip vrf forwarding {{ vrf.vrf_name }} + {% endif %} + {% endif %} + {% endfor %} + {% endif %} + {% endif %} + {% endif %} + {% endif %} + {% endif %} + {% endif %} + {% endif %} + {% endfor %} +{% endif %} +{% endif %}
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_vrf/tests/inventory.yaml b/ansible_collections/dellemc/os9/roles/os9_vrf/tests/inventory.yaml new file mode 100644 index 000000000..5fd33c945 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_vrf/tests/inventory.yaml @@ -0,0 +1,20 @@ +spine1 ansible_host=100.94.210.44 +spine2 ansible_host=10.11.182.26 +leaf1 ansible_host=10.11.182.27 +leaf2 ansible_host=10.11.182.28 +leaf3 ansible_host=10.11.182.29 +leaf4 ansible_host=10.11.182.30 + +[spine] +spine1 +spine2 + +[leaf] +leaf1 +leaf2 +leaf3 +leaf4 + +[datacenter:children] +spine +leaf diff --git a/ansible_collections/dellemc/os9/roles/os9_vrf/tests/main.os9.yaml b/ansible_collections/dellemc/os9/roles/os9_vrf/tests/main.os9.yaml new file mode 100644 index 000000000..865dcc3c1 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_vrf/tests/main.os9.yaml @@ -0,0 +1,15 @@ +--- +# vars file for dellemc.os9.os9_vrf, +# below gives a sample configuration +# Sample variables for OS9 device +os9_vrf: + vrfdetails: + - vrf_id: 23 + vrf_name: VRFi-KEEPALIVE + description: test + state: absent + tagged_portname: + - port: fortyGigE 1/7 + state: absent + - port: fortyGigE 1/8 + state: absent
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_vrf/tests/test.yaml b/ansible_collections/dellemc/os9/roles/os9_vrf/tests/test.yaml new file mode 100644 index 000000000..286efc507 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_vrf/tests/test.yaml @@ -0,0 +1,5 @@ +--- +- hosts: datacenter + connection: network_cli + roles: + - dellemc.os9.os9_vrf
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_vrf/vars/main.yml b/ansible_collections/dellemc/os9/roles/os9_vrf/vars/main.yml new file mode 100644 index 000000000..0d4921a9f --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_vrf/vars/main.yml @@ -0,0 +1,2 @@ +--- +# vars file for dellemc.os9.os9_vrf
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_vrrp/LICENSE b/ansible_collections/dellemc/os9/roles/os9_vrrp/LICENSE new file mode 100644 index 000000000..2c9b8e1fd --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_vrrp/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/> + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (c) 2020, Dell Inc. All rights reserved. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <https://www.gnu.org/licenses/>. + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + <program> Copyright (c) 2020, Dell Inc. All rights reserved. + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +<https://www.gnu.org/licenses/>. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +<https://www.gnu.org/licenses/why-not-lgpl.html>. diff --git a/ansible_collections/dellemc/os9/roles/os9_vrrp/README.md b/ansible_collections/dellemc/os9/roles/os9_vrrp/README.md new file mode 100644 index 000000000..794471581 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_vrrp/README.md @@ -0,0 +1,148 @@ +VRRP role +========= + +This role facilitates configuring virtual router redundancy protocol (VRRP) attributes. It supports the creation of VRRP groups for interfaces and setting the VRRP group attributes. This role is abstracted for Dell EMC PowerSwitch platforms running Dell EMC OS9. + +The VRRP role requires an SSH connection for connectivity to a Dell EMC OS9 device. You can use any of the built-in OS connection variables. + +Role variables +-------------- + +- Role is abstracted using the `ansible_network_os` variable that can take the `dellemc.os9.os9` as the value +- If `os9_cfg_generate` is set to true, the variable generates the role configuration commands in a file +- Any role variable with a corresponding state variable set to absent negates the configuration of that variable +- Setting an empty value for any variable negates the corresponding configuration +- `os9_vrrp` (dictionary) holds a dictionary with the interface name key +- Interface name can correspond to any of the valid os9 interface with a unique interface identifier name +- Physical interfaces names must be in *<interfacename> <tuple>* format (for example *fortyGigE 1/1*) +- Logical interface names must be in *<logical_interfacename> <id>* format (for example, *vlan 1* for os9) +- Variables and values are case-sensitive + +| Key | Type | Description | Support | +|------------|---------------------------|---------------------------------------------------------|-----------------------| +| ``vrrp`` | dictionary | Configures VRRP commands (see ``vrrp.*``) | os9 | +| ``delay_min`` | integer | Configures the minimum delay timer applied after interface up event (0 to 900 | os9 | +| ``delay_reload`` | integer | Configures the minimum delay timer applied after boot (0 to 900) | os9 | +| ``vrrp_group`` | list | Configures VRRP group commands (see ``vrrp_group.*``) | os9 | +| ``vrrp_group.type`` | string: ipv6,ipv4 | Specifies the type of the VRRP group | os9 | +| ``vrrp_group.group_id`` | integer (required) | Configures the ID for the VRRP group (1 to 255) | os9 | +| ``vrrp_group.description`` | string | Configures a single line description for the VRRP group | os9 | +| ``vrrp_group.virtual_address`` | string | Configures a virtual-address to the VRRP group (A.B.C.D format) | os9 | +| ``vrrp_group.enable`` | boolean: true,false | Enables/disables the VRRP group at the interface | os9 | +| ``vrrp_group.preempt`` | boolean: true\*,false | Configures preempt mode on the VRRP group | os9 | +| ``vrrp_group.priority`` |integer | Configures priority for the VRRP group (1 to 255; default 100) | os9 | +| ``vrrp_group.version`` | string: 2\*,3,both | Configures the VRRP version of the VRRP group; not supported when *vrrp_group.type* is "ipv6" | os9 | +| ``vrrp_group.hold_time_centisecs`` | integer | Configures the hold-time for the VRRP group in centiseconds (0 to 65525 and in multiple of 25; default 100); centisecs gets converted into seconds in version 2 | os9 | +| ``vrrp_group.adv_interval_centisecs`` | integer | Configures the advertisement interval for the VRRP group in centiseconds (25 to 4075; default 100) and in multiple of 25; centisecs gets converted into seconds in version 2 | os9 | +| ``vrrp_group.track_interface`` | list | Configures the track interface of the VRRP group (see ``track.*``) | os9 | +| ``track_interface.resource_id`` | integer | Configures the object tracking resource ID of the VRRP group; mutually exclusive with *track.interface* | os9 | +| ``track_interface.interface`` | string | Configures the track interface of the VRRP group (<interface name> <interface number> format) | os9 | +| ``track_interface.priority_cost`` | integer | Configures the priority cost for track interface of the VRRP group (1 to 254; default 10) | os9 | +| ``track_interface.state`` | string: present\*,absent | Deletes the specific track interface from the VRRP group if set to absent | os9 | +| ``vrrp_group.track_interface_state`` | string: present*,absent | Deletes all track interfaces from the VRRP group if set to absent | os9 | +| ``vrrp_group.authentication`` | dictionary | Configures the authentication type for the VRRP group (see ``authentication.*``); not supported when ``vrrp_group.type`` is "ipv6" | os9 | +| ``authentication.key`` | string (required): 0,7,LINE | Configures the authentication key for the VRRP group | os9 | +| ``authentication.key_string`` | string | Configures the user key string; if key is 7, this variable takes the hidden user key string; if key is 0, this variable takes the unencrypted user key (clear-text); supported only if the value of *authentication.key* is 7 or 0 | os9 | +| ``authentication.state`` | string: present\*,absent | Deletes authentication from the interface VRRP group if set to absent | os9 | +| ``vrrp_group.state`` | string: present\*,absent | Deletes the VRRP group from the interface if set to absent | os9 | + +> **NOTE**: Asterisk (\*) denotes the default value if none is specified. + +Connection variables +-------------------- + +Ansible Dell EMC network roles require connection information to establish communication with the nodes in your inventory. This information can exist in the Ansible *group_vars* or *host_vars* directories, or inventory or in the playbook itself. + +| Key | Required | Choices | Description | +|-------------|----------|------------|-----------------------------------------------------| +| ``ansible_host`` | yes | | Specifies the hostname or address for connecting to the remote device over the specified transport | +| ``ansible_port`` | no | | Specifies the port used to build the connection to the remote device; if value is unspecified, the `ANSIBLE_REMOTE_PORT` option is used; it defaults to 22 | +| ``ansible_ssh_user`` | no | | Specifies the username that authenticates the CLI login for the connection to the remote device; if value is unspecified, the `ANSIBLE_REMOTE_USER` environment variable value is used | +| ``ansible_ssh_pass`` | no | | Specifies the password that authenticates the connection to the remote device | +| ``ansible_become`` | no | yes, no\* | Instructs the module to enter privileged mode on the remote device before sending any commands; if value is unspecified, the `ANSIBLE_BECOME` environment variable value is used, and the device attempts to execute all commands in non-privileged mode | +| ``ansible_become_method`` | no | enable, sudo\* | Instructs the module to allow the become method to be specified for handling privilege escalation; if value is unspecified, the `ANSIBLE_BECOME_METHOD` environment variable value is used | +| ``ansible_become_pass`` | no | | Specifies the password to use if required to enter privileged mode on the remote device; if ``ansible_become`` is set to no this key is not applicable | +| ``ansible_network_os`` | yes | os9, null\* | Loads the correct terminal and cliconf plugins to communicate with the remote device | + +> **NOTE**: Asterisk (\*) denotes the default value if none is specified. + +Example playbook +---------------- + +This example uses the *os9_vrrp* role to configure VRRP commands at the interfaces. It creates a *hosts* file with the switch details and corresponding variables. The hosts file should define the `ansible_network_os` variable with corresponding Dell EMC OS9 name. + +When `os9_cfg_generate` is set to true, the variable generates the configuration commands as a .part file in *build_dir* path. By default, the variable is set to false. It writes a simple playbook that only references the *os9_vrrp* role. + +**Sample hosts file** + + leaf1 ansible_host= <ip_address> + +**Sample host_vars/leaf1** + + hostname: leaf1 + ansible_become: yes + ansible_become_method: xxxxx + ansible_become_pass: xxxxx + ansible_ssh_user: xxxxx + ansible_ssh_pass: xxxxx + ansible_network_os: dellemc.os9.os9 + build_dir: ../temp/os9 + os9_vrrp: + fortyGigE 1/5: + vrrp: + delay_min: 2 + delay_reload: 3 + vrrp_group: + - group_id: 2 + type: ipv6 + description: "Interface-vrrp-ipv6" + virtual_address: 2001:4898:5808:ffa3::9 + enable: true + priority: 120 + preempt: false + track_interface: + - resource_id: 3 + priority_cost: 25 + state: present + - interface: port-channel 120 + priority_cost: 20 + - interface: fortyGigE 1/11 + state: present + track_interface_state: present + adv_interval_centisecs: 200 + hold_time_centisecs: 20 + - group_id: 4 + state: present + description: "Interface-vrrp4" + virtual_address: 10.28.0.2 + enable: true + priority: 120 + preempt: false + version: both + track_interface: + - resource_id: 3 + priority_cost: 25 + state: present + - interface: port-channel 120 + priority_cost: 20 + - interface: fortGigE 1/10 + state: present + track_interface_state: present + adv_interval_centisecs: 225 + hold_time_centisecs: 25 + authentication: + key: 0 + key_string: vrrpkey + state: present + +**Simple playbook to setup system — leaf.yaml** + + - hosts: leaf1 + roles: + - dellemc.os9.os9_vrrp + +**Run** + + ansible-playbook -i hosts leaf.yaml + +(c) 2017-2020 Dell Inc. or its subsidiaries. All rights reserved. diff --git a/ansible_collections/dellemc/os9/roles/os9_vrrp/defaults/main.yml b/ansible_collections/dellemc/os9/roles/os9_vrrp/defaults/main.yml new file mode 100644 index 000000000..2d4f53173 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_vrrp/defaults/main.yml @@ -0,0 +1,2 @@ +--- +# defaults file for dellemc.os9.os9_vrrp
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_vrrp/handlers/main.yml b/ansible_collections/dellemc/os9/roles/os9_vrrp/handlers/main.yml new file mode 100644 index 000000000..78760008d --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_vrrp/handlers/main.yml @@ -0,0 +1,2 @@ +--- +# handlers file for dellemc.os9.os9_vrrp
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_vrrp/meta/main.yml b/ansible_collections/dellemc/os9/roles/os9_vrrp/meta/main.yml new file mode 100644 index 000000000..db226e2c9 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_vrrp/meta/main.yml @@ -0,0 +1,19 @@ +# Copyright (c) 2020 Dell Inc. +--- +galaxy_info: + author: Dell EMC Networking Engineering + description: > + The os9_vrrp role facilitates the configuration of Virtual Router Redundancy Protocol (VRRP) attributes in + devices running Dell EMC Networking Operating Systems. + license: GPLv3 + min_ansible_version: 2.9.6 + + platforms: + - name: os9 + + galaxy_tags: + - networking + - dell + - dellemc + - emc + - os9 diff --git a/ansible_collections/dellemc/os9/roles/os9_vrrp/tasks/main.yml b/ansible_collections/dellemc/os9/roles/os9_vrrp/tasks/main.yml new file mode 100644 index 000000000..b8d3bed1c --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_vrrp/tasks/main.yml @@ -0,0 +1,16 @@ +--- +# tasks file for os9 + - name: "Generating VRRP configuration for os9" + template: + src: os9_vrrp.j2 + dest: "{{ build_dir }}/vrrp9_{{ hostname }}.conf.part" + when: (ansible_network_os is defined and ansible_network_os == "dellemc.os9.os9") and ((os9_cfg_generate | default('False')) | bool) +# notify: save config os9 + register: generate_output + + - name: "Provisioning VRRP configuration for os9" + dellemc.os9.os9_config: + src: os9_vrrp.j2 + when: (ansible_network_os is defined and ansible_network_os == "dellemc.os9.os9") +# notify: save config os9 + register: output diff --git a/ansible_collections/dellemc/os9/roles/os9_vrrp/templates/os9_vrrp.j2 b/ansible_collections/dellemc/os9/roles/os9_vrrp/templates/os9_vrrp.j2 new file mode 100644 index 000000000..f3e4a1dfc --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_vrrp/templates/os9_vrrp.j2 @@ -0,0 +1,218 @@ +#jinja2: trim_blocks: True, lstrip_blocks: True +{########################################## +Purpose: +Configure VRRP commands for os9 Devices +os9_vrrp: + fortyGigE 1/4: + vrrp: + delay_min: 2 + delay_reload: 2 + vrrp_group: + - group_id: 2 + type: ipv6 + description: "Interface-vrrp-ipv6" + virtual_address: 2001:4898:5808:ffa3::9 + enable: true + priority: 120 + preempt: false + track_interface: + - resource_id: 3 + priority_cost: 25 + state: present + - interface: port-channel 120 + priority_cost: 20 + - interface: fortyGigE 1/10 + state: present + track_interface_state: present + adv_interval_centisecs: 200 + hold_time_centisecs: 20 + state: present + + - group_id: 4 + state: present + description: "Interface-vrrp4" + virtual_address: 10.2.0.1 + enable: true + priority: 120 + preempt: false + version: 2 + track_interface: + - resource_id: 3 + priority_cost: 25 + state: present + - interface: port-channel 120 + priority_cost: 20 + - interface: fortyGigE 1/12 + state: present + track_interface_state: present + adv_interval_centisecs: 200 + hold_time_centisecs: 20 + authentication: + key: 0 + key_string: vrrpkey + state: present +#########################################} +{% if os9_vrrp is defined and os9_vrrp %} +{% for key,value in os9_vrrp.items() %} +interface {{ key }} + {% if value %} + {% if value.vrrp is defined and value.vrrp %} + {% if value.vrrp.delay_min is defined %} + {% if value.vrrp.delay_min >=0 %} + vrrp delay minimum {{ value.vrrp.delay_min }} + {% else %} + no vrrp delay minimum + {% endif %} + {% endif %} + {% if value.vrrp.delay_reload is defined %} + {% if value.vrrp.delay_reload >=0 %} + vrrp delay reload {{ value.vrrp.delay_reload }} + {% else %} + vrrp delay reload {{ value.vrrp.delay_reload }} + {% endif %} + {% endif %} + {% endif %} + {% for group in value.vrrp_group %} + {% if group.group_id is defined and group.group_id %} + {% if group.state is defined and group.state == "absent" %} + {% if group.type is defined and group.type == "ipv6" %} + no vrrp-ipv6-group {{ group.group_id }} + {% else %} + no vrrp-group {{ group.group_id }} + {% endif %} + {% else %} + {% if group.type is defined and group.type == "ipv6" %} + vrrp-ipv6-group {{ group.group_id }} + {% else %} + vrrp-group {{ group.group_id }} + {% endif %} + {% if group.type is not defined or not group.type == "ipv6" %} + {% if group.version is defined %} + {% if group.version %} + version {{ group.version }} + {% else %} + no version + {% endif %} + {% endif %} + {% endif %} + {% if group.adv_interval_centisecs is defined %} + {% if group.adv_interval_centisecs %} + {% if group.version is not defined or (group.version is defined and group.version == 2) %} + {% set adv_int = group.adv_interval_centisecs/100 %} + {% if group.type is defined and group.type == "ipv6" %} + advertise-interval centisecs {{ group.adv_interval_centisecs }} + {% else %} + advertise-interval {{ adv_int|int }} + {% endif %} + {% else %} + advertise-interval centisecs {{ group.adv_interval_centisecs }} + {% endif %} + {% else %} + no advertise-interval + {% endif %} + {% endif %} + {% if group.hold_time_centisecs is defined %} + {% if group.hold_time_centisecs >= 0 %} + {% if group.version is not defined or (group.version is defined and group.version == 2) %} + {% set hold_time = group.hold_time_centisecs/100 %} + {% if group.type is defined and group.type == "ipv6" %} + hold-time centisecs {{ group.hold_time_centisecs }} + {% else %} + hold-time {{ hold_time|int }} + {% endif %} + {% else %} + hold-time centisecs {{ group.hold_time_centisecs }} + {% endif %} + {% else %} + no hold-time + {% endif %} + {% endif %} + {% if group.track_interface_state is defined and group.track_interface_state == "absent" %} + no track + {% else %} + {% if group.track_interface is defined and group.track_interface %} + {% for track_item in group.track_interface %} + {% if track_item.state is defined and track_item.state == "absent" %} + {% if track_item.resource_id is defined and track_item.resource_id %} + no track {{ track_item.resource_id }} + {% elif track_item.interface is defined and track_item.interface %} + no track {{ track_item.interface }} + {% endif %} + {% else %} + {% if track_item.resource_id is defined and track_item.resource_id %} + {% if track_item.priority_cost is defined and track_item.priority_cost %} + track {{ track_item.resource_id }} priority-cost {{ track_item.priority_cost }} + {% else %} + track {{ track_item.resource_id }} + {% endif %} + {% elif track_item.interface is defined and track_item.interface %} + {% if track_item.priority_cost is defined and track_item.priority_cost %} + track {{ track_item.interface }} priority-cost {{ track_item.priority_cost }} + {% else %} + track {{ track_item.interface }} + {% endif %} + {% endif %} + {% endif %} + {% endfor %} + {% endif %} + {% endif %} + {% if group.type is not defined or not group.type == "ipv6" %} + {% if group.authentication is defined and group.authentication %} + {% if group.authentication.state is defined and group.authentication.state == "absent" %} + no authentication-type + {% else %} + {% if group.authentication.key is defined %} + {% if group.version is not defined or (group.version is defined and group.version == 2) %} + {% if group.authentication.key == 0 or group.authentication.key == 7 %} + {% if group.authentication.key_string is defined and group.authentication.key_string %} + authentication-type simple {{ group.authentication.key }} {{ group.authentication.key_string }} + {% endif %} + {% elif group.authentication.key %} + authentication-type simple {{ group.authentication.key }} + {% endif %} + {% endif %} + {% endif %} + {% endif %} + {% endif %} + {% endif %} + {% if group.virtual_address is defined %} + {% if group.virtual_address %} + virtual-address {{ group.virtual_address }} + {% else %} + no virtual-address + {% endif %} + {% endif %} + {% if group.description is defined %} + {% if group.description %} + description {{ group.description }} + {% else %} + no description + {% endif %} + {% endif %} + {% if group.preempt is defined %} + {% if group.preempt %} + preempt + {% else %} + no preempt + {% endif %} + {% endif %} + {% if group.enable is defined %} + {% if group.enable %} + no disable + {% else %} + disable + {% endif %} + {% endif %} + {% if group.priority is defined %} + {% if group.priority %} + priority {{ group.priority }} + {% else %} + no priority + {% endif %} + {% endif %} + {% endif %} + {% endif %} + {% endfor %} + {% endif %} +{% endfor %} +{% endif %}
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_vrrp/tests/inventory.yaml b/ansible_collections/dellemc/os9/roles/os9_vrrp/tests/inventory.yaml new file mode 100644 index 000000000..5fd33c945 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_vrrp/tests/inventory.yaml @@ -0,0 +1,20 @@ +spine1 ansible_host=100.94.210.44 +spine2 ansible_host=10.11.182.26 +leaf1 ansible_host=10.11.182.27 +leaf2 ansible_host=10.11.182.28 +leaf3 ansible_host=10.11.182.29 +leaf4 ansible_host=10.11.182.30 + +[spine] +spine1 +spine2 + +[leaf] +leaf1 +leaf2 +leaf3 +leaf4 + +[datacenter:children] +spine +leaf diff --git a/ansible_collections/dellemc/os9/roles/os9_vrrp/tests/main.os9.yaml b/ansible_collections/dellemc/os9/roles/os9_vrrp/tests/main.os9.yaml new file mode 100644 index 000000000..856d381cc --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_vrrp/tests/main.os9.yaml @@ -0,0 +1,59 @@ +--- +# vars file for dellemc.os9.os9_vrrp, +# below gives a example configuration +# Sample variables for OS9 device +os9_vrrp: + fortyGigE 0/28: + vrrp: + delay_min: 4 + delay_reload: 5 + vrrp_group: + - group_id: 2 + type: ipv6 + description: "Interface-vrrp-ipv6" + virtual_address: 2001:4898:5808:ffa3::9 + enable: true + priority: 120 + preempt: false + track_interface: + - resource_id: 3 + priority_cost: 25 + state: present + - interface: port-channel 120 + priority_cost: 20 + - interface: fortyGigE 0/40 + state: present + track_interface_state: present + adv_interval_centisecs: 200 + hold_time_centisecs: 20 + state: present + - group_id: 4 + state: present + description: "Interface-vrrp4" + virtual_address: 10.28.0.2 + enable: true + priority: 120 + preempt: false + version: 3 + track_interface: + - resource_id: 3 + priority_cost: 25 + state: present + - interface: port-channel 120 + priority_cost: 20 + - interface: fortyGigE 0/20 + state: absent + track_interface_state: present + adv_interval_centisecs: 200 + hold_time_centisecs: 200 + authentication: + key: 0 + key_string: vrrpkey + state: present + - group_id: 3 + state: present + description: "Interface-vrrp3" + virtual_address: 10.28.0.3 + enable: true + priority: 120 + preempt: false
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_vrrp/tests/test.yaml b/ansible_collections/dellemc/os9/roles/os9_vrrp/tests/test.yaml new file mode 100644 index 000000000..a12c274f1 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_vrrp/tests/test.yaml @@ -0,0 +1,5 @@ +--- +- hosts: datacenter + connection: network_cli + roles: + - dellemc.os9.os9_vrrp
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_vrrp/vars/main.yml b/ansible_collections/dellemc/os9/roles/os9_vrrp/vars/main.yml new file mode 100644 index 000000000..c241486b6 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_vrrp/vars/main.yml @@ -0,0 +1,2 @@ +--- +# vars file for dellemc.os9.os9_vrrp
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_xstp/LICENSE b/ansible_collections/dellemc/os9/roles/os9_xstp/LICENSE new file mode 100644 index 000000000..2c9b8e1fd --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_xstp/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/> + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (c) 2020, Dell Inc. All rights reserved. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <https://www.gnu.org/licenses/>. + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + <program> Copyright (c) 2020, Dell Inc. All rights reserved. + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +<https://www.gnu.org/licenses/>. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +<https://www.gnu.org/licenses/why-not-lgpl.html>. diff --git a/ansible_collections/dellemc/os9/roles/os9_xstp/README.md b/ansible_collections/dellemc/os9/roles/os9_xstp/README.md new file mode 100644 index 000000000..09223b8dd --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_xstp/README.md @@ -0,0 +1,127 @@ +# xSTP role + +This role facilitates the configuration of xSTP attributes. It supports multiple version of spanning-tree protocol (STP), rapid spanning-tree (RSTP), rapid per-VLAN spanning-tree (Rapid PVST+), multiple spanning-tree (MST), and per-VLAN spanning-tree (PVST). It supports the configuration of bridge priority, enabling and disabling spanning-tree, creating and deleting instances, and mapping virtual LAN (VLAN) to instances. This role is abstracted for Dell EMC PowerSwitch platforms running Dell EMC OS9. + +The xSTP role requires an SSH connection for connectivity to a Dell EMC OS9 device. You can use any of the built-in OS connection variables. + +Role variables +-------------- + +- Role is abstracted using the `ansible_network_os` variable that can take `dellemc.os9.os9` as the value +- If `os9_cfg_generate` is set to true, the variable generates the role configuration commands in a file +- `os9_xstp` (dictionary) contains the hostname (dictionary) +- Hostname is the value of the *hostname* variable that corresponds to the name of the OS device +- Any role variable with a corresponding state variable set to absent negates the configuration of that variable +- Setting an empty value to any variable negates the corresponding configuration +- Variables and values are case-sensitive + +**hostname keys** + +| Key | Type | Description | Support | +|------------|---------------------------|---------------------------------------------------------|----------------------| +| ``type`` | string (required) | Configures the type of spanning-tree mode specified including STP, RSTP, PVST, and MSTP | os9 | +| ``enable`` | boolean: true,false | Enables/disables the spanning-tree protocol specified in the type variable | os9 | +| ``stp`` | dictionary | Configures simple spanning-tree protocol (see ``stp.* keys``) | os9 | +| ``stp.bridge_priority`` | integer | Configures bridge-priority for the spanning-tree (0 to 61440 in multiples of 4096) | os9 | +| ``stp.state`` | string: absent,present\* | Deletes the configured STP if set to absent | os9 | +| ``rstp`` | dictionary | Configures rapid spanning-tree (see ``rstp.*``) | os9 | +| ``rstp.bridge_priority`` | integer | Configures bridge-priority for the spanning-tree (0 to 61440 in multiples of 4096) | os9 | +| ``rstp.state ``| string: absent,present\* | Deletes the configured RSTP in os9 devices if set to absent | os9 | +| ``pvst`` | dictionary | Configures per-VLAN spanning-tree protocol (see ``pvst.*``) | os9 | +| ``pvst.vlan`` | list | Configures the VLAN for PVST (see ``vlan.*``) | os9 | +| ``vlan.range_or_id`` | string | Configures a VLAN/range of VLANs for the per-VLAN spanning-tree protocol | os9 | +| ``vlan.bridge_priority`` | integer | Configures bridge-priority for the per-VLAN spanning-tree (0 to 61440 in multiples of 4096); mutually exclusive with *vlan.root* | os9 | +| ``pvst.state`` | string: absent,present\* | Deletes the configured PVST if set to absent | os9 | +| ``mstp`` | dictionary | Configures multiple spanning-tree protocol (see ``mstp.*``) | os9 | +| ``mstp.mstp_instances`` | list | Configures a MSTP instance (see ``mstp_instances.*``) | os9 | +| ``mstp_instances.number`` | integer | Configures the multiple spanning-tree instance number | os9 | +| ``mstp_instances.vlans`` | string | Configures a VLAN/range of VLANs by mapping it to the instance number in os9 devices | os9 | +| ``mstp_instances.bridge_priority`` | integer | Configures the bridge-priority for the spanning-tree (0 to 61440 in multiples of 4096); mutually exclusive with *mstp_instances.root* | os9 | +| ``mstp_instances.vlans_state`` | string: absent,present\* | Deletes a set of VLANs mapped to the spanning-tree instance if set to absent | os9 | +| ``mstp.state`` | string: absent,present\* | Deletes the configured MSTP if set to absent | os9 | +| ``intf`` | list | Configures multiple spanning-tree in an interface (see ``intf.*``) | os9 | +| ``intf <interface name>``| dictionary | Configures the interface name (see ``intf.<interface name>.*``) | os9 | +| ``intf.<interface name>.stp_type`` | list: stp,mstp,pvst,rstp | Configures the list of spanning-tree in an interface | os9 | +| ``intf.<interface name>.edge_port`` | boolean: true,false | in os9 devices according to the stp_type EdgePort is configured; | os9 | + +> **NOTE**: Asterisk (_*_) denotes the default value if none is specified. + +Connection variables +-------------------- + +Ansible Dell EMC network roles require connection information to establish communication with the nodes in your inventory. This information can exist in the Ansible *group_vars* or *host_vars* directories or inventory or in the playbook itself. + +| Key | Required | Choices | Description | +|-------------|----------|------------|-------------------------------------------------------| +| ``ansible_host`` | yes | | Specifies the hostname or address for connecting to the remote device over the specified transport | +| ``ansible_port`` | no | | Specifies the port used to build the connection to the remote device; if value is unspecified, the `ANSIBLE_REMOTE_PORT` option is used; it defaults to 22 | +| ``ansible_ssh_user`` | no | | Specifies the username that authenticates the CLI login for the connection to the remote device; if value is unspecified, the `ANSIBLE_REMOTE_USER` environment variable value is used | +| ``ansible_ssh_pass`` | no | | Specifies the password that authenticates the connection to the remote device | +| ``ansible_become`` | no | yes, no\* | Instructs the module to enter privileged mode on the remote device before sending any commands; if value is unspecified, the `ANSIBLE_BECOME` environment variable value is used, and the device attempts to execute all commands in non-privileged mode | +| ``ansible_become_method`` | no | enable, sudo\* | Instructs the module to allow the become method to be specified for handling privilege escalation; if value is unspecified, the `ANSIBLE_BECOME_METHOD` environment variable value is used | +| ``ansible_become_pass`` | no | | Specifies the password to use if required to enter privileged mode on the remote device; if ``ansible_become`` is set to no this key is not applicable | +| ``ansible_network_os`` | yes | os9, null\* | Loads the correct terminal and cliconf plugins to communicate with the remote device | + +> **NOTE**: Asterisk (\*) denotes the default value if none is specified. + +Example playbook +---------------- + +This example uses the *os9_xstp* role to configure different variants of spanning-tree. Based on the type of STP and defined objects, VLANs are associated and bridge priorities are assigned. It creates a *hosts* file with the switch details, and a *host_vars* file with connection variables. The corresponding role variables are defined in the *vars/main.yml* file at the role path. The hosts file should define the `ansible_network_os` variable with corresponding Dell EMC OS9 name. + +It writes a simple playbook that only references the *os9_xstp* role. By including the role, you automatically get access to all of the tasks to configure xSTP. When `os9_cfg_generate` is set to true, the variable generates the configuration commands as a .part file in build_dir path. By default, this variable is set to false. The example writes a simple playbook that only references the *os9_xstp* role. + +**Sample hosts file** + + spine1 ansible_host= <ip_address> + +**Sample host_vars/spine1** + + hostname: spine1 + ansible_become: yes + ansible_become_method: xxxxx + ansible_become_pass: xxxxx + ansible_ssh_user: xxxxx + ansible_ssh_pass: xxxxx + ansible_network_os: dellemc.os9.os9 + build_dir: ../temp/os9 + + +**Sample vars/main.yml** + + os9_xstp: + type: rstp + enable: true + stp: + bridge_priority: 4096 + state: present + rstp: + bridge_priority: 4096 + pvst: + vlan: + - range_or_id: 10 + bridge_priority: 4096 + mstp: + mstp_instances: + - number: 1 + vlans: 10,12 + bridge_priority: 4096 + vlans_state: present + intf: + fortyGigE 1/25: + stp_type: + - stp + - mstp + edge_port: true + +**Simple playbook to setup system — spine.yml** + + - hosts: spine + roles: + - dellemc.os9.os9_xstp + +**Run** + + ansible-playbook -i hosts spine.yml + +(c) 2017-2020 Dell Inc. or its subsidiaries. All rights reserved. diff --git a/ansible_collections/dellemc/os9/roles/os9_xstp/defaults/main.yml b/ansible_collections/dellemc/os9/roles/os9_xstp/defaults/main.yml new file mode 100644 index 000000000..d49cf4a3e --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_xstp/defaults/main.yml @@ -0,0 +1,2 @@ +--- +# defaults file for dellemc.os9.os9_xstp
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_xstp/handlers/main.yml b/ansible_collections/dellemc/os9/roles/os9_xstp/handlers/main.yml new file mode 100644 index 000000000..818e833de --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_xstp/handlers/main.yml @@ -0,0 +1,2 @@ +--- +# handlers file for dellemc.os9.os9_xstp
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_xstp/meta/main.yml b/ansible_collections/dellemc/os9/roles/os9_xstp/meta/main.yml new file mode 100644 index 000000000..009fcceae --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_xstp/meta/main.yml @@ -0,0 +1,18 @@ +# Copyright (c) 2020 Dell Inc. +--- +galaxy_info: + author: Dell EMC Networking Engineering + description: The os9_xstp role facilitates the configuration of STP attributes in devices running Dell EMC Networking Operating Systems. + company: Dell Inc + license: GPLv3 + min_ansible_version: 2.9.6 + + platforms: + - name: os9 + + galaxy_tags: + - networking + - dell + - dellemc + - emc + - os9 diff --git a/ansible_collections/dellemc/os9/roles/os9_xstp/tasks/main.yml b/ansible_collections/dellemc/os9/roles/os9_xstp/tasks/main.yml new file mode 100644 index 000000000..c98c538a8 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_xstp/tasks/main.yml @@ -0,0 +1,16 @@ +--- +# tasks file for os9 + - name: "Generating xSTP configuration for os9" + template: + src: os9_xstp.j2 + dest: "{{ build_dir }}/xstp9_{{ hostname }}.conf.part" + when: (ansible_network_os is defined and ansible_network_os == "dellemc.os9.os9") and ((os9_cfg_generate | default('False')) | bool) +# notify: save config os9 + register: generate_output + + - name: "Provisioning xSTP configuration for os9" + dellemc.os9.os9_config: + src: os9_xstp.j2 + when: (ansible_network_os is defined and ansible_network_os == "dellemc.os9.os9") +# notify: save config os9 + register: output diff --git a/ansible_collections/dellemc/os9/roles/os9_xstp/templates/os9_xstp.j2 b/ansible_collections/dellemc/os9/roles/os9_xstp/templates/os9_xstp.j2 new file mode 100644 index 000000000..b21ee592b --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_xstp/templates/os9_xstp.j2 @@ -0,0 +1,160 @@ +#jinja2: trim_blocks: True, lstrip_blocks: True +{############################################# +PURPOSE: Configure xSTP commands for os9 Devices +os9_xstp: + type: stp + enable: true + stp: + bridge_priority: 4096 + state: present + + rstp: + bridge_priority: 4096 + state: present + + pvst: + vlan: + - range_or_id: 10 + bridge_priority: 4096 + state: present + + mstp: + mstp_instances: + - number: 1 + vlans: 10,12 + vlans_state: present + bridge_priority: 4096 + state: present + intf: + fortyGigE 1/1: + stp_type: + - rstp + - mstp + edge_port: true +############################################} +{% if os9_xstp is defined and os9_xstp %} +{% set xstp_vars = os9_xstp %} +{% if xstp_vars.type is defined and xstp_vars.type %} + {% if xstp_vars.type == "stp" %} +protocol spanning-tree 0 + {% else %} +protocol spanning-tree {{ xstp_vars.type }} + {% endif %} + {% if xstp_vars.enable is defined %} + {% if xstp_vars.enable %} + no disable + {% else %} + disable + {% endif %} + {% endif %} +{% endif %} + +{% if xstp_vars.stp is defined and xstp_vars.stp %} + {% set val = xstp_vars.stp %} + {% if val.state is defined and val.state == "absent" %} +no protocol spanning-tree 0 + {% else %} + {% if val.bridge_priority is defined %} +protocol spanning-tree 0 + {% if val.bridge_priority == 0 or val.bridge_priority %} + bridge-priority {{ val.bridge_priority }} + {% else %} + no bridge-priority + {% endif %} + {% endif %} + {% endif %} +{% endif %} + +{% if xstp_vars.rstp is defined and xstp_vars.rstp %} + {% set val = xstp_vars.rstp %} + {% if val.state is defined and val.state == "absent" %} +no protocol spanning-tree rstp + {% else %} + {% if val.bridge_priority is defined %} +protocol spanning-tree rstp + {% if val.bridge_priority == 0 or val.bridge_priority %} + bridge-priority {{ val.bridge_priority }} + {% else %} + no bridge-priority + {% endif %} + {% endif %} + {% endif %} +{% endif %} + +{% if xstp_vars.pvst is defined and xstp_vars.pvst %} + {% set val = xstp_vars.pvst %} + {% if val.state is defined and val.state == "absent" %} +no protocol spanning-tree pvst + {% else %} + {% if val.vlan is defined and val.vlan %} +protocol spanning-tree pvst + {% for vlan in val.vlan %} + {% if vlan.range_or_id is defined and vlan.range_or_id %} + {% if vlan.bridge_priority is defined %} + {% if vlan.bridge_priority == 0 or vlan.bridge_priority %} + vlan {{ vlan.range_or_id }} bridge-priority {{ vlan.bridge_priority }} + {% else %} + no vlan {{ vlan.range_or_id }} bridge-priority + {% endif %} + {% endif %} + {% endif %} + {% endfor %} + {% endif %} + {% endif %} +{% endif %} + +{% if xstp_vars.mstp is defined and xstp_vars.mstp %} + {% set val = xstp_vars.mstp %} + {% if val.state is defined and val.state == "absent" %} +no protocol spanning-tree mstp + {% else %} + {% if val.mstp_instances is defined and val.mstp_instances %} +protocol spanning-tree mstp + {% for instance in val.mstp_instances %} + {% if instance.number is defined and instance.number %} + {% if instance.bridge_priority is defined %} + {% if instance.bridge_priority == 0 or instance.bridge_priority %} + MSTI {{ instance.number }} bridge-priority {{ instance.bridge_priority }} + {% else %} + no MSTI {{ instance.number }} bridge-priority + {% endif %} + {% endif %} + {% if instance.vlans is defined and instance.vlans %} + {% if instance.vlans_state is defined and instance.vlans_state == "absent" %} + no MSTI {{ instance.number }} VLAN {{ instance.vlans }} + {% else %} + MSTI {{ instance.number }} VLAN {{ instance.vlans }} + {% endif %} + {% endif %} + {% endif %} + {% endfor %} + {% endif %} + {% endif %} +{% endif %} + +{% if xstp_vars.intf is defined and xstp_vars.intf %} + {% for intr in xstp_vars.intf.keys() %} + {% set intf_vars = xstp_vars.intf[intr] %} +interface {{ intr }} + {% for type in intf_vars.stp_type %} + {% if type == "stp" %} + {% if intf_vars.edge_port is defined %} + {% if not intf_vars.edge_port %} + no spanning-tree 0 portfast + {% else %} + spanning-tree 0 portfast bpduguard + {% endif %} + {% endif %} + {% else %} + {% if intf_vars.edge_port is defined %} + {% if intf_vars.edge_port %} + spanning-tree {{ type }} edge-port + {% else %} + no spanning-tree {{ type }} edge-port + {% endif %} + {% endif %} + {% endif %} + {% endfor %} + {% endfor %} +{% endif %} +{% endif %}
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_xstp/tests/inventory.yaml b/ansible_collections/dellemc/os9/roles/os9_xstp/tests/inventory.yaml new file mode 100644 index 000000000..5fd33c945 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_xstp/tests/inventory.yaml @@ -0,0 +1,20 @@ +spine1 ansible_host=100.94.210.44 +spine2 ansible_host=10.11.182.26 +leaf1 ansible_host=10.11.182.27 +leaf2 ansible_host=10.11.182.28 +leaf3 ansible_host=10.11.182.29 +leaf4 ansible_host=10.11.182.30 + +[spine] +spine1 +spine2 + +[leaf] +leaf1 +leaf2 +leaf3 +leaf4 + +[datacenter:children] +spine +leaf diff --git a/ansible_collections/dellemc/os9/roles/os9_xstp/tests/main.os9.yaml b/ansible_collections/dellemc/os9/roles/os9_xstp/tests/main.os9.yaml new file mode 100644 index 000000000..7f30b0832 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_xstp/tests/main.os9.yaml @@ -0,0 +1,34 @@ +--- +# vars file for dellemc.os9.os9_xstp, +# below gives a sample configuration +# Sample variables for OS9 device +os9_xstp: + type: rstp + enable: true + stp: + bridge_priority: 4096 + state: present + + rstp: + bridge_priority: 4096 + state: present + + pvst: + vlan: + - range_or_id: 10 + bridge_priority: 4096 + state: present + + mstp: + mstp_instances: + - number: 1 + vlans: 10,12 + bridge_priority: 4096 + vlans_state: present + state: present + intf: + fortyGigE 1/25: + stp_type: + - stp + - mstp + edge_port: true
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_xstp/tests/test.yaml b/ansible_collections/dellemc/os9/roles/os9_xstp/tests/test.yaml new file mode 100644 index 000000000..77da96716 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_xstp/tests/test.yaml @@ -0,0 +1,5 @@ +--- +- hosts: datacenter + connection: network_cli + roles: + - dellemc.os9.os9_xstp
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/roles/os9_xstp/vars/main.yml b/ansible_collections/dellemc/os9/roles/os9_xstp/vars/main.yml new file mode 100644 index 000000000..d2fefb056 --- /dev/null +++ b/ansible_collections/dellemc/os9/roles/os9_xstp/vars/main.yml @@ -0,0 +1,2 @@ +--- +# vars file for dellemc.os9.os9_xstp
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/tests/.gitignore b/ansible_collections/dellemc/os9/tests/.gitignore new file mode 100644 index 000000000..ea1472ec1 --- /dev/null +++ b/ansible_collections/dellemc/os9/tests/.gitignore @@ -0,0 +1 @@ +output/ diff --git a/ansible_collections/dellemc/os9/tests/integration/targets/__init__.py b/ansible_collections/dellemc/os9/tests/integration/targets/__init__.py new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/ansible_collections/dellemc/os9/tests/integration/targets/__init__.py diff --git a/ansible_collections/dellemc/os9/tests/integration/targets/os9_command/os9_command/defaults/main.yaml b/ansible_collections/dellemc/os9/tests/integration/targets/os9_command/os9_command/defaults/main.yaml new file mode 100644 index 000000000..55a93fc23 --- /dev/null +++ b/ansible_collections/dellemc/os9/tests/integration/targets/os9_command/os9_command/defaults/main.yaml @@ -0,0 +1,2 @@ +--- +testcase: "*"
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/tests/integration/targets/os9_command/os9_command/tasks/cli.yaml b/ansible_collections/dellemc/os9/tests/integration/targets/os9_command/os9_command/tasks/cli.yaml new file mode 100644 index 000000000..7152815d7 --- /dev/null +++ b/ansible_collections/dellemc/os9/tests/integration/targets/os9_command/os9_command/tasks/cli.yaml @@ -0,0 +1,14 @@ +--- +- name: collect all cli test cases + find: + paths: "{{ role_path }}/tests/cli" + patterns: "{{ testcase }}.yaml" + register: test_cases + +- name: set test_items + set_fact: + test_items: "{{ test_cases.files | map(attribute='path') | list }}" + +- name: run test case + include: "{{ item }}" + with_items: "{{ test_items }}"
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/tests/integration/targets/os9_command/os9_command/tasks/main.yaml b/ansible_collections/dellemc/os9/tests/integration/targets/os9_command/os9_command/tasks/main.yaml new file mode 100644 index 000000000..d4898c29b --- /dev/null +++ b/ansible_collections/dellemc/os9/tests/integration/targets/os9_command/os9_command/tasks/main.yaml @@ -0,0 +1,2 @@ +--- +- { include: cli.yaml, tags: ['cli'] }
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/tests/integration/targets/os9_command/os9_command/tests/cli/bad_operator b/ansible_collections/dellemc/os9/tests/integration/targets/os9_command/os9_command/tests/cli/bad_operator new file mode 100644 index 000000000..42a164c85 --- /dev/null +++ b/ansible_collections/dellemc/os9/tests/integration/targets/os9_command/os9_command/tests/cli/bad_operator @@ -0,0 +1,20 @@ +--- +- debug: msg="START cli/bad_operator.yaml" + +- name: test bad operator + os9_command: + commands: + - show version + - show interfaces TenGigabitEthernet 0/0 + wait_for: + - "result[0] contains 'Description : blah'" + provider: "{{ cli }}" + register: result + ignore_errors: yes + +- assert: + that: + - "result.failed == true" + - "result.msg is defined" + +- debug: msg="END cli/bad_operator.yaml" diff --git a/ansible_collections/dellemc/os9/tests/integration/targets/os9_command/os9_command/tests/cli/contains b/ansible_collections/dellemc/os9/tests/integration/targets/os9_command/os9_command/tests/cli/contains new file mode 100644 index 000000000..2f56a11f9 --- /dev/null +++ b/ansible_collections/dellemc/os9/tests/integration/targets/os9_command/os9_command/tests/cli/contains @@ -0,0 +1,20 @@ +--- +- debug: msg="START cli/contains.yaml" + +- name: test contains operator + os9_command: + commands: + - show version + - show interface TenGigabitEthernet 0/0 + wait_for: + - "result[0] contains 2.0" + - "result[1] contains TenGigabitEthernet " + provider: "{{ cli }}" + register: result + +- assert: + that: + - "result.changed == false" + - "result.stdout is defined" + +- debug: msg="END cli/contains.yaml" diff --git a/ansible_collections/dellemc/os9/tests/integration/targets/os9_command/os9_command/tests/cli/invalid b/ansible_collections/dellemc/os9/tests/integration/targets/os9_command/os9_command/tests/cli/invalid new file mode 100644 index 000000000..cffc24f81 --- /dev/null +++ b/ansible_collections/dellemc/os9/tests/integration/targets/os9_command/os9_command/tests/cli/invalid @@ -0,0 +1,28 @@ +--- +- debug: msg="START cli/invalid.yaml" + +- name: run invalid command + os9_command: + commands: ['show foo'] + provider: "{{ cli }}" + register: result + ignore_errors: yes + +- assert: + that: + - "result.failed" + +- name: run commands that include invalid command + os9_command: + commands: + - show version + - show foo + provider: "{{ cli }}" + register: result + ignore_errors: yes + +- assert: + that: + - "result.failed" + +- debug: msg="END cli/invalid.yaml" diff --git a/ansible_collections/dellemc/os9/tests/integration/targets/os9_command/os9_command/tests/cli/output b/ansible_collections/dellemc/os9/tests/integration/targets/os9_command/os9_command/tests/cli/output new file mode 100644 index 000000000..1fd537880 --- /dev/null +++ b/ansible_collections/dellemc/os9/tests/integration/targets/os9_command/os9_command/tests/cli/output @@ -0,0 +1,29 @@ +--- +- debug: msg="START cli/output.yaml" + +- name: get output for single command + os9_command: + commands: ['show version'] + provider: "{{ cli }}" + register: result + +- assert: + that: + - "result.changed == false" + - "result.stdout is defined" + +- name: get output for multiple commands + os9_command: + commands: + - show version + - show interfaces + provider: "{{ cli }}" + register: result + +- assert: + that: + - "result.changed == false" + - "result.stdout is defined" + - "result.stdout | length == 2" + +- debug: msg="END cli/output.yaml" diff --git a/ansible_collections/dellemc/os9/tests/integration/targets/os9_command/os9_command/tests/cli/show_commands.yaml b/ansible_collections/dellemc/os9/tests/integration/targets/os9_command/os9_command/tests/cli/show_commands.yaml new file mode 100644 index 000000000..80d19518e --- /dev/null +++ b/ansible_collections/dellemc/os9/tests/integration/targets/os9_command/os9_command/tests/cli/show_commands.yaml @@ -0,0 +1,74 @@ +--- +- debug: msg="START cli/show_commands.yaml" + +- name: test bad operator + os9_command: + commands: + - show version + - show interfaces TenGigabitEthernet 0/0 + wait_for: + - "result[0] contains 'Description : blah'" + provider: "{{ cli }}" + register: result + ignore_errors: yes + +- assert: + that: + - "result.failed == true" + - "result.msg is defined" + +- name: get output for single command + os9_command: + commands: ['show version'] + provider: "{{ cli }}" + register: result + +- assert: + that: + - "result.changed == false" + - "result.stdout is defined" + +- name: get output for multiple commands + os9_command: + commands: + - show version + - show interfaces + provider: "{{ cli }}" + register: result + +- assert: + that: + - "result.changed == false" + - "result.stdout is defined" + - "result.stdout | length == 2" + +- name: show run command with grep Option + os9_command: + commands: + - show run | grep username + provider: "{{ cli }}" + register: result + +- assert: + that: + - "result.stdout | length == 1" + +- name: Execute multiple show commands continously + os9_command: + commands: + - show system + - show file-systems + - show startup-config + - show tech-support + - show logging + - show system brief | grep Management + provider: "{{ cli }}" + retries: 8 + interval: 5 + register: result + +- assert: + that: + - "result.stdout | length == 6" + +- debug: msg="END cli/show_commands.yaml" diff --git a/ansible_collections/dellemc/os9/tests/integration/targets/os9_command/os9_command/tests/cli/timeout b/ansible_collections/dellemc/os9/tests/integration/targets/os9_command/os9_command/tests/cli/timeout new file mode 100644 index 000000000..60dbb761f --- /dev/null +++ b/ansible_collections/dellemc/os9/tests/integration/targets/os9_command/os9_command/tests/cli/timeout @@ -0,0 +1,19 @@ +--- +- debug: msg="START cli/timeout.yaml" + +- name: test bad condition + os9_command: + commands: + - show version + wait_for: + - "result[0] contains bad_value_string" + provider: "{{ cli }}" + register: result + ignore_errors: yes + +- assert: + that: + - "result.failed == true" + - "result.msg is defined" + +- debug: msg="END cli/timeout.yaml" diff --git a/ansible_collections/dellemc/os9/tests/integration/targets/os9_config/os9_config/defaults/main.yaml b/ansible_collections/dellemc/os9/tests/integration/targets/os9_config/os9_config/defaults/main.yaml new file mode 100644 index 000000000..5f709c5aa --- /dev/null +++ b/ansible_collections/dellemc/os9/tests/integration/targets/os9_config/os9_config/defaults/main.yaml @@ -0,0 +1,2 @@ +--- +testcase: "*" diff --git a/ansible_collections/dellemc/os9/tests/integration/targets/os9_config/os9_config/tasks/cli.yaml b/ansible_collections/dellemc/os9/tests/integration/targets/os9_config/os9_config/tasks/cli.yaml new file mode 100644 index 000000000..346bdf2d1 --- /dev/null +++ b/ansible_collections/dellemc/os9/tests/integration/targets/os9_config/os9_config/tasks/cli.yaml @@ -0,0 +1,13 @@ +--- +- name: collect all cli test cases + find: + paths: "{{ role_path }}/tests/cli" + patterns: "{{ testcase }}.yaml" + register: test_cases + +- name: set test_items + set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}" + +- name: run test case + include: "{{ item }}" + with_items: "{{ test_items }}" diff --git a/ansible_collections/dellemc/os9/tests/integration/targets/os9_config/os9_config/tasks/main.yaml b/ansible_collections/dellemc/os9/tests/integration/targets/os9_config/os9_config/tasks/main.yaml new file mode 100644 index 000000000..415c99d8b --- /dev/null +++ b/ansible_collections/dellemc/os9/tests/integration/targets/os9_config/os9_config/tasks/main.yaml @@ -0,0 +1,2 @@ +--- +- { include: cli.yaml, tags: ['cli'] } diff --git a/ansible_collections/dellemc/os9/tests/integration/targets/os9_config/os9_config/tests/cli/configcommands.yaml b/ansible_collections/dellemc/os9/tests/integration/targets/os9_config/os9_config/tests/cli/configcommands.yaml new file mode 100644 index 000000000..d737a4909 --- /dev/null +++ b/ansible_collections/dellemc/os9/tests/integration/targets/os9_config/os9_config/tests/cli/configcommands.yaml @@ -0,0 +1,134 @@ +--- +- debug: msg="START cli/config command execution" + +- name: COnfigure managemnet protocol telnet + os9_config: + lines: ['hostname {{ inventory_hostname }}', 'ip telnet server enable'] + provider: "{{ cli }}" + register: result + +- assert: + that: + - "result.changed == true" + +- name: Create new username and set password + os9_config: + lines: ['username test password test123'] + provider: "{{ cli }}" + register: result + +- name: Update the new user test privilige using replace line Option + os9_config: + lines: + - username test password test123 privilege 15 + provider: "{{ cli }}" + replace: line + save: no + register: result + +- name: Validate the newly created username using show run command use the keyword wait_for + os9_command: + commands: + - show running-config | grep username + - show running-config | grep username | grep test + wait_for: + - "result[0] contains test" + provider: "{{ cli }}" + +- name: Configure SNMP v2 credentials on device and enable traps + os9_config: + lines: + - snmp-server community ansibleread ro + - snmp-server community ansiblewrite rw + - snmp-server enable traps + - snmp-server host 10.16.148.142 traps version 2c public udp-port 162 + provider: "{{ cli }}" + register: result + +- assert: + that: + - "result.changed == true" + +- name: Validate is newly created snmp v2 is available in running config + os9_command: + commands: + - show running-config | grep snmp-server + wait_for: + - "result[0] contains ansibleread" + - "result[0] contains ansiblewrite" + provider: "{{ cli }}" + register: result + +- name: Configure Clock timezone + os9_config: + lines: "clock timezone UTC 0 0" + provider: "{{ cli }}" + register: result + +- name: Configure Logging to NMS Server + os9_config: + lines: + - logging 10.16.148.142 + #before: + # - no logging 10.16.148.142 + #ignore: yes + provider: "{{ cli }}" + register: result + +- name: Configure Default Gateway + os9_config: + lines: + - management route 0.0.0.0/0 10.16.148.254 + provider: "{{ cli }}" + register: result + + #- assert: + # that: + # - "result.changed == true" + #- "'management route 0.0.0.0/0 10.16.148.254' in result.updates" + +- name: Enable spanning tree protocol using parent , before and after keywords in config module + os9_config: + lines: + - no disable + - hello-time 1 + - max-age 6 + - forward-delay 4 + - bridge-priority 0 + parents: ['protocol spanning-tree rstp'] + before: ['no protocol spanning-tree rstp'] + after: ['exit'] + provider: "{{ cli }}" + register: result + +- name: save the running config into startup config using save keyword in os9 config module + os9_config: + save: yes + provider: "{{ cli }}" + register: result + +- name: Validate the newly added commands are available in startup-config + os9_command: + commands: + - show startup-config + provider: "{{ cli }}" + register: result + +- name: COnfigure new vlan using src file given as input and backup the configuration + os9_config: + src: vlan_config.txt + provider: "{{ cli }}" + update: merge + backup: yes + register: result + + +- name: Validate the check Option for update in Dell os9 config using the config file provided with config option + os9_config: + src: vlan_config.txt + provider: "{{ cli }}" + update: check + config: Aggregation1_config.2016-09-06@15:26:02 + register: result + +- debug: msg="END cli/configcommands" diff --git a/ansible_collections/dellemc/os9/tests/integration/targets/os9_config/os9_config/tests/cli/toplevel.yaml b/ansible_collections/dellemc/os9/tests/integration/targets/os9_config/os9_config/tests/cli/toplevel.yaml new file mode 100644 index 000000000..65df0afa1 --- /dev/null +++ b/ansible_collections/dellemc/os9/tests/integration/targets/os9_config/os9_config/tests/cli/toplevel.yaml @@ -0,0 +1,37 @@ +--- +- debug: msg="START cli/toplevel.yaml" + +- name: setup + os9_config: + lines: ['hostname {{ inventory_hostname }}'] + provider: "{{ cli }}" + match: none + +- name: configure top level command + os9_config: + lines: ['hostname foo'] + provider: "{{ cli }}" + register: result + +- assert: + that: + - "result.changed == true" + - "'hostname foo' in result.updates" + +- name: configure top level command idempotent check + os9_config: + lines: ['hostname foo'] + provider: "{{ cli }}" + register: result + +- assert: + that: + - "result.changed == false" + +- name: teardown + os9_config: + lines: ['hostname {{ inventory_hostname }}'] + provider: "{{ cli }}" + match: none + +- debug: msg="END cli/toplevel.yaml" diff --git a/ansible_collections/dellemc/os9/tests/integration/targets/os9_config/os9_config/tests/cli/vlan_config.txt b/ansible_collections/dellemc/os9/tests/integration/targets/os9_config/os9_config/tests/cli/vlan_config.txt new file mode 100644 index 000000000..894052832 --- /dev/null +++ b/ansible_collections/dellemc/os9/tests/integration/targets/os9_config/os9_config/tests/cli/vlan_config.txt @@ -0,0 +1,9 @@ +interface Vlan 1000 + description "vlan added from ansible" + name Testansible-1000 + ip unreachables + ip helper-address 100.1.1.1 + ip udp-helper udp-port 1000 + no shutdown +~ + diff --git a/ansible_collections/dellemc/os9/tests/integration/targets/os9_facts/os9_facts/defaults/main.yaml b/ansible_collections/dellemc/os9/tests/integration/targets/os9_facts/os9_facts/defaults/main.yaml new file mode 100644 index 000000000..5f709c5aa --- /dev/null +++ b/ansible_collections/dellemc/os9/tests/integration/targets/os9_facts/os9_facts/defaults/main.yaml @@ -0,0 +1,2 @@ +--- +testcase: "*" diff --git a/ansible_collections/dellemc/os9/tests/integration/targets/os9_facts/os9_facts/tasks/cli.yaml b/ansible_collections/dellemc/os9/tests/integration/targets/os9_facts/os9_facts/tasks/cli.yaml new file mode 100644 index 000000000..346bdf2d1 --- /dev/null +++ b/ansible_collections/dellemc/os9/tests/integration/targets/os9_facts/os9_facts/tasks/cli.yaml @@ -0,0 +1,13 @@ +--- +- name: collect all cli test cases + find: + paths: "{{ role_path }}/tests/cli" + patterns: "{{ testcase }}.yaml" + register: test_cases + +- name: set test_items + set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}" + +- name: run test case + include: "{{ item }}" + with_items: "{{ test_items }}" diff --git a/ansible_collections/dellemc/os9/tests/integration/targets/os9_facts/os9_facts/tasks/main.yaml b/ansible_collections/dellemc/os9/tests/integration/targets/os9_facts/os9_facts/tasks/main.yaml new file mode 100644 index 000000000..415c99d8b --- /dev/null +++ b/ansible_collections/dellemc/os9/tests/integration/targets/os9_facts/os9_facts/tasks/main.yaml @@ -0,0 +1,2 @@ +--- +- { include: cli.yaml, tags: ['cli'] } diff --git a/ansible_collections/dellemc/os9/tests/integration/targets/os9_facts/os9_facts/tests/cli/testcases_facts.yaml b/ansible_collections/dellemc/os9/tests/integration/targets/os9_facts/os9_facts/tests/cli/testcases_facts.yaml new file mode 100644 index 000000000..9315f3445 --- /dev/null +++ b/ansible_collections/dellemc/os9/tests/integration/targets/os9_facts/os9_facts/tests/cli/testcases_facts.yaml @@ -0,0 +1,55 @@ +--- +- debug: msg="START cli/testcases_facts.yaml" + +- name: Get all the interfaces facts + os9_facts: + gather_subset: + - interfaces + provider: "{{ cli }}" + register: result + +- assert: + that: + - "result.changed == false" + - "result.ansible_facts is defined" + - "result.ansible_facts.ansible_net_all_ipv4_addresses is defined" + - "result.ansible_facts.ansible_net_interfaces is defined" + - "result.ansible_facts.ansible_net_neighbors is defined" + +- name: Get all the facts Excpet Interfaces using ! Operator and validate + os9_facts: + gather_subset: + - "!interfaces" + provider: "{{ cli }}" + register: result + +- assert: + that: + - "result.changed == false" + - "result.ansible_facts is defined" + - "result.ansible_facts.ansible_net_all_ipv4_addresses is not defined" + - "result.ansible_facts.ansible_net_interfaces is not defined" + - "result.ansible_facts.ansible_net_neighbors is not defined" + - "result.ansible_facts.ansible_net_config is defined" + - "result.ansible_facts.ansible_net_filesystems is defined" + +- name: Test with multiple subsets provided + os9_facts: + gather_subset: + - config + - hardware + provider: "{{ cli }}" + register: result + +- assert: + that: + - "result.changed == false" + - "result.ansible_facts is defined" + - "result.ansible_facts.ansible_net_filesystems is defined" + - "result.ansible_facts.ansible_net_memtotal_mb is defined" + - "result.ansible_facts.ansible_net_memfree_mb is defined" + - "result.ansible_facts.ansible_net_config is defined" + + + +- debug: msg="START cli/testcases_facts.yaml" diff --git a/ansible_collections/dellemc/os9/tests/sanity/ignore-2.10.txt b/ansible_collections/dellemc/os9/tests/sanity/ignore-2.10.txt new file mode 100644 index 000000000..57ab8ae6d --- /dev/null +++ b/ansible_collections/dellemc/os9/tests/sanity/ignore-2.10.txt @@ -0,0 +1,4 @@ +plugins/action/os9.py action-plugin-docs +plugins/modules/os9_config.py validate-modules:parameter-list-no-elements +plugins/modules/os9_facts.py validate-modules:parameter-list-no-elements +plugins/modules/os9_command.py validate-modules:parameter-list-no-elements
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/tests/sanity/ignore-2.11.txt b/ansible_collections/dellemc/os9/tests/sanity/ignore-2.11.txt new file mode 100644 index 000000000..57ab8ae6d --- /dev/null +++ b/ansible_collections/dellemc/os9/tests/sanity/ignore-2.11.txt @@ -0,0 +1,4 @@ +plugins/action/os9.py action-plugin-docs +plugins/modules/os9_config.py validate-modules:parameter-list-no-elements +plugins/modules/os9_facts.py validate-modules:parameter-list-no-elements +plugins/modules/os9_command.py validate-modules:parameter-list-no-elements
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/tests/sanity/ignore-2.9.txt b/ansible_collections/dellemc/os9/tests/sanity/ignore-2.9.txt new file mode 100644 index 000000000..711efc62e --- /dev/null +++ b/ansible_collections/dellemc/os9/tests/sanity/ignore-2.9.txt @@ -0,0 +1 @@ +plugins/action/os9.py action-plugin-docs
\ No newline at end of file diff --git a/ansible_collections/dellemc/os9/tests/sanity/requirements.txt b/ansible_collections/dellemc/os9/tests/sanity/requirements.txt new file mode 100644 index 000000000..3e3a96692 --- /dev/null +++ b/ansible_collections/dellemc/os9/tests/sanity/requirements.txt @@ -0,0 +1,4 @@ +packaging # needed for update-bundled and changelog +sphinx ; python_version >= '3.5' # docs build requires python 3+ +sphinx-notfound-page ; python_version >= '3.5' # docs build requires python 3+ +straight.plugin ; python_version >= '3.5' # needed for hacking/build-ansible.py which will host changelog generation and requires python 3+ diff --git a/ansible_collections/dellemc/os9/tests/unit/modules/network/os9/__init__.py b/ansible_collections/dellemc/os9/tests/unit/modules/network/os9/__init__.py new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/ansible_collections/dellemc/os9/tests/unit/modules/network/os9/__init__.py diff --git a/ansible_collections/dellemc/os9/tests/unit/modules/network/os9/fixtures/os9_config_config.cfg b/ansible_collections/dellemc/os9/tests/unit/modules/network/os9/fixtures/os9_config_config.cfg new file mode 100644 index 000000000..b8f62da5e --- /dev/null +++ b/ansible_collections/dellemc/os9/tests/unit/modules/network/os9/fixtures/os9_config_config.cfg @@ -0,0 +1,13 @@ +! +hostname router +! +interface fortyGigE 1/6 + ip address 1.2.3.4/24 + description test string +! +interface fortyGigE 1/7 + ip address 6.7.8.9/24 + description test string + shutdown +! + diff --git a/ansible_collections/dellemc/os9/tests/unit/modules/network/os9/fixtures/os9_config_src.cfg b/ansible_collections/dellemc/os9/tests/unit/modules/network/os9/fixtures/os9_config_src.cfg new file mode 100644 index 000000000..7ab333875 --- /dev/null +++ b/ansible_collections/dellemc/os9/tests/unit/modules/network/os9/fixtures/os9_config_src.cfg @@ -0,0 +1,12 @@ +! +hostname foo +! +interface fortyGigE 1/6 + no ip address +! +interface fortyGigE 1/7 + ip address 6.7.8.9/24 + description test string + shutdown +! + diff --git a/ansible_collections/dellemc/os9/tests/unit/modules/network/os9/fixtures/show_file-systems b/ansible_collections/dellemc/os9/tests/unit/modules/network/os9/fixtures/show_file-systems new file mode 100644 index 000000000..1c02bb6a9 --- /dev/null +++ b/ansible_collections/dellemc/os9/tests/unit/modules/network/os9/fixtures/show_file-systems @@ -0,0 +1,10 @@ + Size(b) Free(b) Feature Type Flags Prefixes + 6429872128 5582319616 FAT32 USERFLASH rw flash: + - - unformatted USERFLASH rw fcmfs: + 241172480 91893760 Unknown NFSMOUNT rw nfsmount: + - - - network rw ftp: + - - - network rw tftp: + - - - network rw scp: + - - - network rw http: + - - - network rw https: + diff --git a/ansible_collections/dellemc/os9/tests/unit/modules/network/os9/fixtures/show_interfaces b/ansible_collections/dellemc/os9/tests/unit/modules/network/os9/fixtures/show_interfaces new file mode 100644 index 000000000..5f19f38bd --- /dev/null +++ b/ansible_collections/dellemc/os9/tests/unit/modules/network/os9/fixtures/show_interfaces @@ -0,0 +1,1259 @@ +TenGigabitEthernet 0/0 is down, line protocol is down +Hardware is DellEth, address is 90:b1:1c:f4:a2:8f + Current address is 90:b1:1c:f4:a2:8f +Pluggable media not present +Interface index is 1048580 +Internet address is not set +Mode of IPv4 Address Assignment : NONE +DHCP Client-ID :90b11cf4a28f +MTU 1554 bytes, IP MTU 1500 bytes +LineSpeed 10000 Mbit +Flowcontrol rx off tx off +ARP type: ARPA, ARP Timeout 04:00:00 +Last clearing of "show interface" counters 13:13:21 +Queueing strategy: fifo +Input Statistics: + 0 packets, 0 bytes + 0 64-byte pkts, 0 over 64-byte pkts, 0 over 127-byte pkts + 0 over 255-byte pkts, 0 over 511-byte pkts, 0 over 1023-byte pkts + 0 Multicasts, 0 Broadcasts, 0 Unicasts + 0 runts, 0 giants, 0 throttles + 0 CRC, 0 overrun, 0 discarded +Output Statistics: + 0 packets, 0 bytes, 0 underruns + 0 64-byte pkts, 0 over 64-byte pkts, 0 over 127-byte pkts + 0 over 255-byte pkts, 0 over 511-byte pkts, 0 over 1023-byte pkts + 0 Multicasts, 0 Broadcasts, 0 Unicasts + 0 throttles, 0 discarded, 0 collisions, 0 wreddrops +Rate info (interval 299 seconds): + Input 00.00 Mbits/sec, 0 packets/sec, 0.00% of line-rate + Output 00.00 Mbits/sec, 0 packets/sec, 0.00% of line-rate +Time since last interface status change: 13:16:47 + + +TenGigabitEthernet 0/1 is down, line protocol is down +Hardware is DellEth, address is 90:b1:1c:f4:a2:8f + Current address is 90:b1:1c:f4:a2:8f +Pluggable media not present +Interface index is 1048708 +Internet address is not set +Mode of IPv4 Address Assignment : NONE +DHCP Client-ID :90b11cf4a28f +MTU 1554 bytes, IP MTU 1500 bytes +LineSpeed 10000 Mbit +Flowcontrol rx off tx off +ARP type: ARPA, ARP Timeout 04:00:00 +Last clearing of "show interface" counters 13:17:48 +Queueing strategy: fifo +Input Statistics: + 0 packets, 0 bytes + 0 64-byte pkts, 0 over 64-byte pkts, 0 over 127-byte pkts + 0 over 255-byte pkts, 0 over 511-byte pkts, 0 over 1023-byte pkts + 0 Multicasts, 0 Broadcasts, 0 Unicasts + 0 runts, 0 giants, 0 throttles + 0 CRC, 0 overrun, 0 discarded +Output Statistics: + 0 packets, 0 bytes, 0 underruns + 0 64-byte pkts, 0 over 64-byte pkts, 0 over 127-byte pkts + 0 over 255-byte pkts, 0 over 511-byte pkts, 0 over 1023-byte pkts + 0 Multicasts, 0 Broadcasts, 0 Unicasts + 0 throttles, 0 discarded, 0 collisions, 0 wreddrops +Rate info (interval 299 seconds): + Input 00.00 Mbits/sec, 0 packets/sec, 0.00% of line-rate + Output 00.00 Mbits/sec, 0 packets/sec, 0.00% of line-rate +Time since last interface status change: 13:16:49 + + +TenGigabitEthernet 0/2 is down, line protocol is down +Hardware is DellEth, address is 90:b1:1c:f4:a2:8f + Current address is 90:b1:1c:f4:a2:8f +Pluggable media not present +Interface index is 1048836 +Internet address is not set +Mode of IPv4 Address Assignment : NONE +DHCP Client-ID :90b11cf4a28f +MTU 1554 bytes, IP MTU 1500 bytes +LineSpeed 10000 Mbit +Flowcontrol rx off tx off +ARP type: ARPA, ARP Timeout 04:00:00 +Last clearing of "show interface" counters 13:18:30 +Queueing strategy: fifo +Input Statistics: + 0 packets, 0 bytes + 0 64-byte pkts, 0 over 64-byte pkts, 0 over 127-byte pkts + 0 over 255-byte pkts, 0 over 511-byte pkts, 0 over 1023-byte pkts + 0 Multicasts, 0 Broadcasts, 0 Unicasts + 0 runts, 0 giants, 0 throttles + 0 CRC, 0 overrun, 0 discarded +Output Statistics: + 0 packets, 0 bytes, 0 underruns + 0 64-byte pkts, 0 over 64-byte pkts, 0 over 127-byte pkts + 0 over 255-byte pkts, 0 over 511-byte pkts, 0 over 1023-byte pkts + 0 Multicasts, 0 Broadcasts, 0 Unicasts + 0 throttles, 0 discarded, 0 collisions, 0 wreddrops +Rate info (interval 299 seconds): + Input 00.00 Mbits/sec, 0 packets/sec, 0.00% of line-rate + Output 00.00 Mbits/sec, 0 packets/sec, 0.00% of line-rate +Time since last interface status change: 13:17:31 + + +TenGigabitEthernet 0/3 is down, line protocol is down +Hardware is DellEth, address is 90:b1:1c:f4:a2:8f + Current address is 90:b1:1c:f4:a2:8f +Pluggable media not present +Interface index is 1048964 +Internet address is not set +Mode of IPv4 Address Assignment : NONE +DHCP Client-ID :90b11cf4a28f +MTU 1554 bytes, IP MTU 1500 bytes +LineSpeed 10000 Mbit +Flowcontrol rx off tx off +ARP type: ARPA, ARP Timeout 04:00:00 +Last clearing of "show interface" counters 13:18:33 +Queueing strategy: fifo +Input Statistics: + 0 packets, 0 bytes + 0 64-byte pkts, 0 over 64-byte pkts, 0 over 127-byte pkts + 0 over 255-byte pkts, 0 over 511-byte pkts, 0 over 1023-byte pkts + 0 Multicasts, 0 Broadcasts, 0 Unicasts + 0 runts, 0 giants, 0 throttles + 0 CRC, 0 overrun, 0 discarded +Output Statistics: + 0 packets, 0 bytes, 0 underruns + 0 64-byte pkts, 0 over 64-byte pkts, 0 over 127-byte pkts + 0 over 255-byte pkts, 0 over 511-byte pkts, 0 over 1023-byte pkts + 0 Multicasts, 0 Broadcasts, 0 Unicasts + 0 throttles, 0 discarded, 0 collisions, 0 wreddrops +Rate info (interval 299 seconds): + Input 00.00 Mbits/sec, 0 packets/sec, 0.00% of line-rate + Output 00.00 Mbits/sec, 0 packets/sec, 0.00% of line-rate +Time since last interface status change: 13:17:35 + + +fortyGigE 0/4 is down, line protocol is down +Hardware is DellEth, address is 90:b1:1c:f4:a2:8f + Current address is 90:b1:1c:f4:a2:8f +Pluggable media not present +Interface index is 1049093 +Internet address is not set +Mode of IPv4 Address Assignment : NONE +DHCP Client-ID :90b11cf4a28f +MTU 1554 bytes, IP MTU 1500 bytes +LineSpeed 40000 Mbit +Flowcontrol rx off tx off +ARP type: ARPA, ARP Timeout 04:00:00 +Last clearing of "show interface" counters 13:38:08 +Queueing strategy: fifo +Input Statistics: + 0 packets, 0 bytes + 0 64-byte pkts, 0 over 64-byte pkts, 0 over 127-byte pkts + 0 over 255-byte pkts, 0 over 511-byte pkts, 0 over 1023-byte pkts + 0 Multicasts, 0 Broadcasts, 0 Unicasts + 0 runts, 0 giants, 0 throttles + 0 CRC, 0 overrun, 0 discarded +Output Statistics: + 0 packets, 0 bytes, 0 underruns + 0 64-byte pkts, 0 over 64-byte pkts, 0 over 127-byte pkts + 0 over 255-byte pkts, 0 over 511-byte pkts, 0 over 1023-byte pkts + 0 Multicasts, 0 Broadcasts, 0 Unicasts + 0 throttles, 0 discarded, 0 collisions, 0 wreddrops +Rate info (interval 299 seconds): + Input 00.00 Mbits/sec, 0 packets/sec, 0.00% of line-rate + Output 00.00 Mbits/sec, 0 packets/sec, 0.00% of line-rate +Time since last interface status change: 13:37:09 + + +fortyGigE 0/8 is down, line protocol is down +Hardware is DellEth, address is 90:b1:1c:f4:a2:8f + Current address is 90:b1:1c:f4:a2:8f +Pluggable media not present +Interface index is 1049605 +Internet address is not set +Mode of IPv4 Address Assignment : NONE +DHCP Client-ID :90b11cf4a28f +MTU 1554 bytes, IP MTU 1500 bytes +LineSpeed 40000 Mbit +Flowcontrol rx off tx off +ARP type: ARPA, ARP Timeout 04:00:00 +Last clearing of "show interface" counters 13:38:08 +Queueing strategy: fifo +Input Statistics: + 0 packets, 0 bytes + 0 64-byte pkts, 0 over 64-byte pkts, 0 over 127-byte pkts + 0 over 255-byte pkts, 0 over 511-byte pkts, 0 over 1023-byte pkts + 0 Multicasts, 0 Broadcasts, 0 Unicasts + 0 runts, 0 giants, 0 throttles + 0 CRC, 0 overrun, 0 discarded +Output Statistics: + 0 packets, 0 bytes, 0 underruns + 0 64-byte pkts, 0 over 64-byte pkts, 0 over 127-byte pkts + 0 over 255-byte pkts, 0 over 511-byte pkts, 0 over 1023-byte pkts + 0 Multicasts, 0 Broadcasts, 0 Unicasts + 0 throttles, 0 discarded, 0 collisions, 0 wreddrops +Rate info (interval 299 seconds): + Input 00.00 Mbits/sec, 0 packets/sec, 0.00% of line-rate + Output 00.00 Mbits/sec, 0 packets/sec, 0.00% of line-rate +Time since last interface status change: 13:40:18 + + +fortyGigE 0/12 is down, line protocol is down +Hardware is DellEth, address is 90:b1:1c:f4:a2:8f + Current address is 90:b1:1c:f4:a2:8f +Pluggable media not present +Interface index is 1050117 +Internet address is not set +Mode of IPv4 Address Assignment : NONE +DHCP Client-ID :90b11cf4a28f +MTU 1554 bytes, IP MTU 1500 bytes +LineSpeed 40000 Mbit +Flowcontrol rx off tx off +ARP type: ARPA, ARP Timeout 04:00:00 +Last clearing of "show interface" counters 13:41:18 +Queueing strategy: fifo +Input Statistics: + 0 packets, 0 bytes + 0 64-byte pkts, 0 over 64-byte pkts, 0 over 127-byte pkts + 0 over 255-byte pkts, 0 over 511-byte pkts, 0 over 1023-byte pkts + 0 Multicasts, 0 Broadcasts, 0 Unicasts + 0 runts, 0 giants, 0 throttles + 0 CRC, 0 overrun, 0 discarded +Output Statistics: + 0 packets, 0 bytes, 0 underruns + 0 64-byte pkts, 0 over 64-byte pkts, 0 over 127-byte pkts + 0 over 255-byte pkts, 0 over 511-byte pkts, 0 over 1023-byte pkts + 0 Multicasts, 0 Broadcasts, 0 Unicasts + 0 throttles, 0 discarded, 0 collisions, 0 wreddrops +Rate info (interval 299 seconds): + Input 00.00 Mbits/sec, 0 packets/sec, 0.00% of line-rate + Output 00.00 Mbits/sec, 0 packets/sec, 0.00% of line-rate +Time since last interface status change: 13:40:20 + + +fortyGigE 0/16 is down, line protocol is down +Hardware is DellEth, address is 90:b1:1c:f4:a2:8f + Current address is 90:b1:1c:f4:a2:8f +Pluggable media not present +Interface index is 1050629 +Internet address is not set +Mode of IPv4 Address Assignment : NONE +DHCP Client-ID :90b11cf4a28f +MTU 1554 bytes, IP MTU 1500 bytes +LineSpeed 40000 Mbit +Flowcontrol rx off tx off +ARP type: ARPA, ARP Timeout 04:00:00 +Last clearing of "show interface" counters 13:42:41 +Queueing strategy: fifo +Input Statistics: + 0 packets, 0 bytes + 0 64-byte pkts, 0 over 64-byte pkts, 0 over 127-byte pkts + 0 over 255-byte pkts, 0 over 511-byte pkts, 0 over 1023-byte pkts + 0 Multicasts, 0 Broadcasts, 0 Unicasts + 0 runts, 0 giants, 0 throttles + 0 CRC, 0 overrun, 0 discarded +Output Statistics: + 0 packets, 0 bytes, 0 underruns + 0 64-byte pkts, 0 over 64-byte pkts, 0 over 127-byte pkts + 0 over 255-byte pkts, 0 over 511-byte pkts, 0 over 1023-byte pkts + 0 Multicasts, 0 Broadcasts, 0 Unicasts + 0 throttles, 0 discarded, 0 collisions, 0 wreddrops +Rate info (interval 299 seconds): + Input 00.00 Mbits/sec, 0 packets/sec, 0.00% of line-rate + Output 00.00 Mbits/sec, 0 packets/sec, 0.00% of line-rate +Time since last interface status change: 13:41:43 + + +fortyGigE 0/20 is down, line protocol is down +Hardware is DellEth, address is 90:b1:1c:f4:a2:8f + Current address is 90:b1:1c:f4:a2:8f +Pluggable media not present +Interface index is 1051141 +Internet address is not set +Mode of IPv4 Address Assignment : NONE +DHCP Client-ID :90b11cf4a28f +MTU 1554 bytes, IP MTU 1500 bytes +LineSpeed 40000 Mbit +Flowcontrol rx off tx off +ARP type: ARPA, ARP Timeout 04:00:00 +Last clearing of "show interface" counters 13:43:10 +Queueing strategy: fifo +Input Statistics: + 0 packets, 0 bytes + 0 64-byte pkts, 0 over 64-byte pkts, 0 over 127-byte pkts + 0 over 255-byte pkts, 0 over 511-byte pkts, 0 over 1023-byte pkts + 0 Multicasts, 0 Broadcasts, 0 Unicasts + 0 runts, 0 giants, 0 throttles + 0 CRC, 0 overrun, 0 discarded +Output Statistics: + 0 packets, 0 bytes, 0 underruns + 0 64-byte pkts, 0 over 64-byte pkts, 0 over 127-byte pkts + 0 over 255-byte pkts, 0 over 511-byte pkts, 0 over 1023-byte pkts + 0 Multicasts, 0 Broadcasts, 0 Unicasts + 0 throttles, 0 discarded, 0 collisions, 0 wreddrops +Rate info (interval 299 seconds): + Input 00.00 Mbits/sec, 0 packets/sec, 0.00% of line-rate + Output 00.00 Mbits/sec, 0 packets/sec, 0.00% of line-rate +Time since last interface status change: 13:42:12 + + +fortyGigE 0/24 is down, line protocol is down +Hardware is DellEth, address is 90:b1:1c:f4:a2:8f + Current address is 90:b1:1c:f4:a2:8f +Pluggable media not present +Interface index is 1051653 +Internet address is not set +Mode of IPv4 Address Assignment : NONE +DHCP Client-ID :90b11cf4a28f +MTU 1554 bytes, IP MTU 1500 bytes +LineSpeed 40000 Mbit +Flowcontrol rx off tx off +ARP type: ARPA, ARP Timeout 04:00:00 +Last clearing of "show interface" counters 13:43:45 +Queueing strategy: fifo +Input Statistics: + 0 packets, 0 bytes + 0 64-byte pkts, 0 over 64-byte pkts, 0 over 127-byte pkts + 0 over 255-byte pkts, 0 over 511-byte pkts, 0 over 1023-byte pkts + 0 Multicasts, 0 Broadcasts, 0 Unicasts + 0 runts, 0 giants, 0 throttles + 0 CRC, 0 overrun, 0 discarded +Output Statistics: + 0 packets, 0 bytes, 0 underruns + 0 64-byte pkts, 0 over 64-byte pkts, 0 over 127-byte pkts + 0 over 255-byte pkts, 0 over 511-byte pkts, 0 over 1023-byte pkts + 0 Multicasts, 0 Broadcasts, 0 Unicasts + 0 throttles, 0 discarded, 0 collisions, 0 wreddrops +Rate info (interval 299 seconds): + Input 00.00 Mbits/sec, 0 packets/sec, 0.00% of line-rate + Output 00.00 Mbits/sec, 0 packets/sec, 0.00% of line-rate +Time since last interface status change: 13:42:47 + + +fortyGigE 0/28 is down, line protocol is down +Hardware is DellEth, address is 90:b1:1c:f4:a2:8f + Current address is 90:b1:1c:f4:a2:8f +Pluggable media not present +Interface index is 1052165 +Internet address is not set +Mode of IPv4 Address Assignment : NONE +DHCP Client-ID :90b11cf4a28f +MTU 1554 bytes, IP MTU 1500 bytes +LineSpeed 40000 Mbit +Flowcontrol rx off tx off +ARP type: ARPA, ARP Timeout 04:00:00 +Last clearing of "show interface" counters 13:44:35 +Queueing strategy: fifo +Input Statistics: + 0 packets, 0 bytes + 0 64-byte pkts, 0 over 64-byte pkts, 0 over 127-byte pkts + 0 over 255-byte pkts, 0 over 511-byte pkts, 0 over 1023-byte pkts + 0 Multicasts, 0 Broadcasts, 0 Unicasts + 0 runts, 0 giants, 0 throttles + 0 CRC, 0 overrun, 0 discarded +Output Statistics: + 0 packets, 0 bytes, 0 underruns + 0 64-byte pkts, 0 over 64-byte pkts, 0 over 127-byte pkts + 0 over 255-byte pkts, 0 over 511-byte pkts, 0 over 1023-byte pkts + 0 Multicasts, 0 Broadcasts, 0 Unicasts + 0 throttles, 0 discarded, 0 collisions, 0 wreddrops +Rate info (interval 299 seconds): + Input 00.00 Mbits/sec, 0 packets/sec, 0.00% of line-rate + Output 00.00 Mbits/sec, 0 packets/sec, 0.00% of line-rate +Time since last interface status change: 13:43:37 + + +fortyGigE 0/32 is down, line protocol is down +Hardware is DellEth, address is 90:b1:1c:f4:a2:8f + Current address is 90:b1:1c:f4:a2:8f +Pluggable media not present +Interface index is 1052677 +Internet address is not set +Mode of IPv4 Address Assignment : NONE +DHCP Client-ID :90b11cf4a28f +MTU 1554 bytes, IP MTU 1500 bytes +LineSpeed 40000 Mbit +Flowcontrol rx off tx off +ARP type: ARPA, ARP Timeout 04:00:00 +Last clearing of "show interface" counters 13:44:53 +Queueing strategy: fifo +Input Statistics: + 0 packets, 0 bytes + 0 64-byte pkts, 0 over 64-byte pkts, 0 over 127-byte pkts + 0 over 255-byte pkts, 0 over 511-byte pkts, 0 over 1023-byte pkts + 0 Multicasts, 0 Broadcasts, 0 Unicasts + 0 runts, 0 giants, 0 throttles + 0 CRC, 0 overrun, 0 discarded +Output Statistics: + 0 packets, 0 bytes, 0 underruns + 0 64-byte pkts, 0 over 64-byte pkts, 0 over 127-byte pkts + 0 over 255-byte pkts, 0 over 511-byte pkts, 0 over 1023-byte pkts + 0 Multicasts, 0 Broadcasts, 0 Unicasts + 0 throttles, 0 discarded, 0 collisions, 0 wreddrops +Rate info (interval 299 seconds): + Input 00.00 Mbits/sec, 0 packets/sec, 0.00% of line-rate + Output 00.00 Mbits/sec, 0 packets/sec, 0.00% of line-rate +Time since last interface status change: 13:43:54 + + +fortyGigE 0/36 is down, line protocol is down +Hardware is DellEth, address is 90:b1:1c:f4:a2:8f + Current address is 90:b1:1c:f4:a2:8f +Pluggable media not present +Interface index is 1053189 +Internet address is not set +Mode of IPv4 Address Assignment : NONE +DHCP Client-ID :90b11cf4a28f +MTU 1554 bytes, IP MTU 1500 bytes +LineSpeed 40000 Mbit +Flowcontrol rx off tx off +ARP type: ARPA, ARP Timeout 04:00:00 +Last clearing of "show interface" counters 13:46:20 +Queueing strategy: fifo +Input Statistics: + 0 packets, 0 bytes + 0 64-byte pkts, 0 over 64-byte pkts, 0 over 127-byte pkts + 0 over 255-byte pkts, 0 over 511-byte pkts, 0 over 1023-byte pkts + 0 Multicasts, 0 Broadcasts, 0 Unicasts + 0 runts, 0 giants, 0 throttles + 0 CRC, 0 overrun, 0 discarded +Output Statistics: + 0 packets, 0 bytes, 0 underruns + 0 64-byte pkts, 0 over 64-byte pkts, 0 over 127-byte pkts + 0 over 255-byte pkts, 0 over 511-byte pkts, 0 over 1023-byte pkts + 0 Multicasts, 0 Broadcasts, 0 Unicasts + 0 throttles, 0 discarded, 0 collisions, 0 wreddrops +Rate info (interval 299 seconds): + Input 00.00 Mbits/sec, 0 packets/sec, 0.00% of line-rate + Output 00.00 Mbits/sec, 0 packets/sec, 0.00% of line-rate +Time since last interface status change: 13:45:21 + + +fortyGigE 0/40 is down, line protocol is down +Hardware is DellEth, address is 90:b1:1c:f4:a2:8f + Current address is 90:b1:1c:f4:a2:8f +Pluggable media not present +Interface index is 1053701 +Internet address is not set +Mode of IPv4 Address Assignment : NONE +DHCP Client-ID :90b11cf4a28f +MTU 1554 bytes, IP MTU 1500 bytes +LineSpeed 40000 Mbit +Flowcontrol rx off tx off +ARP type: ARPA, ARP Timeout 04:00:00 +Last clearing of "show interface" counters 13:46:32 +Queueing strategy: fifo +Input Statistics: + 0 packets, 0 bytes + 0 64-byte pkts, 0 over 64-byte pkts, 0 over 127-byte pkts + 0 over 255-byte pkts, 0 over 511-byte pkts, 0 over 1023-byte pkts + 0 Multicasts, 0 Broadcasts, 0 Unicasts + 0 runts, 0 giants, 0 throttles + 0 CRC, 0 overrun, 0 discarded +Output Statistics: + 0 packets, 0 bytes, 0 underruns + 0 64-byte pkts, 0 over 64-byte pkts, 0 over 127-byte pkts + 0 over 255-byte pkts, 0 over 511-byte pkts, 0 over 1023-byte pkts + 0 Multicasts, 0 Broadcasts, 0 Unicasts + 0 throttles, 0 discarded, 0 collisions, 0 wreddrops +Rate info (interval 299 seconds): + Input 00.00 Mbits/sec, 0 packets/sec, 0.00% of line-rate + Output 00.00 Mbits/sec, 0 packets/sec, 0.00% of line-rate +Time since last interface status change: 13:45:33 + + +fortyGigE 0/44 is down, line protocol is down +Hardware is DellEth, address is 90:b1:1c:f4:a2:8f + Current address is 90:b1:1c:f4:a2:8f +Pluggable media not present +Interface index is 1054213 +Internet address is not set +Mode of IPv4 Address Assignment : NONE +DHCP Client-ID :90b11cf4a28f +MTU 1554 bytes, IP MTU 1500 bytes +LineSpeed 40000 Mbit +Flowcontrol rx off tx off +ARP type: ARPA, ARP Timeout 04:00:00 +Last clearing of "show interface" counters 13:46:56 +Queueing strategy: fifo +Input Statistics: + 0 packets, 0 bytes + 0 64-byte pkts, 0 over 64-byte pkts, 0 over 127-byte pkts + 0 over 255-byte pkts, 0 over 511-byte pkts, 0 over 1023-byte pkts + 0 Multicasts, 0 Broadcasts, 0 Unicasts + 0 runts, 0 giants, 0 throttles + 0 CRC, 0 overrun, 0 discarded +Output Statistics: + 0 packets, 0 bytes, 0 underruns + 0 64-byte pkts, 0 over 64-byte pkts, 0 over 127-byte pkts + 0 over 255-byte pkts, 0 over 511-byte pkts, 0 over 1023-byte pkts + 0 Multicasts, 0 Broadcasts, 0 Unicasts + 0 throttles, 0 discarded, 0 collisions, 0 wreddrops +Rate info (interval 299 seconds): + Input 00.00 Mbits/sec, 0 packets/sec, 0.00% of line-rate + Output 00.00 Mbits/sec, 0 packets/sec, 0.00% of line-rate +Time since last interface status change: 13:45:58 + + +fortyGigE 0/48 is down, line protocol is down +Hardware is DellEth, address is 90:b1:1c:f4:a2:8f + Current address is 90:b1:1c:f4:a2:8f +Pluggable media not present +Interface index is 1054725 +Internet address is not set +Mode of IPv4 Address Assignment : NONE +DHCP Client-ID :90b11cf4a28f +MTU 1554 bytes, IP MTU 1500 bytes +LineSpeed 40000 Mbit +Flowcontrol rx off tx off +ARP type: ARPA, ARP Timeout 04:00:00 +Last clearing of "show interface" counters 13:47:10 +Queueing strategy: fifo +Input Statistics: + 0 packets, 0 bytes + 0 64-byte pkts, 0 over 64-byte pkts, 0 over 127-byte pkts + 0 over 255-byte pkts, 0 over 511-byte pkts, 0 over 1023-byte pkts + 0 Multicasts, 0 Broadcasts, 0 Unicasts + 0 runts, 0 giants, 0 throttles + 0 CRC, 0 overrun, 0 discarded +Output Statistics: + 0 packets, 0 bytes, 0 underruns + 0 64-byte pkts, 0 over 64-byte pkts, 0 over 127-byte pkts + 0 over 255-byte pkts, 0 over 511-byte pkts, 0 over 1023-byte pkts + 0 Multicasts, 0 Broadcasts, 0 Unicasts + 0 throttles, 0 discarded, 0 collisions, 0 wreddrops +Rate info (interval 299 seconds): + Input 00.00 Mbits/sec, 0 packets/sec, 0.00% of line-rate + Output 00.00 Mbits/sec, 0 packets/sec, 0.00% of line-rate +Time since last interface status change: 13:46:11 + + +fortyGigE 0/52 is down, line protocol is down +Hardware is DellEth, address is 90:b1:1c:f4:a2:8f + Current address is 90:b1:1c:f4:a2:8f +Pluggable media not present +Interface index is 1055237 +Internet address is not set +Mode of IPv4 Address Assignment : NONE +DHCP Client-ID :90b11cf4a28f +MTU 1554 bytes, IP MTU 1500 bytes +LineSpeed 40000 Mbit +Flowcontrol rx off tx off +ARP type: ARPA, ARP Timeout 04:00:00 +Last clearing of "show interface" counters 13:47:22 +Queueing strategy: fifo +Input Statistics: + 0 packets, 0 bytes + 0 64-byte pkts, 0 over 64-byte pkts, 0 over 127-byte pkts + 0 over 255-byte pkts, 0 over 511-byte pkts, 0 over 1023-byte pkts + 0 Multicasts, 0 Broadcasts, 0 Unicasts + 0 runts, 0 giants, 0 throttles + 0 CRC, 0 overrun, 0 discarded +Output Statistics: + 0 packets, 0 bytes, 0 underruns + 0 64-byte pkts, 0 over 64-byte pkts, 0 over 127-byte pkts + 0 over 255-byte pkts, 0 over 511-byte pkts, 0 over 1023-byte pkts + 0 Multicasts, 0 Broadcasts, 0 Unicasts + 0 throttles, 0 discarded, 0 collisions, 0 wreddrops +Rate info (interval 299 seconds): + Input 00.00 Mbits/sec, 0 packets/sec, 0.00% of line-rate + Output 00.00 Mbits/sec, 0 packets/sec, 0.00% of line-rate +Time since last interface status change: 13:46:24 + + +fortyGigE 0/56 is down, line protocol is down +Hardware is DellEth, address is 90:b1:1c:f4:a2:8f + Current address is 90:b1:1c:f4:a2:8f +Pluggable media not present +Interface index is 1055749 +Internet address is not set +Mode of IPv4 Address Assignment : NONE +DHCP Client-ID :90b11cf4a28f +MTU 1554 bytes, IP MTU 1500 bytes +LineSpeed 40000 Mbit +Flowcontrol rx off tx off +ARP type: ARPA, ARP Timeout 04:00:00 +Last clearing of "show interface" counters 13:47:47 +Queueing strategy: fifo +Input Statistics: + 0 packets, 0 bytes + 0 64-byte pkts, 0 over 64-byte pkts, 0 over 127-byte pkts + 0 over 255-byte pkts, 0 over 511-byte pkts, 0 over 1023-byte pkts + 0 Multicasts, 0 Broadcasts, 0 Unicasts + 0 runts, 0 giants, 0 throttles + 0 CRC, 0 overrun, 0 discarded +Output Statistics: + 0 packets, 0 bytes, 0 underruns + 0 64-byte pkts, 0 over 64-byte pkts, 0 over 127-byte pkts + 0 over 255-byte pkts, 0 over 511-byte pkts, 0 over 1023-byte pkts + 0 Multicasts, 0 Broadcasts, 0 Unicasts + 0 throttles, 0 discarded, 0 collisions, 0 wreddrops +Rate info (interval 299 seconds): + Input 00.00 Mbits/sec, 0 packets/sec, 0.00% of line-rate + Output 00.00 Mbits/sec, 0 packets/sec, 0.00% of line-rate +Time since last interface status change: 13:46:48 + + +fortyGigE 0/60 is down, line protocol is down +Hardware is DellEth, address is 90:b1:1c:f4:a2:8f + Current address is 90:b1:1c:f4:a2:8f +Pluggable media not present +Interface index is 1056261 +Internet address is not set +Mode of IPv4 Address Assignment : NONE +DHCP Client-ID :90b11cf4a28f +MTU 1554 bytes, IP MTU 1500 bytes +LineSpeed 40000 Mbit +Flowcontrol rx off tx off +ARP type: ARPA, ARP Timeout 04:00:00 +Last clearing of "show interface" counters 13:47:58 +Queueing strategy: fifo +Input Statistics: + 0 packets, 0 bytes + 0 64-byte pkts, 0 over 64-byte pkts, 0 over 127-byte pkts + 0 over 255-byte pkts, 0 over 511-byte pkts, 0 over 1023-byte pkts + 0 Multicasts, 0 Broadcasts, 0 Unicasts + 0 runts, 0 giants, 0 throttles + 0 CRC, 0 overrun, 0 discarded +Output Statistics: + 0 packets, 0 bytes, 0 underruns + 0 64-byte pkts, 0 over 64-byte pkts, 0 over 127-byte pkts + 0 over 255-byte pkts, 0 over 511-byte pkts, 0 over 1023-byte pkts + 0 Multicasts, 0 Broadcasts, 0 Unicasts + 0 throttles, 0 discarded, 0 collisions, 0 wreddrops +Rate info (interval 299 seconds): + Input 00.00 Mbits/sec, 0 packets/sec, 0.00% of line-rate + Output 00.00 Mbits/sec, 0 packets/sec, 0.00% of line-rate +Time since last interface status change: 13:47:00 + + +fortyGigE 0/64 is down, line protocol is down +Hardware is DellEth, address is 90:b1:1c:f4:a2:8f + Current address is 90:b1:1c:f4:a2:8f +Pluggable media not present +Interface index is 1056773 +Internet address is not set +Mode of IPv4 Address Assignment : NONE +DHCP Client-ID :90b11cf4a28f +MTU 1554 bytes, IP MTU 1500 bytes +LineSpeed 40000 Mbit +Flowcontrol rx off tx off +ARP type: ARPA, ARP Timeout 04:00:00 +Last clearing of "show interface" counters 13:48:26 +Queueing strategy: fifo +Input Statistics: + 0 packets, 0 bytes + 0 64-byte pkts, 0 over 64-byte pkts, 0 over 127-byte pkts + 0 over 255-byte pkts, 0 over 511-byte pkts, 0 over 1023-byte pkts + 0 Multicasts, 0 Broadcasts, 0 Unicasts + 0 runts, 0 giants, 0 throttles + 0 CRC, 0 overrun, 0 discarded +Output Statistics: + 0 packets, 0 bytes, 0 underruns + 0 64-byte pkts, 0 over 64-byte pkts, 0 over 127-byte pkts + 0 over 255-byte pkts, 0 over 511-byte pkts, 0 over 1023-byte pkts + 0 Multicasts, 0 Broadcasts, 0 Unicasts + 0 throttles, 0 discarded, 0 collisions, 0 wreddrops +Rate info (interval 299 seconds): + Input 00.00 Mbits/sec, 0 packets/sec, 0.00% of line-rate + Output 00.00 Mbits/sec, 0 packets/sec, 0.00% of line-rate +Time since last interface status change: 13:47:28 + + +fortyGigE 0/68 is down, line protocol is down +Hardware is DellEth, address is 90:b1:1c:f4:a2:8f + Current address is 90:b1:1c:f4:a2:8f +Pluggable media not present +Interface index is 1057285 +Internet address is not set +Mode of IPv4 Address Assignment : NONE +DHCP Client-ID :90b11cf4a28f +MTU 1554 bytes, IP MTU 1500 bytes +LineSpeed 40000 Mbit +Flowcontrol rx off tx off +ARP type: ARPA, ARP Timeout 04:00:00 +Last clearing of "show interface" counters 13:48:38 +Queueing strategy: fifo +Input Statistics: + 0 packets, 0 bytes + 0 64-byte pkts, 0 over 64-byte pkts, 0 over 127-byte pkts + 0 over 255-byte pkts, 0 over 511-byte pkts, 0 over 1023-byte pkts + 0 Multicasts, 0 Broadcasts, 0 Unicasts + 0 runts, 0 giants, 0 throttles + 0 CRC, 0 overrun, 0 discarded +Output Statistics: + 0 packets, 0 bytes, 0 underruns + 0 64-byte pkts, 0 over 64-byte pkts, 0 over 127-byte pkts + 0 over 255-byte pkts, 0 over 511-byte pkts, 0 over 1023-byte pkts + 0 Multicasts, 0 Broadcasts, 0 Unicasts + 0 throttles, 0 discarded, 0 collisions, 0 wreddrops +Rate info (interval 299 seconds): + Input 00.00 Mbits/sec, 0 packets/sec, 0.00% of line-rate + Output 00.00 Mbits/sec, 0 packets/sec, 0.00% of line-rate +Time since last interface status change: 13:47:40 + + +fortyGigE 0/72 is down, line protocol is down +Hardware is DellEth, address is 90:b1:1c:f4:a2:8f + Current address is 90:b1:1c:f4:a2:8f +Pluggable media not present +Interface index is 1057797 +Internet address is not set +Mode of IPv4 Address Assignment : NONE +DHCP Client-ID :90b11cf4a28f +MTU 1554 bytes, IP MTU 1500 bytes +LineSpeed 40000 Mbit +Flowcontrol rx off tx off +ARP type: ARPA, ARP Timeout 04:00:00 +Last clearing of "show interface" counters 13:49:05 +Queueing strategy: fifo +Input Statistics: + 0 packets, 0 bytes + 0 64-byte pkts, 0 over 64-byte pkts, 0 over 127-byte pkts + 0 over 255-byte pkts, 0 over 511-byte pkts, 0 over 1023-byte pkts + 0 Multicasts, 0 Broadcasts, 0 Unicasts + 0 runts, 0 giants, 0 throttles + 0 CRC, 0 overrun, 0 discarded +Output Statistics: + 0 packets, 0 bytes, 0 underruns + 0 64-byte pkts, 0 over 64-byte pkts, 0 over 127-byte pkts + 0 over 255-byte pkts, 0 over 511-byte pkts, 0 over 1023-byte pkts + 0 Multicasts, 0 Broadcasts, 0 Unicasts + 0 throttles, 0 discarded, 0 collisions, 0 wreddrops +Rate info (interval 299 seconds): + Input 00.00 Mbits/sec, 0 packets/sec, 0.00% of line-rate + Output 00.00 Mbits/sec, 0 packets/sec, 0.00% of line-rate +Time since last interface status change: 13:48:07 + + +fortyGigE 0/76 is down, line protocol is down +Hardware is DellEth, address is 90:b1:1c:f4:a2:8f + Current address is 90:b1:1c:f4:a2:8f +Pluggable media not present +Interface index is 1058309 +Internet address is not set +Mode of IPv4 Address Assignment : NONE +DHCP Client-ID :90b11cf4a28f +MTU 1554 bytes, IP MTU 1500 bytes +LineSpeed 40000 Mbit +Flowcontrol rx off tx off +ARP type: ARPA, ARP Timeout 04:00:00 +Last clearing of "show interface" counters 13:49:17 +Queueing strategy: fifo +Input Statistics: + 0 packets, 0 bytes + 0 64-byte pkts, 0 over 64-byte pkts, 0 over 127-byte pkts + 0 over 255-byte pkts, 0 over 511-byte pkts, 0 over 1023-byte pkts + 0 Multicasts, 0 Broadcasts, 0 Unicasts + 0 runts, 0 giants, 0 throttles + 0 CRC, 0 overrun, 0 discarded +Output Statistics: + 0 packets, 0 bytes, 0 underruns + 0 64-byte pkts, 0 over 64-byte pkts, 0 over 127-byte pkts + 0 over 255-byte pkts, 0 over 511-byte pkts, 0 over 1023-byte pkts + 0 Multicasts, 0 Broadcasts, 0 Unicasts + 0 throttles, 0 discarded, 0 collisions, 0 wreddrops +Rate info (interval 299 seconds): + Input 00.00 Mbits/sec, 0 packets/sec, 0.00% of line-rate + Output 00.00 Mbits/sec, 0 packets/sec, 0.00% of line-rate +Time since last interface status change: 13:48:18 + + +fortyGigE 0/80 is down, line protocol is down +Hardware is DellEth, address is 90:b1:1c:f4:a2:8f + Current address is 90:b1:1c:f4:a2:8f +Pluggable media not present +Interface index is 1058821 +Internet address is not set +Mode of IPv4 Address Assignment : NONE +DHCP Client-ID :90b11cf4a28f +MTU 1554 bytes, IP MTU 1500 bytes +LineSpeed 40000 Mbit +Flowcontrol rx off tx off +ARP type: ARPA, ARP Timeout 04:00:00 +Last clearing of "show interface" counters 13:49:36 +Queueing strategy: fifo +Input Statistics: + 0 packets, 0 bytes + 0 64-byte pkts, 0 over 64-byte pkts, 0 over 127-byte pkts + 0 over 255-byte pkts, 0 over 511-byte pkts, 0 over 1023-byte pkts + 0 Multicasts, 0 Broadcasts, 0 Unicasts + 0 runts, 0 giants, 0 throttles + 0 CRC, 0 overrun, 0 discarded +Output Statistics: + 0 packets, 0 bytes, 0 underruns + 0 64-byte pkts, 0 over 64-byte pkts, 0 over 127-byte pkts + 0 over 255-byte pkts, 0 over 511-byte pkts, 0 over 1023-byte pkts + 0 Multicasts, 0 Broadcasts, 0 Unicasts + 0 throttles, 0 discarded, 0 collisions, 0 wreddrops +Rate info (interval 299 seconds): + Input 00.00 Mbits/sec, 0 packets/sec, 0.00% of line-rate + Output 00.00 Mbits/sec, 0 packets/sec, 0.00% of line-rate +Time since last interface status change: 13:48:37 + + +fortyGigE 0/84 is down, line protocol is down +Hardware is DellEth, address is 90:b1:1c:f4:a2:8f + Current address is 90:b1:1c:f4:a2:8f +Pluggable media not present +Interface index is 1059333 +Internet address is not set +Mode of IPv4 Address Assignment : NONE +DHCP Client-ID :90b11cf4a28f +MTU 1554 bytes, IP MTU 1500 bytes +LineSpeed 40000 Mbit +Flowcontrol rx off tx off +ARP type: ARPA, ARP Timeout 04:00:00 +Last clearing of "show interface" counters 13:49:58 +Queueing strategy: fifo +Input Statistics: + 0 packets, 0 bytes + 0 64-byte pkts, 0 over 64-byte pkts, 0 over 127-byte pkts + 0 over 255-byte pkts, 0 over 511-byte pkts, 0 over 1023-byte pkts + 0 Multicasts, 0 Broadcasts, 0 Unicasts + 0 runts, 0 giants, 0 throttles + 0 CRC, 0 overrun, 0 discarded +Output Statistics: + 0 packets, 0 bytes, 0 underruns + 0 64-byte pkts, 0 over 64-byte pkts, 0 over 127-byte pkts + 0 over 255-byte pkts, 0 over 511-byte pkts, 0 over 1023-byte pkts + 0 Multicasts, 0 Broadcasts, 0 Unicasts + 0 throttles, 0 discarded, 0 collisions, 0 wreddrops +Rate info (interval 299 seconds): + Input 00.00 Mbits/sec, 0 packets/sec, 0.00% of line-rate + Output 00.00 Mbits/sec, 0 packets/sec, 0.00% of line-rate +Time since last interface status change: 13:49:00 + + +fortyGigE 0/88 is down, line protocol is down +Hardware is DellEth, address is 90:b1:1c:f4:a2:8f + Current address is 90:b1:1c:f4:a2:8f +Pluggable media not present +Interface index is 1059845 +Internet address is not set +Mode of IPv4 Address Assignment : NONE +DHCP Client-ID :90b11cf4a28f +MTU 1554 bytes, IP MTU 1500 bytes +LineSpeed 40000 Mbit +Flowcontrol rx off tx off +ARP type: ARPA, ARP Timeout 04:00:00 +Last clearing of "show interface" counters 13:50:12 +Queueing strategy: fifo +Input Statistics: + 0 packets, 0 bytes + 0 64-byte pkts, 0 over 64-byte pkts, 0 over 127-byte pkts + 0 over 255-byte pkts, 0 over 511-byte pkts, 0 over 1023-byte pkts + 0 Multicasts, 0 Broadcasts, 0 Unicasts + 0 runts, 0 giants, 0 throttles + 0 CRC, 0 overrun, 0 discarded +Output Statistics: + 0 packets, 0 bytes, 0 underruns + 0 64-byte pkts, 0 over 64-byte pkts, 0 over 127-byte pkts + 0 over 255-byte pkts, 0 over 511-byte pkts, 0 over 1023-byte pkts + 0 Multicasts, 0 Broadcasts, 0 Unicasts + 0 throttles, 0 discarded, 0 collisions, 0 wreddrops +Rate info (interval 299 seconds): + Input 00.00 Mbits/sec, 0 packets/sec, 0.00% of line-rate + Output 00.00 Mbits/sec, 0 packets/sec, 0.00% of line-rate +Time since last interface status change: 13:49:14 + + +fortyGigE 0/92 is down, line protocol is down +Hardware is DellEth, address is 90:b1:1c:f4:a2:8f + Current address is 90:b1:1c:f4:a2:8f +Pluggable media not present +Interface index is 1060357 +Internet address is not set +Mode of IPv4 Address Assignment : NONE +DHCP Client-ID :90b11cf4a28f +MTU 1554 bytes, IP MTU 1500 bytes +LineSpeed 40000 Mbit +Flowcontrol rx off tx off +ARP type: ARPA, ARP Timeout 04:00:00 +Last clearing of "show interface" counters 13:50:36 +Queueing strategy: fifo +Input Statistics: + 0 packets, 0 bytes + 0 64-byte pkts, 0 over 64-byte pkts, 0 over 127-byte pkts + 0 over 255-byte pkts, 0 over 511-byte pkts, 0 over 1023-byte pkts + 0 Multicasts, 0 Broadcasts, 0 Unicasts + 0 runts, 0 giants, 0 throttles + 0 CRC, 0 overrun, 0 discarded +Output Statistics: + 0 packets, 0 bytes, 0 underruns + 0 64-byte pkts, 0 over 64-byte pkts, 0 over 127-byte pkts + 0 over 255-byte pkts, 0 over 511-byte pkts, 0 over 1023-byte pkts + 0 Multicasts, 0 Broadcasts, 0 Unicasts + 0 throttles, 0 discarded, 0 collisions, 0 wreddrops +Rate info (interval 299 seconds): + Input 00.00 Mbits/sec, 0 packets/sec, 0.00% of line-rate + Output 00.00 Mbits/sec, 0 packets/sec, 0.00% of line-rate +Time since last interface status change: 13:49:37 + + +fortyGigE 0/96 is down, line protocol is down +Hardware is DellEth, address is 90:b1:1c:f4:a2:8f + Current address is 90:b1:1c:f4:a2:8f +Pluggable media not present +Interface index is 1060869 +Internet address is not set +Mode of IPv4 Address Assignment : NONE +DHCP Client-ID :90b11cf4a28f +MTU 1554 bytes, IP MTU 1500 bytes +LineSpeed 40000 Mbit +Flowcontrol rx off tx off +ARP type: ARPA, ARP Timeout 04:00:00 +Last clearing of "show interface" counters 13:50:50 +Queueing strategy: fifo +Input Statistics: + 0 packets, 0 bytes + 0 64-byte pkts, 0 over 64-byte pkts, 0 over 127-byte pkts + 0 over 255-byte pkts, 0 over 511-byte pkts, 0 over 1023-byte pkts + 0 Multicasts, 0 Broadcasts, 0 Unicasts + 0 runts, 0 giants, 0 throttles + 0 CRC, 0 overrun, 0 discarded +Output Statistics: + 0 packets, 0 bytes, 0 underruns + 0 64-byte pkts, 0 over 64-byte pkts, 0 over 127-byte pkts + 0 over 255-byte pkts, 0 over 511-byte pkts, 0 over 1023-byte pkts + 0 Multicasts, 0 Broadcasts, 0 Unicasts + 0 throttles, 0 discarded, 0 collisions, 0 wreddrops +Rate info (interval 299 seconds): + Input 00.00 Mbits/sec, 0 packets/sec, 0.00% of line-rate + Output 00.00 Mbits/sec, 0 packets/sec, 0.00% of line-rate +Time since last interface status change: 13:49:52 + + +fortyGigE 0/100 is down, line protocol is down +Hardware is DellEth, address is 90:b1:1c:f4:a2:8f + Current address is 90:b1:1c:f4:a2:8f +Pluggable media not present +Interface index is 1061381 +Internet address is not set +Mode of IPv4 Address Assignment : NONE +DHCP Client-ID :90b11cf4a28f +MTU 1554 bytes, IP MTU 1500 bytes +LineSpeed 40000 Mbit +Flowcontrol rx off tx off +ARP type: ARPA, ARP Timeout 04:00:00 +Last clearing of "show interface" counters 13:51:16 +Queueing strategy: fifo +Input Statistics: + 0 packets, 0 bytes + 0 64-byte pkts, 0 over 64-byte pkts, 0 over 127-byte pkts + 0 over 255-byte pkts, 0 over 511-byte pkts, 0 over 1023-byte pkts + 0 Multicasts, 0 Broadcasts, 0 Unicasts + 0 runts, 0 giants, 0 throttles + 0 CRC, 0 overrun, 0 discarded +Output Statistics: + 0 packets, 0 bytes, 0 underruns + 0 64-byte pkts, 0 over 64-byte pkts, 0 over 127-byte pkts + 0 over 255-byte pkts, 0 over 511-byte pkts, 0 over 1023-byte pkts + 0 Multicasts, 0 Broadcasts, 0 Unicasts + 0 throttles, 0 discarded, 0 collisions, 0 wreddrops +Rate info (interval 299 seconds): + Input 00.00 Mbits/sec, 0 packets/sec, 0.00% of line-rate + Output 00.00 Mbits/sec, 0 packets/sec, 0.00% of line-rate +Time since last interface status change: 13:50:17 + + +fortyGigE 0/104 is down, line protocol is down +Hardware is DellEth, address is 90:b1:1c:f4:a2:8f + Current address is 90:b1:1c:f4:a2:8f +Pluggable media not present +Interface index is 1061893 +Internet address is not set +Mode of IPv4 Address Assignment : NONE +DHCP Client-ID :90b11cf4a28f +MTU 1554 bytes, IP MTU 1500 bytes +LineSpeed 40000 Mbit +Flowcontrol rx off tx off +ARP type: ARPA, ARP Timeout 04:00:00 +Last clearing of "show interface" counters 13:51:26 +Queueing strategy: fifo +Input Statistics: + 0 packets, 0 bytes + 0 64-byte pkts, 0 over 64-byte pkts, 0 over 127-byte pkts + 0 over 255-byte pkts, 0 over 511-byte pkts, 0 over 1023-byte pkts + 0 Multicasts, 0 Broadcasts, 0 Unicasts + 0 runts, 0 giants, 0 throttles + 0 CRC, 0 overrun, 0 discarded +Output Statistics: + 0 packets, 0 bytes, 0 underruns + 0 64-byte pkts, 0 over 64-byte pkts, 0 over 127-byte pkts + 0 over 255-byte pkts, 0 over 511-byte pkts, 0 over 1023-byte pkts + 0 Multicasts, 0 Broadcasts, 0 Unicasts + 0 throttles, 0 discarded, 0 collisions, 0 wreddrops +Rate info (interval 299 seconds): + Input 00.00 Mbits/sec, 0 packets/sec, 0.00% of line-rate + Output 00.00 Mbits/sec, 0 packets/sec, 0.00% of line-rate +Time since last interface status change: 13:50:28 + + +fortyGigE 0/108 is down, line protocol is down +Hardware is DellEth, address is 90:b1:1c:f4:a2:8f + Current address is 90:b1:1c:f4:a2:8f +Pluggable media not present +Interface index is 1062405 +Internet address is not set +Mode of IPv4 Address Assignment : NONE +DHCP Client-ID :90b11cf4a28f +MTU 1554 bytes, IP MTU 1500 bytes +LineSpeed 40000 Mbit +Flowcontrol rx off tx off +ARP type: ARPA, ARP Timeout 04:00:00 +Last clearing of "show interface" counters 13:51:50 +Queueing strategy: fifo +Input Statistics: + 0 packets, 0 bytes + 0 64-byte pkts, 0 over 64-byte pkts, 0 over 127-byte pkts + 0 over 255-byte pkts, 0 over 511-byte pkts, 0 over 1023-byte pkts + 0 Multicasts, 0 Broadcasts, 0 Unicasts + 0 runts, 0 giants, 0 throttles + 0 CRC, 0 overrun, 0 discarded +Output Statistics: + 0 packets, 0 bytes, 0 underruns + 0 64-byte pkts, 0 over 64-byte pkts, 0 over 127-byte pkts + 0 over 255-byte pkts, 0 over 511-byte pkts, 0 over 1023-byte pkts + 0 Multicasts, 0 Broadcasts, 0 Unicasts + 0 throttles, 0 discarded, 0 collisions, 0 wreddrops +Rate info (interval 299 seconds): + Input 00.00 Mbits/sec, 0 packets/sec, 0.00% of line-rate + Output 00.00 Mbits/sec, 0 packets/sec, 0.00% of line-rate +Time since last interface status change: 13:50:52 + + +fortyGigE 0/112 is down, line protocol is down +Hardware is DellEth, address is 90:b1:1c:f4:a2:8f + Current address is 90:b1:1c:f4:a2:8f +Pluggable media not present +Interface index is 1062917 +Internet address is not set +Mode of IPv4 Address Assignment : NONE +DHCP Client-ID :90b11cf4a28f +MTU 1554 bytes, IP MTU 1500 bytes +LineSpeed 40000 Mbit +Flowcontrol rx off tx off +ARP type: ARPA, ARP Timeout 04:00:00 +Last clearing of "show interface" counters 13:52:02 +Queueing strategy: fifo +Input Statistics: + 0 packets, 0 bytes + 0 64-byte pkts, 0 over 64-byte pkts, 0 over 127-byte pkts + 0 over 255-byte pkts, 0 over 511-byte pkts, 0 over 1023-byte pkts + 0 Multicasts, 0 Broadcasts, 0 Unicasts + 0 runts, 0 giants, 0 throttles + 0 CRC, 0 overrun, 0 discarded +Output Statistics: + 0 packets, 0 bytes, 0 underruns + 0 64-byte pkts, 0 over 64-byte pkts, 0 over 127-byte pkts + 0 over 255-byte pkts, 0 over 511-byte pkts, 0 over 1023-byte pkts + 0 Multicasts, 0 Broadcasts, 0 Unicasts + 0 throttles, 0 discarded, 0 collisions, 0 wreddrops +Rate info (interval 299 seconds): + Input 00.00 Mbits/sec, 0 packets/sec, 0.00% of line-rate + Output 00.00 Mbits/sec, 0 packets/sec, 0.00% of line-rate +Time since last interface status change: 13:51:04 + + +fortyGigE 0/116 is down, line protocol is down +Hardware is DellEth, address is 90:b1:1c:f4:a2:8f + Current address is 90:b1:1c:f4:a2:8f +Pluggable media not present +Interface index is 1063429 +Internet address is not set +Mode of IPv4 Address Assignment : NONE +DHCP Client-ID :90b11cf4a28f +MTU 1554 bytes, IP MTU 1500 bytes +LineSpeed 40000 Mbit +Flowcontrol rx off tx off +ARP type: ARPA, ARP Timeout 04:00:00 +Last clearing of "show interface" counters 13:52:14 +Queueing strategy: fifo +Input Statistics: + 0 packets, 0 bytes + 0 64-byte pkts, 0 over 64-byte pkts, 0 over 127-byte pkts + 0 over 255-byte pkts, 0 over 511-byte pkts, 0 over 1023-byte pkts + 0 Multicasts, 0 Broadcasts, 0 Unicasts + 0 runts, 0 giants, 0 throttles + 0 CRC, 0 overrun, 0 discarded +Output Statistics: + 0 packets, 0 bytes, 0 underruns + 0 64-byte pkts, 0 over 64-byte pkts, 0 over 127-byte pkts + 0 over 255-byte pkts, 0 over 511-byte pkts, 0 over 1023-byte pkts + 0 Multicasts, 0 Broadcasts, 0 Unicasts + 0 throttles, 0 discarded, 0 collisions, 0 wreddrops +Rate info (interval 299 seconds): + Input 00.00 Mbits/sec, 0 packets/sec, 0.00% of line-rate + Output 00.00 Mbits/sec, 0 packets/sec, 0.00% of line-rate +Time since last interface status change: 13:51:15 + + +fortyGigE 0/120 is down, line protocol is down +Hardware is DellEth, address is 90:b1:1c:f4:a2:8f + Current address is 90:b1:1c:f4:a2:8f +Pluggable media not present +Interface index is 1063941 +Internet address is not set +Mode of IPv4 Address Assignment : NONE +DHCP Client-ID :90b11cf4a28f +MTU 1554 bytes, IP MTU 1500 bytes +LineSpeed 40000 Mbit +Flowcontrol rx off tx off +ARP type: ARPA, ARP Timeout 04:00:00 +Last clearing of "show interface" counters 13:52:44 +Queueing strategy: fifo +Input Statistics: + 0 packets, 0 bytes + 0 64-byte pkts, 0 over 64-byte pkts, 0 over 127-byte pkts + 0 over 255-byte pkts, 0 over 511-byte pkts, 0 over 1023-byte pkts + 0 Multicasts, 0 Broadcasts, 0 Unicasts + 0 runts, 0 giants, 0 throttles + 0 CRC, 0 overrun, 0 discarded +Output Statistics: + 0 packets, 0 bytes, 0 underruns + 0 64-byte pkts, 0 over 64-byte pkts, 0 over 127-byte pkts + 0 over 255-byte pkts, 0 over 511-byte pkts, 0 over 1023-byte pkts + 0 Multicasts, 0 Broadcasts, 0 Unicasts + 0 throttles, 0 discarded, 0 collisions, 0 wreddrops +Rate info (interval 299 seconds): + Input 00.00 Mbits/sec, 0 packets/sec, 0.00% of line-rate + Output 00.00 Mbits/sec, 0 packets/sec, 0.00% of line-rate +Time since last interface status change: 13:51:45 + + +fortyGigE 0/124 is down, line protocol is down +Hardware is DellEth, address is 90:b1:1c:f4:a2:8f + Current address is 90:b1:1c:f4:a2:8f +Pluggable media not present +Interface index is 1064453 +Internet address is not set +Mode of IPv4 Address Assignment : NONE +DHCP Client-ID :90b11cf4a28f +MTU 1554 bytes, IP MTU 1500 bytes +LineSpeed 40000 Mbit +Flowcontrol rx off tx off +ARP type: ARPA, ARP Timeout 04:00:00 +Last clearing of "show interface" counters 13:52:55 +Queueing strategy: fifo +Input Statistics: + 0 packets, 0 bytes + 0 64-byte pkts, 0 over 64-byte pkts, 0 over 127-byte pkts + 0 over 255-byte pkts, 0 over 511-byte pkts, 0 over 1023-byte pkts + 0 Multicasts, 0 Broadcasts, 0 Unicasts + 0 runts, 0 giants, 0 throttles + 0 CRC, 0 overrun, 0 discarded +Output Statistics: + 0 packets, 0 bytes, 0 underruns + 0 64-byte pkts, 0 over 64-byte pkts, 0 over 127-byte pkts + 0 over 255-byte pkts, 0 over 511-byte pkts, 0 over 1023-byte pkts + 0 Multicasts, 0 Broadcasts, 0 Unicasts + 0 throttles, 0 discarded, 0 collisions, 0 wreddrops +Rate info (interval 299 seconds): + Input 00.00 Mbits/sec, 0 packets/sec, 0.00% of line-rate + Output 00.00 Mbits/sec, 0 packets/sec, 0.00% of line-rate +Time since last interface status change: 13:51:56 + + +ManagementEthernet 0/0 is up, line protocol is up +Hardware is DellEth, address is 90:b1:1c:f4:a2:8f + Current address is 90:b1:1c:f4:a2:8f +Pluggable media not present +Interface index is 7340033 +Internet address is 10.16.148.71/16 +Mode of IPv4 Address Assignment : MANUAL +DHCP Client-ID(61): 90b11cf4a28f +Virtual-IP is not set +Virtual-IP IPv6 address is not set +MTU 1554 bytes, IP MTU 1500 bytes +LineSpeed 1000 Mbit, Mode full duplex +ARP type: ARPA, ARP Timeout 04:00:00 +Last clearing of "show interface" counters 13:52:17 +Queueing strategy: fifo + Input 111338 packets, 7239813 bytes, 96163 multicast + Received 0 errors, 0 discarded + Output 8316 packets, 1491845 bytes, 0 multicast + Output 0 errors, 0 invalid protocol +Time since last interface status change: 13:52:13 + + +ManagementEthernet 1/0 is up, line protocol is not present +Hardware is DellEth, address is not set +Interface index is 8388609 +Internet address is not set +Mode of IPv4 Address Assignment : NONE +DHCP Client-ID :90b11cf4a28f +MTU 1554 bytes, IP MTU 1500 bytes +LineSpeed auto, Mode full duplex +ARP type: ARPA, ARP Timeout 04:00:00 +Queueing strategy: fifo +Time since last interface status change: 13:52:33 + + +ManagementEthernet 2/0 is up, line protocol is not present +Hardware is DellEth, address is not set +Interface index is 9437185 +Internet address is not set +Mode of IPv4 Address Assignment : NONE +DHCP Client-ID :90b11cf4a28f +MTU 1554 bytes, IP MTU 1500 bytes +LineSpeed auto, Mode full duplex +ARP type: ARPA, ARP Timeout 04:00:00 +Queueing strategy: fifo +Time since last interface status change: 13:52:33 + + +ManagementEthernet 3/0 is up, line protocol is not present +Hardware is DellEth, address is not set +Interface index is 10485761 +Internet address is not set +Mode of IPv4 Address Assignment : NONE +DHCP Client-ID :90b11cf4a28f +MTU 1554 bytes, IP MTU 1500 bytes +LineSpeed auto, Mode full duplex +ARP type: ARPA, ARP Timeout 04:00:00 +Queueing strategy: fifo +Time since last interface status change: 13:52:43 + + +ManagementEthernet 4/0 is up, line protocol is not present +Hardware is DellEth, address is not set +Interface index is 11534337 +Internet address is not set +Mode of IPv4 Address Assignment : NONE +DHCP Client-ID :90b11cf4a28f +MTU 1554 bytes, IP MTU 1500 bytes +LineSpeed auto, Mode full duplex +ARP type: ARPA, ARP Timeout 04:00:00 +Queueing strategy: fifo +Time since last interface status change: 13:52:43 + + +ManagementEthernet 5/0 is up, line protocol is not present +Hardware is DellEth, address is not set +Interface index is 12582913 +Internet address is not set +Mode of IPv4 Address Assignment : NONE +DHCP Client-ID :90b11cf4a28f +MTU 1554 bytes, IP MTU 1500 bytes +LineSpeed auto, Mode full duplex +ARP type: ARPA, ARP Timeout 04:00:00 +Queueing strategy: fifo +Time since last interface status change: 13:52:53 + + +Vlan 1 is down, line protocol is down +Address is 90:b1:1c:f4:a2:8f, Current address is 90:b1:1c:f4:a2:8f +Interface index is 1275068928 +Internet address is not set +Mode of IPv4 Address Assignment : NONE +DHCP Client-ID :90b11cf4a28f +MTU 1554 bytes, IP MTU 1500 bytes +LineSpeed auto +ARP type: ARPA, ARP Timeout 04:00:00 +Last clearing of "show interface" counters 13:53:06 +Queueing strategy: fifo +Time since last interface status change: 13:53:06 +Input Statistics: + 0 packets, 0 bytes +Output Statistics: + 0 packets, 0 bytes + diff --git a/ansible_collections/dellemc/os9/tests/unit/modules/network/os9/fixtures/show_inventory b/ansible_collections/dellemc/os9/tests/unit/modules/network/os9/fixtures/show_inventory new file mode 100644 index 000000000..90c0295e5 --- /dev/null +++ b/ansible_collections/dellemc/os9/tests/unit/modules/network/os9/fixtures/show_inventory @@ -0,0 +1,19 @@ +System Type : S6000 +System Mode : 1.0 +Software Version : 9.12(0.0) + +Unit Type Serial Number Part Number Rev Piece Part ID Rev Svc Tag Exprs Svc Code +-------------------------------------------------------------------------------------------------------------- +* 0 S6000-01-FE-32T NA 08YWFG A00 CN-08YWFG-28298-3AG-0031 A00 6BJ8VS1 137 581 490 89 + 0 S6000-PWR-AC NA 0T9FNW A00 CN-0T9FNW-28298-3AG-0119 A00 NA NA + 0 S6000-FAN NA 0MGDH8 A00 CN-0MGDH8-28298-3AG-0094 A00 NA NA + 0 S6000-FAN NA 0MGDH8 A00 CN-0MGDH8-28298-3AG-0096 A00 NA NA + 0 S6000-FAN NA 0MGDH8 A00 CN-0MGDH8-28298-3AG-0095 A00 NA NA + + * - Management Unit + + +Software Protocol Configured +-------------------------------------------------------------- + LLDP + diff --git a/ansible_collections/dellemc/os9/tests/unit/modules/network/os9/fixtures/show_ipv6_interface b/ansible_collections/dellemc/os9/tests/unit/modules/network/os9/fixtures/show_ipv6_interface new file mode 100644 index 000000000..0cc43da94 --- /dev/null +++ b/ansible_collections/dellemc/os9/tests/unit/modules/network/os9/fixtures/show_ipv6_interface @@ -0,0 +1,26 @@ +fortyGigE 0/16 is down, line protocol is down + IPV6 is enabled + Link Local address: fe80::92b1:1cff:fef4:a28f + Global Unicast address(es): + 2001:4898:5808:ffa2::5, subnet is 2001:4898:5808:ffa2::4/126 (MANUAL) + Remaining lifetime: infinite + Global Anycast address(es): + Joined Group address(es): + ff02::1 + ff02::2 + ff02::1:ff00:5 + ff02::1:fff4:a28f + IP MTU is 1500 bytes + ND MTU is 0 + ICMP redirects are not sent + DAD is enabled, number of DAD attempts: 3 + ND reachable time is 35780 milliseconds + ND base reachable time is 30000 milliseconds + ND advertised reachable time is 0 milliseconds + ND advertised retransmit interval is 0 milliseconds + ND router advertisements are sent every 198 to 600 seconds + ND router advertisements live for 1800 seconds + ND advertised hop limit is 64 + IPv6 hop limit for originated packets is 64 + IPv6 unicast RPF check is not supported + diff --git a/ansible_collections/dellemc/os9/tests/unit/modules/network/os9/fixtures/show_lldp_neighbors_detail b/ansible_collections/dellemc/os9/tests/unit/modules/network/os9/fixtures/show_lldp_neighbors_detail new file mode 100644 index 000000000..a868571ce --- /dev/null +++ b/ansible_collections/dellemc/os9/tests/unit/modules/network/os9/fixtures/show_lldp_neighbors_detail @@ -0,0 +1,35 @@ +======================================================================== + Local Interface Ma 0/0 has 1 neighbor + Total Frames Out: 1747 + Total Frames In: 10333 + Total Neighbor information Age outs: 0 + Total Multiple Neighbors Detected: 0 + Total Frames Discarded: 0 + Total In Error Frames: 0 + Total Unrecognized TLVs: 0 + Total TLVs Discarded: 0 + Next packet will be sent after 17 seconds + The neighbors are given below: + ----------------------------------------------------------------------- + + Remote Chassis ID Subtype: Mac address (4) + Remote Chassis ID: 90:b1:1c:f4:2f:6d + Remote Port Subtype: Interface name (5) + Remote Port ID: TenGigabitEthernet 0/33 + Remote Port Description: TenGigabitEthernet 0/33 + Local Port ID: ManagementEthernet 0/0 + Locally assigned remote Neighbor Index: 1 + Remote TTL: 20 + Information valid for next 17 seconds + Time since last information change of this neighbor: 14:54:48 + Remote System Name: swlab1-maa-tor-A2 + Remote System Desc: Dell Real Time Operating System Software. Dell + Operating System Version: 2.0. Dell Application Software Version: + 9.11(2.0) Copyright (c) 1999-2017Dell Inc. All Rights Reserved.Build + Time: Tue Apr 25 21:22:59 2017 + Existing System Capabilities: Repeater Bridge Router + Enabled System Capabilities: Repeater Bridge Router + Remote Port Vlan ID: 148 + Port and Protocol Vlan ID: 148, Capability: Supported, Status: Enabled + --------------------------------------------------------------------------- + diff --git a/ansible_collections/dellemc/os9/tests/unit/modules/network/os9/fixtures/show_memory__except_Processor b/ansible_collections/dellemc/os9/tests/unit/modules/network/os9/fixtures/show_memory__except_Processor new file mode 100644 index 000000000..c2f65415e --- /dev/null +++ b/ansible_collections/dellemc/os9/tests/unit/modules/network/os9/fixtures/show_memory__except_Processor @@ -0,0 +1,4 @@ + =========================== + Total(b) Used(b) Free(b) Lowest(b) Largest(b) + 3203911680 3172120 3200739560 3200673304 3200739560 + diff --git a/ansible_collections/dellemc/os9/tests/unit/modules/network/os9/fixtures/show_running-config b/ansible_collections/dellemc/os9/tests/unit/modules/network/os9/fixtures/show_running-config new file mode 100644 index 000000000..4804ebba6 --- /dev/null +++ b/ansible_collections/dellemc/os9/tests/unit/modules/network/os9/fixtures/show_running-config @@ -0,0 +1,238 @@ +Current Configuration ... +! Version 9.12(0.0) +! Last configuration change at Thu Jan 11 06:53:29 2018 by admin +! +! +logging coredump stack-unit 0 +logging coredump stack-unit 1 +logging coredump stack-unit 2 +logging coredump stack-unit 3 +logging coredump stack-unit 4 +logging coredump stack-unit 5 +! +hostname Dell +! +protocol lldp +! +redundancy auto-synchronize full +! +enable password 7 b125455cf679b208e79b910e85789edf +! +username admin password 7 1d28e9f33f99cf5c +! +stack-unit 0 quad-port-profile 0,8,16,24,32,36,40,44,48,52,56,60,64,68,72,76,80,84,88,92,100,108,116,124 +! +stack-unit 0 provision S6000 +! +stack-unit 0 port 0 portmode quad +! +interface TenGigabitEthernet 0/0 + no ip address + shutdown +! +interface TenGigabitEthernet 0/1 + no ip address + shutdown +! +interface TenGigabitEthernet 0/2 + no ip address + shutdown +! +interface TenGigabitEthernet 0/3 + no ip address + shutdown +! +interface fortyGigE 0/4 + no ip address + shutdown +! +interface fortyGigE 0/8 + no ip address + shutdown +! +interface fortyGigE 0/12 + no ip address + shutdown +! +interface fortyGigE 0/16 + no ip address + ipv6 address 2001:4898:5808:ffa2::5/126 + shutdown +! +interface fortyGigE 0/20 + no ip address + switchport + ip access-group ipv6-ssh-only in + shutdown +! +interface fortyGigE 0/24 + no ip address + switchport + mac access-group ssh-only-mac in + mac access-group ssh-only-mac out + shutdown +! +interface fortyGigE 0/28 + no ip address + switchport + mac access-group ssh-only-mac in + mac access-group ssh-only-mac out + shutdown +! +interface fortyGigE 0/32 + no ip address + switchport + ip access-group ipv6-ssh-only out + shutdown +! +interface fortyGigE 0/36 + no ip address + shutdown +! +interface fortyGigE 0/40 + no ip address + shutdown +! +interface fortyGigE 0/44 + no ip address + shutdown +! +interface fortyGigE 0/48 + no ip address + shutdown +! +interface fortyGigE 0/52 + no ip address + shutdown +! +interface fortyGigE 0/56 + no ip address + shutdown +! +interface fortyGigE 0/60 + no ip address + shutdown +! +interface fortyGigE 0/64 + no ip address + shutdown +! +interface fortyGigE 0/68 + no ip address + shutdown +! +interface fortyGigE 0/72 + no ip address + shutdown +! +interface fortyGigE 0/76 + no ip address + shutdown +! +interface fortyGigE 0/80 + no ip address + shutdown +! +interface fortyGigE 0/84 + no ip address + shutdown +! +interface fortyGigE 0/88 + no ip address + shutdown +! +interface fortyGigE 0/92 + no ip address + shutdown +! +interface fortyGigE 0/96 + no ip address + shutdown +! +interface fortyGigE 0/100 + no ip address + shutdown +! +interface fortyGigE 0/104 + no ip address + shutdown +! +interface fortyGigE 0/108 + no ip address + shutdown +! +interface fortyGigE 0/112 + no ip address + shutdown +! +interface fortyGigE 0/116 + no ip address + shutdown +! +interface fortyGigE 0/120 + no ip address + shutdown +! +interface fortyGigE 0/124 + no ip address + shutdown +! +interface ManagementEthernet 0/0 + ip address 10.16.148.71/16 + no shutdown +! +interface ManagementEthernet 1/0 + no shutdown +! +interface ManagementEthernet 2/0 + no shutdown +! +interface ManagementEthernet 3/0 + no shutdown +! +interface ManagementEthernet 4/0 + no shutdown +! +interface ManagementEthernet 5/0 + no shutdown +! +interface Vlan 1 +!untagged fortyGigE 0/20-32 +! +ipv6 access-list ipv6-ssh-only + description ipv6acl + remark 1 ipv6 + seq 10 permit ipv6 2001:4898::/32 any + seq 20 permit tcp any eq 2 2404:f801::/32 + seq 30 permit tcp any 2a01:110::/31 ack + seq 40 permit tcp any any +! +mac access-list extended ssh-only-mac + description macacl + remark 1 mac + seq 5 permit any any count + seq 6 deny any any +! +ip ssh server enable +! +line console 0 +line vty 0 +line vty 1 + access-class ipv6-ssh-only ipv6 +line vty 2 + access-class ipv6-ssh-only ipv6 +line vty 3 + access-class ipv6-ssh-only ipv6 +line vty 4 +line vty 5 +line vty 6 +line vty 7 +line vty 8 +line vty 9 +! +reload-type + boot-type normal-reload + config-scr-download enable +! +end + diff --git a/ansible_collections/dellemc/os9/tests/unit/modules/network/os9/fixtures/show_running-config__grep_hostname b/ansible_collections/dellemc/os9/tests/unit/modules/network/os9/fixtures/show_running-config__grep_hostname new file mode 100644 index 000000000..9a2c181a9 --- /dev/null +++ b/ansible_collections/dellemc/os9/tests/unit/modules/network/os9/fixtures/show_running-config__grep_hostname @@ -0,0 +1 @@ +hostname os9_sw1 diff --git a/ansible_collections/dellemc/os9/tests/unit/modules/network/os9/fixtures/show_version b/ansible_collections/dellemc/os9/tests/unit/modules/network/os9/fixtures/show_version new file mode 100644 index 000000000..e385cf3ef --- /dev/null +++ b/ansible_collections/dellemc/os9/tests/unit/modules/network/os9/fixtures/show_version @@ -0,0 +1,18 @@ +Dell Real Time Operating System Software +Dell Operating System Version: 2.0 +Dell Application Software Version: 9.10(0.1P13) +Copyright (c) 1999-2016 by Dell Inc. All Rights Reserved. +Build Time: Wed Sep 7 23:48:35 2016 +Build Path: /sites/eqx/work/swbuild01_1/build01/E9-10-0/SW/SRC +Dell Networking OS uptime is 12 week(s), 6 day(s), 9 hour(s), 20 minute(s) + +System image file is "system://A" + +System Type: S6000-ON +Control Processor: Intel Centerton with 3 Gbytes (3203911680 bytes) of memory, core(s) 2. + +16G bytes of boot flash memory. + + 1 32-port TE/FG (SI-ON) + 32 Forty GigabitEthernet/IEEE 802.3 interface(s) + diff --git a/ansible_collections/dellemc/os9/tests/unit/modules/network/os9/os9_module.py b/ansible_collections/dellemc/os9/tests/unit/modules/network/os9/os9_module.py new file mode 100644 index 000000000..57ea4e688 --- /dev/null +++ b/ansible_collections/dellemc/os9/tests/unit/modules/network/os9/os9_module.py @@ -0,0 +1,88 @@ +# (c) 2020 Red Hat Inc. +# +# This file is part of Ansible +# +# Ansible is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# Ansible is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Ansible. If not, see <http://www.gnu.org/licenses/>. + +# Make coding more python3-ish +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + +import os +import json + +from units.modules.utils import AnsibleExitJson, AnsibleFailJson, ModuleTestCase + + +fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures') +fixture_data = {} + + +def load_fixture(name): + path = os.path.join(fixture_path, name) + + if path in fixture_data: + return fixture_data[path] + + with open(path) as f: + data = f.read() + + try: + data = json.loads(data) + except Exception: + pass + + fixture_data[path] = data + return data + + +class TestDellos9Module(ModuleTestCase): + + def execute_module(self, failed=False, changed=False, commands=None, sort=True, defaults=False): + + self.load_fixtures(commands) + + if failed: + result = self.failed() + self.assertTrue(result['failed'], result) + else: + result = self.changed(changed) + self.assertEqual(result['changed'], changed, result) + + if commands is not None: + if sort: + self.assertEqual(sorted(commands), sorted(result['updates']), result['updates']) + else: + self.assertEqual(commands, result['updates'], result['updates']) + + return result + + def failed(self): + with self.assertRaises(AnsibleFailJson) as exc: + self.module.main() + + result = exc.exception.args[0] + self.assertTrue(result['failed'], result) + return result + + def changed(self, changed=False): + with self.assertRaises(AnsibleExitJson) as exc: + self.module.main() + + result = exc.exception.args[0] + self.assertEqual(result['changed'], changed, result) + return result + + def load_fixtures(self, commands=None): + pass diff --git a/ansible_collections/dellemc/os9/tests/unit/modules/network/os9/test_os9_command.py b/ansible_collections/dellemc/os9/tests/unit/modules/network/os9/test_os9_command.py new file mode 100644 index 000000000..6353d8f5e --- /dev/null +++ b/ansible_collections/dellemc/os9/tests/unit/modules/network/os9/test_os9_command.py @@ -0,0 +1,108 @@ +# (c) 2020 Red Hat Inc. +# +# This file is part of Ansible +# +# Ansible is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# Ansible is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Ansible. If not, see <http://www.gnu.org/licenses/>. + +# Make coding more python3-ish +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + +import json + +from ansible.compat.tests.mock import patch +from ansible_collections.dellemc.os9.plugins.modules import os9_command +from units.modules.utils import set_module_args +from .os9_module import TestDellos9Module, load_fixture + + +class TestDellos9CommandModule(TestDellos9Module): + + module = os9_command + + def setUp(self): + super(TestDellos9CommandModule, self).setUp() + + self.mock_run_commands = patch('ansible.modules.network.os9.os9_command.run_commands') + self.run_commands = self.mock_run_commands.start() + + def tearDown(self): + super(TestDellos9CommandModule, self).tearDown() + self.mock_run_commands.stop() + + def load_fixtures(self, commands=None): + + def load_from_file(*args, **kwargs): + module, commands = args + output = list() + + for item in commands: + try: + obj = json.loads(item['command']) + command = obj['command'] + except ValueError: + command = item['command'] + filename = str(command).replace(' ', '_') + output.append(load_fixture(filename)) + return output + + self.run_commands.side_effect = load_from_file + + def test_os9_command_simple(self): + set_module_args(dict(commands=['show version'])) + result = self.execute_module() + self.assertEqual(len(result['stdout']), 1) + self.assertTrue(result['stdout'][0].startswith('Dell Real Time')) + + def test_os9_command_multiple(self): + set_module_args(dict(commands=['show version', 'show version'])) + result = self.execute_module() + self.assertEqual(len(result['stdout']), 2) + self.assertTrue(result['stdout'][0].startswith('Dell Real Time')) + + def test_os9_command_wait_for(self): + wait_for = 'result[0] contains "Dell Real"' + set_module_args(dict(commands=['show version'], wait_for=wait_for)) + self.execute_module() + + def test_os9_command_wait_for_fails(self): + wait_for = 'result[0] contains "test string"' + set_module_args(dict(commands=['show version'], wait_for=wait_for)) + self.execute_module(failed=True) + self.assertEqual(self.run_commands.call_count, 10) + + def test_os9_command_retries(self): + wait_for = 'result[0] contains "test string"' + set_module_args(dict(commands=['show version'], wait_for=wait_for, retries=2)) + self.execute_module(failed=True) + self.assertEqual(self.run_commands.call_count, 2) + + def test_os9_command_match_any(self): + wait_for = ['result[0] contains "Dell Real"', + 'result[0] contains "test string"'] + set_module_args(dict(commands=['show version'], wait_for=wait_for, match='any')) + self.execute_module() + + def test_os9_command_match_all(self): + wait_for = ['result[0] contains "Dell Real"', + 'result[0] contains "Operating System"'] + set_module_args(dict(commands=['show version'], wait_for=wait_for, match='all')) + self.execute_module() + + def test_os9_command_match_all_failure(self): + wait_for = ['result[0] contains "Dell Real"', + 'result[0] contains "test string"'] + commands = ['show version', 'show version'] + set_module_args(dict(commands=commands, wait_for=wait_for, match='all')) + self.execute_module(failed=True) diff --git a/ansible_collections/dellemc/os9/tests/unit/modules/network/os9/test_os9_config.py b/ansible_collections/dellemc/os9/tests/unit/modules/network/os9/test_os9_config.py new file mode 100644 index 000000000..8c159eb57 --- /dev/null +++ b/ansible_collections/dellemc/os9/tests/unit/modules/network/os9/test_os9_config.py @@ -0,0 +1,148 @@ +# +# (c) 2020 Red Hat Inc. +# +# This file is part of Ansible +# +# Ansible is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# Ansible is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Ansible. If not, see <http://www.gnu.org/licenses/>. + +# Make coding more python3-ish +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + +from ansible.compat.tests.mock import patch +from ansible_collections.dellemc.os9.plugins.modules import os9_config +from units.modules.utils import set_module_args +from .os9_module import TestDellos9Module, load_fixture + + +class TestDellos9ConfigModule(TestDellos9Module): + + module = os9_config + + def setUp(self): + super(TestDellos9ConfigModule, self).setUp() + + self.mock_get_config = patch('ansible.modules.network.os9.os9_config.get_config') + self.get_config = self.mock_get_config.start() + + self.mock_load_config = patch('ansible.modules.network.os9.os9_config.load_config') + self.load_config = self.mock_load_config.start() + + self.mock_run_commands = patch('ansible.modules.network.os9.os9_config.run_commands') + self.run_commands = self.mock_run_commands.start() + + def tearDown(self): + super(TestDellos9ConfigModule, self).tearDown() + self.mock_get_config.stop() + self.mock_load_config.stop() + self.mock_run_commands.stop() + + def load_fixtures(self, commands=None): + config_file = 'os9_config_config.cfg' + self.get_config.return_value = load_fixture(config_file) + self.load_config.return_value = None + + def test_os9_config_unchanged(self): + src = load_fixture('os9_config_config.cfg') + set_module_args(dict(src=src)) + self.execute_module() + + def test_os9_config_src(self): + src = load_fixture('os9_config_src.cfg') + set_module_args(dict(src=src)) + commands = ['hostname foo', 'interface fortyGigE 1/6', + 'no ip address'] + self.execute_module(changed=True, commands=commands) + + def test_os9_config_backup(self): + set_module_args(dict(backup=True)) + result = self.execute_module() + self.assertIn('__backup__', result) + + def test_os9_config_save(self): + set_module_args(dict(save=True)) + self.execute_module(changed=True) + self.assertEqual(self.run_commands.call_count, 1) + self.assertEqual(self.get_config.call_count, 0) + self.assertEqual(self.load_config.call_count, 0) + args = self.run_commands.call_args[0][1] + self.assertDictContainsSubset({'command': 'copy running-config startup-config'}, args[0]) +# self.assertIn('copy running-config startup-config\r', args) + + def test_os9_config_lines_wo_parents(self): + set_module_args(dict(lines=['hostname foo'])) + commands = ['hostname foo'] + self.execute_module(changed=True, commands=commands) + + def test_os9_config_lines_w_parents(self): + set_module_args(dict(lines=['shutdown'], parents=['interface fortyGigE 1/6'])) + commands = ['interface fortyGigE 1/6', 'shutdown'] + self.execute_module(changed=True, commands=commands) + + def test_os9_config_before(self): + set_module_args(dict(lines=['hostname foo'], before=['snmp-server contact bar'])) + commands = ['snmp-server contact bar', 'hostname foo'] + self.execute_module(changed=True, commands=commands, sort=False) + + def test_os9_config_after(self): + set_module_args(dict(lines=['hostname foo'], after=['snmp-server contact bar'])) + commands = ['hostname foo', 'snmp-server contact bar'] + self.execute_module(changed=True, commands=commands, sort=False) + + def test_os9_config_before_after_no_change(self): + set_module_args(dict(lines=['hostname router'], + before=['snmp-server contact bar'], + after=['snmp-server location chennai'])) + self.execute_module() + + def test_os9_config_config(self): + config = 'hostname localhost' + set_module_args(dict(lines=['hostname router'], config=config)) + commands = ['hostname router'] + self.execute_module(changed=True, commands=commands) + + def test_os9_config_replace_block(self): + lines = ['description test string', 'test string'] + parents = ['interface fortyGigE 1/6'] + set_module_args(dict(lines=lines, replace='block', parents=parents)) + commands = parents + lines + self.execute_module(changed=True, commands=commands) + + def test_os9_config_match_none(self): + lines = ['hostname router'] + set_module_args(dict(lines=lines, match='none')) + self.execute_module(changed=True, commands=lines) + + def test_os9_config_match_none(self): + lines = ['ip address 1.2.3.4/24', 'description test string'] + parents = ['interface fortyGigE 1/6'] + set_module_args(dict(lines=lines, parents=parents, match='none')) + commands = parents + lines + self.execute_module(changed=True, commands=commands, sort=False) + + def test_os9_config_match_strict(self): + lines = ['ip address 1.2.3.4/24', 'description test string', + 'shutdown'] + parents = ['interface fortyGigE 1/6'] + set_module_args(dict(lines=lines, parents=parents, match='strict')) + commands = parents + ['shutdown'] + self.execute_module(changed=True, commands=commands, sort=False) + + def test_os9_config_match_exact(self): + lines = ['ip address 1.2.3.4/24', 'description test string', + 'shutdown'] + parents = ['interface fortyGigE 1/6'] + set_module_args(dict(lines=lines, parents=parents, match='exact')) + commands = parents + lines + self.execute_module(changed=True, commands=commands, sort=False) diff --git a/ansible_collections/dellemc/os9/tests/unit/modules/network/os9/test_os9_facts.py b/ansible_collections/dellemc/os9/tests/unit/modules/network/os9/test_os9_facts.py new file mode 100644 index 000000000..2a563ef12 --- /dev/null +++ b/ansible_collections/dellemc/os9/tests/unit/modules/network/os9/test_os9_facts.py @@ -0,0 +1,106 @@ +# (c) 2020 Red Hat Inc. +# +# This file is part of Ansible +# +# Ansible is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# Ansible is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Ansible. If not, see <http://www.gnu.org/licenses/>. + +# Make coding more python3-ish +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + +import json + +from ansible.compat.tests.mock import patch +from units.modules.utils import set_module_args +from .os9_module import TestDellos9Module, load_fixture +from ansible_collections.dellemc.os9.plugins.modules import os9_facts + + +class TestDellos9Facts(TestDellos9Module): + + module = os9_facts + + def setUp(self): + super(TestDellos9Facts, self).setUp() + + self.mock_run_command = patch( + 'ansible.modules.network.os9.os9_facts.run_commands') + self.run_command = self.mock_run_command.start() + + def tearDown(self): + super(TestDellos9Facts, self).tearDown() + + self.mock_run_command.stop() + + def load_fixtures(self, commands=None): + + def load_from_file(*args, **kwargs): + module, commands = args + output = list() + + for item in commands: + try: + obj = json.loads(item) + command = obj['command'] + except ValueError: + command = item + if '|' in command: + command = str(command).replace('|', '') + filename = str(command).replace(' ', '_') + filename = filename.replace('/', '7') + output.append(load_fixture(filename)) + return output + + self.run_command.side_effect = load_from_file + + def test_os9_facts_gather_subset_default(self): + set_module_args(dict()) + result = self.execute_module() + ansible_facts = result['ansible_facts'] + self.assertIn('hardware', ansible_facts['ansible_net_gather_subset']) + self.assertIn('default', ansible_facts['ansible_net_gather_subset']) + self.assertIn('interfaces', ansible_facts['ansible_net_gather_subset']) + self.assertEquals('os9_sw1', ansible_facts['ansible_net_hostname']) + self.assertIn('fortyGigE 0/24', ansible_facts['ansible_net_interfaces'].keys()) + self.assertEquals(3128820, ansible_facts['ansible_net_memtotal_mb']) + self.assertEquals(3125722, ansible_facts['ansible_net_memfree_mb']) + + def test_os9_facts_gather_subset_config(self): + set_module_args({'gather_subset': 'config'}) + result = self.execute_module() + ansible_facts = result['ansible_facts'] + self.assertIn('default', ansible_facts['ansible_net_gather_subset']) + self.assertIn('config', ansible_facts['ansible_net_gather_subset']) + self.assertEquals('os9_sw1', ansible_facts['ansible_net_hostname']) + self.assertIn('ansible_net_config', ansible_facts) + + def test_os9_facts_gather_subset_hardware(self): + set_module_args({'gather_subset': 'hardware'}) + result = self.execute_module() + ansible_facts = result['ansible_facts'] + self.assertIn('default', ansible_facts['ansible_net_gather_subset']) + self.assertIn('hardware', ansible_facts['ansible_net_gather_subset']) + self.assertEquals(['flash', 'fcmfs', 'nfsmount', 'ftp', 'tftp', 'scp', 'http', 'https'], ansible_facts['ansible_net_filesystems']) + self.assertEquals(3128820, ansible_facts['ansible_net_memtotal_mb']) + self.assertEquals(3125722, ansible_facts['ansible_net_memfree_mb']) + + def test_os9_facts_gather_subset_interfaces(self): + set_module_args({'gather_subset': 'interfaces'}) + result = self.execute_module() + ansible_facts = result['ansible_facts'] + self.assertIn('default', ansible_facts['ansible_net_gather_subset']) + self.assertIn('interfaces', ansible_facts['ansible_net_gather_subset']) + self.assertIn('fortyGigE 0/24', ansible_facts['ansible_net_interfaces'].keys()) + self.assertEquals(['Ma 0/0'], ansible_facts['ansible_net_neighbors'].keys()) + self.assertIn('ansible_net_interfaces', ansible_facts) |