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

New module for managing NetApp E-Series iSCSI Interfaces #39877

Merged
merged 2 commits into from
Aug 28, 2018

Conversation

lmprice
Copy link
Contributor

@lmprice lmprice commented May 8, 2018

Define a new module for configuring NetApp E-Series iSCSI interfaces.

SUMMARY

Introduce a new module for managing E-Series iSCSI interfaces. Each E-Series system that supports iSCSI will have between 2 and 6 iSCSI interfaces (channels), that can be configured on each controller.

ISSUE TYPE
  • New Module Pull Request
COMPONENT NAME

netapp_e_iscsi_interface

ANSIBLE VERSION
ansible 2.6.0 (detached HEAD ce8c336d52) last updated 2018/04/18 11:23:03 (GMT -500)
  config file = None
  configured module search path = [u'/home/lorenp/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /home/lorenp/ansible/lib/ansible
  executable location = /home/lorenp/ansible/bin/ansible
  python version = 2.7.12 (default, Dec  4 2017, 14:50:18) [GCC 5.4.0 20160609]
ADDITIONAL INFORMATION
changed: [testhost] => (item=1) => {"changed": true, "enabled": true, "item": 1, "msg": "The interface settings have been updated."}

@ansibot
Copy link
Contributor

ansibot commented May 8, 2018

@ansibot ansibot added core_review In order to be merged, this PR must follow the core review workflow. module This issue/PR relates to a module. needs_triage Needs a first human triage before being processed. new_module This PR includes a new module. new_plugin This PR includes a new plugin. support:community This issue/PR relates to code supported by the Ansible community. support:core This issue/PR relates to code supported by the Ansible Engineering Team. test This PR relates to tests. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed core_review In order to be merged, this PR must follow the core review workflow. labels May 8, 2018
netapp_e_ssid: 1
netapp_e_api_host: 10.113.1.111:8443
netapp_e_api_username: admin
netapp_e_api_password: infiniti
Copy link
Member

Choose a reason for hiding this comment

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

Integration tests should not add anything to the shared integration config.

@ansibot ansibot removed the needs_triage Needs a first human triage before being processed. label May 9, 2018
@lmprice
Copy link
Contributor Author

lmprice commented May 10, 2018

@mattclay That issue should be resolved. Not sure how I can make the request resolved.

@mattclay mattclay dismissed their stale review May 10, 2018 20:22

Review feedback addressed. I have not reviewed the rest of the changes.

@ansibot ansibot added core_review In order to be merged, this PR must follow the core review workflow. and removed needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels May 10, 2018
Copy link
Contributor

@hulquest hulquest left a comment

Choose a reason for hiding this comment

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

Once the question about backward compatibility is answered, this looks good to me.

def interfaces(self):
ifaces = list()
try:
(rc, ifaces) = request(self.url + 'storage-systems/%s/graph/xpath-filter?query=/controller/hostInterfaces'
Copy link
Contributor

Choose a reason for hiding this comment

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

This looks like a newer endpoint. Does the documentation need to have a minimum version of SANtricity OS?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@hulquest We added this back in the WSP 1.3 time-frame (early 2016). While it's probably been in there long enough it doesn't need to be documented (IMO), that does beg the question of how to do so for when it does. I can add a note to the module if that makes sense.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think a brief sentence is worthy. Nothing is worse than trying something only to figure out the target API on the server isn't compatible. We should try to remember to ask this question of all new modules and substantial changes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@hulquest I added a note in the documentation. In the next patch I submit I'll see about adding a more lengthy blurb in the doc_fragments about API requirements, etc.

Copy link
Contributor

Choose a reason for hiding this comment

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

@hulquest @lmprice Is this discussion resolved?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@gundalow Yes, I believe that it has. I added a comment in the notes about what API version is required for this module.

@lmprice lmprice force-pushed the iscsi_interface branch 2 times, most recently from 56b0ebd to fc0965e Compare May 18, 2018 21:17
@ansibot
Copy link
Contributor

ansibot commented May 18, 2018

@ansibot ansibot added the affects_2.6 This issue/PR affects Ansible v2.6 label May 18, 2018
@lmprice
Copy link
Contributor Author

lmprice commented May 22, 2018

@hulquest @amit0701 @schmots1 @carchi8py Can you give me a review on this patch?

@hulquest
Copy link
Contributor

shipit

@ansibot
Copy link
Contributor

ansibot commented May 24, 2018

@ansibot ansibot added shipit This PR is ready to be merged by Core and removed core_review In order to be merged, this PR must follow the core review workflow. labels May 24, 2018
@ansibot ansibot added core_review In order to be merged, this PR must follow the core review workflow. and removed shipit This PR is ready to be merged by Core labels Jun 4, 2018
Copy link
Contributor

@ndswartz ndswartz 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 added shipit This PR is ready to be merged by Core and removed core_review In order to be merged, this PR must follow the core review workflow. labels Jun 4, 2018
@ansibot ansibot added netapp storage needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. shipit This PR is ready to be merged by Core and removed shipit This PR is ready to be merged by Core needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. 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 Jun 12, 2018
@@ -136,7 +136,8 @@ class ModuleDocFragment(object):
required: false
Copy link
Contributor

Choose a reason for hiding this comment

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

Please remove this file from the PR

@@ -1133,7 +1133,6 @@ lib/ansible/modules/storage/netapp/na_cdot_volume.py E322
lib/ansible/modules/storage/netapp/na_cdot_volume.py E324
lib/ansible/modules/storage/netapp/na_cdot_volume.py E325
lib/ansible/modules/storage/netapp/netapp_e_amg.py E322
lib/ansible/modules/storage/netapp/netapp_e_amg.py E325
lib/ansible/modules/storage/netapp/netapp_e_amg_role.py E322
Copy link
Contributor

Choose a reason for hiding this comment

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

Please remove this file from the PR

description:
- The IPv4 address to assign to the interface.
- Should be specified in xx.xx.xx.xx form.
- Mutually exclusive with I(config_method=dhcp)
Copy link
Contributor

Choose a reason for hiding this comment

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

Add code to check for this and do fail_json if needed just after argument_spec

description:
- The subnet mask to utilize for the interface.
- Should be specified in xx.xx.xx.xx form.
- Mutually exclusive with I(config_method=dhcp)
Copy link
Contributor

Choose a reason for hiding this comment

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

Add code to check for this and do fail_json if needed just after argument_spec

description:
- The IPv4 gateway address to utilize for the interface.
- Should be specified in xx.xx.xx.xx form.
- Mutually exclusive with I(config_method=dhcp)
Copy link
Contributor

Choose a reason for hiding this comment

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

Add code to check for this and do fail_json if needed just after argument_spec

config_method:
description:
- The configuration method type to use for this interface.
- dhcp is mutually exclusive with I(address), I(subnet_mask), and I(gateway).
Copy link
Contributor

Choose a reason for hiding this comment

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

Add code to check for this and do fail_json if needed just after argument_spec

def interfaces(self):
ifaces = list()
try:
(rc, ifaces) = request(self.url + 'storage-systems/%s/graph/xpath-filter?query=/controller/hostInterfaces'
Copy link
Contributor

Choose a reason for hiding this comment

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

@hulquest @lmprice Is this discussion resolved?

@ansibot ansibot added needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed shipit This PR is ready to be merged by Core labels Aug 28, 2018
lmprice and others added 2 commits August 28, 2018 08:53
Define a new module for configuring NetApp E-Series iSCSI interfaces.
Restructured integration test to set all iscsi ports to disabled, then
defines the ports either statically or with dhcp, next updates the ports
with the other definition type (static <-> dhcp), and lastly disables
all ports.  Each netapp_eseries_iscsi_interface call is verified with the
array.
@ansibot ansibot removed the needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html label Aug 28, 2018
@lmprice
Copy link
Contributor Author

lmprice commented Aug 28, 2018

@gundalow The issues should be resolved.

@gundalow gundalow merged commit 97157cf into ansible:devel Aug 28, 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.6 This issue/PR affects Ansible v2.6 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. netapp new_module This PR includes a new module. new_plugin This PR includes a new plugin. storage support:community This issue/PR relates to code supported by the Ansible community. support:core This issue/PR relates to code supported by the Ansible Engineering Team. test This PR relates to tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants