Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NetApp: return lun info for na_ontap_lun_map module #42961

Merged
merged 5 commits into from
Aug 24, 2018

Conversation

njferrant
Copy link
Contributor

SUMMARY

Added return values for the na_ontap_lun_map module. Module will now return useful information about the mapped LUN such as the NAA ID, size, OS type, and state. Also updates documentation.

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

na_ontap_lun_map.py

ANSIBLE VERSION
ansible 2.6.1
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/etc/ansible/library']
  ansible python module location = /usr/lib/python2.7/site-packages/ansible
  executable location = /bin/ansible
  python version = 2.7.5 (default, Aug  2 2016, 04:20:16) [GCC 4.8.5 20150623 (Red Hat 4.8.5-4)]
ADDITIONAL INFORMATION

Output before:

changed: [localhost] => {
    "changed": true,
    "invocation": {
        "module_args": {
            "hostname": "netapp01",
            "https": "True",
            "initiator_group_name": "esxi_hosts",
            "password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
            "path": "/vol/vol01/lun01",
            "state": "present",
            "username": "admin",
            "vserver": "netapp01_san"
        }
    },
}

Output after:

changed: [localhost] => {
    "changed": true,
    "invocation": {
        "module_args": {
            "hostname": "netapp01",
            "https": "True",
            "initiator_group_name": "esxi_hosts",
            "password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
            "path": "/vol/vol01/lun01",
            "state": "present",
            "username": "admin",
            "vserver": "netapp01_san"
        }
    },
    "lun_naa_id": "600a0980383045372f5d4c5a70315474",
    "lun_node": "netapp01b",
    "lun_ostype": "vmware",
    "lun_serial": "80E7/]LZp1Tt",
    "lun_size": "2199023255552",
    "lun_state": "online"
}

return lun details for na_ontap_lun_map.py and added return value documentation
was based off of older core modules. doesn't seem needed anymore.
only returns lun details if state=present. also pre-seeds result dictionary during class init.
@ansibot
Copy link
Contributor

ansibot commented Jul 18, 2018

The test ansible-test sanity --test pylint [explain] failed with 1 error:

lib/ansible/modules/storage/netapp/na_ontap_lun_map.py:145:0: trailing-whitespace Trailing whitespace

The test ansible-test sanity --test pep8 [explain] failed with 1 error:

lib/ansible/modules/storage/netapp/na_ontap_lun_map.py:145:1: W293 blank line contains whitespace

The test ansible-test sanity --test validate-modules [explain] failed with 1 error:

lib/ansible/modules/storage/netapp/na_ontap_lun_map.py:100:16: E313 RETURN is not valid YAML

The test ansible-test sanity --test yamllint [explain] failed with 1 error:

lib/ansible/modules/storage/netapp/na_ontap_lun_map.py:100:16: error RETURN: syntax error: mapping values are not allowed here

click here for bot help

@ansibot
Copy link
Contributor

ansibot commented Jul 18, 2018

@ansibot ansibot added affects_2.7 This issue/PR affects Ansible v2.7 ci_verified Changes made in this PR are causing tests to fail. feature This issue/PR relates to a feature request. module This issue/PR relates to a module. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. needs_triage Needs a first human triage before being processed. netapp new_contributor This PR is the first contribution by a new community member. storage support:community This issue/PR relates to code supported by the Ansible community. labels Jul 18, 2018
@ansibot ansibot removed the ci_verified Changes made in this PR are causing tests to fail. label Jul 18, 2018
@ansibot ansibot added community_review In order to be merged, this PR must follow the community review workflow. and removed needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Jul 18, 2018
@amit0701
Copy link

amit0701 commented Jul 18, 2018

LGTM. Thanks for the help Nick ! shipit

@ansibot ansibot removed the needs_triage Needs a first human triage before being processed. label Jul 18, 2018
@njferrant
Copy link
Contributor Author

bot_status

@ansibot
Copy link
Contributor

ansibot commented Jul 25, 2018

Components

lib/ansible/modules/storage/netapp/na_ontap_lun_map.py
support: community
maintainers: amit0701 carchi8py hulquest lmprice ndswartz schmots1

Metadata

waiting_on: maintainer
changes_requested_by: null
needs_info: False
needs_revision: False
needs_rebase: False
merge_commits: []
too many files or commits: False
mergeable_state: clean
shippable_status: success
maintainer_shipits (module maintainers): 1
community_shipits (namespace maintainers): 0
ansible_shipits (core team members): 0
shipit_actors (maintainers or core team members): amit0701
shipit_actors_other: []
automerge: automerge shipit test failed

click here for bot help

@ansibot ansibot added the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Aug 2, 2018
Copy link
Contributor

@carchi8py carchi8py left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shipit

@ansibot ansibot removed community_review In order to be merged, this PR must follow the community review workflow. stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. labels Aug 23, 2018
@ansibot ansibot added shipit This PR is ready to be merged by Core automerge This PR was automatically merged by ansibot. labels Aug 23, 2018
@gundalow gundalow merged commit 507d6e2 into ansible:devel Aug 24, 2018
@ansible ansible locked and limited conversation to collaborators Jul 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.7 This issue/PR affects Ansible v2.7 automerge This PR was automatically merged by ansibot. feature This issue/PR relates to a feature request. module This issue/PR relates to a module. netapp new_contributor This PR is the first contribution by a new community member. shipit This PR is ready to be merged by Core storage support:community This issue/PR relates to code supported by the Ansible community.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants