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

Update na_ontap_volume.py #56207

Open
wants to merge 1 commit into
base: devel
from

Conversation

@jontnetapp
Copy link

commented May 8, 2019

Specify the valid choices and default for the type parameter

+label: docsite_pr

SUMMARY

Added the specific options available for the "type" field

ISSUE TYPE
  • Docs Pull Request
COMPONENT NAME

na_ontap_volume

ADDITIONAL INFORMATION

Current documentation is not clear which syntax should be used, as "read-write" and "data-protection" are mentioned as the valid options and the Choices field is blank. I'm just filling in the choices field with the options that actually work correctly (after first using "data-protection" instead of "dp" in my playbook and getting errors!)

Update na_ontap_volume.py
<!--- Your description here -->

Specify the valid choices and default for the type parameter

+label: docsite_pr
@ansibot

This comment has been minimized.

@thedoubl3j

This comment has been minimized.

Copy link
Contributor

commented May 9, 2019

@lonico @carchi8py something you guys want to take a look at?

@carchi8py

This comment has been minimized.

Copy link
Contributor

commented May 9, 2019

This is going to be a hard one.
Depending on the version of ONTAP these options are different. The oldest version we support just has 'rw', 'dp', the most common version user are on supports, 'rw', 'dp', 'ls', 'dc'. And i think the latest version removed one of these.
So we'll have to go with String for this.

I'll make an internal story for the team to list which are the valid option for each version of ontap in the documentation.

@thedoubl3j

This comment has been minimized.

Copy link
Contributor

commented May 9, 2019

sounds good @carchi8py

@jontnetapp

This comment has been minimized.

Copy link
Author

commented May 10, 2019

@carchi8py

This comment has been minimized.

Copy link
Contributor

commented May 10, 2019

In the 9.3 documentation, for volume-create zapi, the volume-type variable allows for the following

volume-type |   | string optional | The type of the volume to be created. Possible values:

  • "rw" - read-write volume (default setting),
  • "ls" - load-sharing volume,
  • "dp" - data-protection volume,
  • "dc" - data-cache volume (FlexCache)

In 9.5 it might be only RW, and DP, but we need to support 9.1 to the latest version.

@@ -78,7 +78,9 @@
type:
description:
- The volume type, either read-write (RW) or data-protection (DP).
choices: ['rw', 'dp']

This comment has been minimized.

Copy link
@lonico

lonico May 15, 2019

Contributor

As @carchi8py pointed out, the ZAPI documentation shows 4 possible values:

  • 'rw' - read-write volume (default),
  • 'ls' - load-sharing volume,
  • 'dp' - data-protection volume,
  • 'dc' - data-cache volume (FlexCache)

(this is from SDK documentation for 9.5)
even though the CLI allows only 2 values.

I'll check with the product team why there is such an inconsistency.

This is also why I am always conflicted with choices. On one hand, this is a great way to help the end users. On the other hand, we need to support all possible choices for 9.1 to 9.6. And if 9.7 introduces a new value, it will require a change in the module. While a free format fields give a lot of flexibility.

@ansibot ansibot added the stale_ci label May 19, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.