Skip to content
This repository has been archived by the owner on Feb 24, 2022. It is now read-only.

Commit

Permalink
Sync bitbucket and GitHub
Browse files Browse the repository at this point in the history
  • Loading branch information
carchi8py committed Mar 9, 2021
1 parent 5b75959 commit a3b5c34
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 9 deletions.
5 changes: 5 additions & 0 deletions ansible_collections/netapp/ontap/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ Join our Slack Channel at [Netapp.io](http://netapp.io/slack)

# Release Notes

## 21.3.1

### Bug fixes
- na_ontap_snapmirror: check for consistency_group_volumes always fails on 9.7.

## 21.3.0

### New Modules
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bugfixes:
- na_ontap_snapmirror - check for consistency_group_volumes always fails on 9.7.
4 changes: 3 additions & 1 deletion ansible_collections/netapp/ontap/galaxy.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace: "netapp"
name: "ontap"
version: "21.3.0"
version: "21.3.1"
authors:
- "NetApp Ansible Team <[email protected]>"
license: "GPL-2.0-or-later"
Expand All @@ -10,3 +10,5 @@ repository: https://github.com/ansible-collections/netapp
homepage: https://netapp.io/configuration-management-and-automation/
tags:
- storage
- ontap
- netapp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
except ImportError:
ansible_version = 'unknown'

COLLECTION_VERSION = "21.3.0"
COLLECTION_VERSION = "21.3.1"
CLIENT_APP_VERSION = "%s/" + COLLECTION_VERSION
IMPORT_EXCEPTION = None

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,6 @@ def __init__(self):
self.na_helper = NetAppModule()
self.parameters = self.na_helper.set_parameters(self.module.params)
self.new_style = False
self.warnings = list()
# setup later if required
self.source_server = None
# only for ElementSW -> ONTAP snapmirroring, validate if ElementSW SDK is available
Expand Down Expand Up @@ -746,8 +745,8 @@ def set_initialization_state(self):
def get_create_body(self):
initialized = False
body = dict(
source=self.na_helper.filter_out_none_entries(self.parameters['source_endpoint']),
destination=self.na_helper.filter_out_none_entries(self.parameters['destination_endpoint']),
source=self.parameters['source_endpoint'],
destination=self.parameters['destination_endpoint'],
)
if self.na_helper.safe_get(self.parameters, ['create_destination', 'enabled']): # testing for True
body['create_destination'] = self.na_helper.filter_out_none_entries(self.parameters['create_destination'])
Expand Down Expand Up @@ -1058,22 +1057,27 @@ def too_old(minimum_generation, minimum_major):

for option in ['source_cluster', 'source_path', 'source_volume', 'source_vserver']:
if option in self.parameters:
self.warnings.append('option: %s is deprecated, please use %s' % (option, new_option(option, 'source_')))
self.module.warn('option: %s is deprecated, please use %s' % (option, new_option(option, 'source_')))
for option in ['destination_cluster', 'destination_path', 'destination_volume', 'destination_vserver']:
if option in self.parameters:
self.warnings.append('option: %s is deprecated, please use %s' % (option, new_option(option, 'destination_')))
self.module.warn('option: %s is deprecated, please use %s' % (option, new_option(option, 'destination_')))

ontap_97_options = ['create_destination']
if too_old(9, 7) and any(x in self.parameters for x in ontap_97_options):
self.module.fail_json(msg='Error: %s' % self.rest_api.options_require_ontap_version(ontap_97_options, version='9.7'))
if self.parameters.get('source_endpoint') or self.parameters.get('destination_endpoint'):
if not self.parameters.get('destination_endpoint') or not self.parameters.get('source_endpoint'):
self.module.fail_json(msg='Missing parameters: Source endpoint or Destination endpoint')
# sanitize inputs
self.parameters['source_endpoint'] = self.na_helper.filter_out_none_entries(self.parameters['source_endpoint'])
self.parameters['destination_endpoint'] = self.na_helper.filter_out_none_entries(self.parameters['destination_endpoint'])
# options requiring 9.7 or better, and REST
ontap_97_options = ['cluster', 'ipspace']
if too_old(9, 7) and any(x in self.parameters['source_endpoint'] for x in ontap_97_options):
self.module.fail_json(msg='Error: %s' % self.rest_api.options_require_ontap_version(ontap_97_options, version='9.7'))
if too_old(9, 7) and any(x in self.parameters['destination_endpoint'] for x in ontap_97_options):
self.module.fail_json(msg='Error: %s' % self.rest_api.options_require_ontap_version(ontap_97_options, version='9.7'))
# options requiring 9.8 or better, and REST
ontap_98_options = ['consistency_group_volumes']
if too_old(9, 8) and any(x in self.parameters['source_endpoint'] for x in ontap_98_options):
self.module.fail_json(msg='Error: %s' % self.rest_api.options_require_ontap_version(ontap_98_options, version='9.8'))
Expand Down Expand Up @@ -1333,8 +1337,6 @@ def apply(self):
results['actions'] = actions
if response:
results['response'] = response
if self.warnings:
results['warnings'] = self.warnings
self.module.exit_json(**results)


Expand Down

0 comments on commit a3b5c34

Please sign in to comment.