Skip to content

Commit

Permalink
Merge pull request #92 from jvanderaa/add_deprecation_of_data_key
Browse files Browse the repository at this point in the history
Adds deprecation notice to modules
  • Loading branch information
jvanderaa authored Sep 27, 2021
2 parents 5557e66 + dad5933 commit b7d4c81
Show file tree
Hide file tree
Showing 59 changed files with 90 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ env:
global:
- COLLECTION_NAMESPACE: "networktocode"
- COLLECTION_NAME: "nautobot"
- COLLECTION_VERSION: "2.0.1"
- COLLECTION_VERSION: "2.0.2"

jobs:
include:
Expand Down
38 changes: 28 additions & 10 deletions changelogs/changelog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ releases:
changes:
release_summary: 'This is the first official release of an Ansible Collection
for Nautobot.
This project is forked from the ``netbox.netbox`` Ansible Collection.'
fragments:
- release-v1.0.0.yml
Expand Down Expand Up @@ -206,14 +205,33 @@ releases:
- v1.0.4.yml
release_date: '2021-03-14'
1.1.0:
changes:
modules:
- description: Action plugin to query Nautobot GraphQL API endpoint
name: query_graphql
namespace: 'networktocode.nautobot'
- description: Lookup plugin to query Nautobot GraphQL API endpoint
name: lookup_graphql
namespace: 'networktocode.nautobot'
fragments:
- v1.1.0.yml
release_date: '2021-04-12'
modules:
- description: Lookup plugin to query Nautobot GraphQL API endpoint
name: lookup_graphql
namespace: networktocode.nautobot
- description: Action plugin to query Nautobot GraphQL API endpoint
name: query_graphql
namespace: networktocode.nautobot
release_date: '2021-04-12'
2.0.0:
changes:
bugfixes:
- (#26) Add missing description to tenant_group
- (#29) Add missing field to vlan_group
- (#32) Fixed query on Virtual Chassis
- (#35) Add Site, Device Tracebacks due to changes in Nautobot
major_changes:
- (#33) Deprecates NAUTOBOT_API and NAUTOBOT_API_TOKEN environment variables
release_summary: Bug fixes and removal of NAUTOBOT_API and NAUTOBOT_API_TOKEN
2.0.1:
changes:
bugfixes:
- (#44) Add Interface Label Support
- (#45) SSL Verify Keyword Consistency Update
release_summary: Bug fix updates for label support and SSL version consistency
2.0.2:
changes:
deprecations:
- All plugin modules (does not include inventory and lookup modules) `data` key is deprecated. Next version will have all sub options moved to options
2 changes: 1 addition & 1 deletion galaxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace: networktocode
name: nautobot

# The version of the collection. Must be compatible with semantic versioning
version: 2.0.1
version: 2.0.2

# The path to the Markdown (.md) readme file. This path is relative to the root of the collection
readme: README.md
Expand Down
5 changes: 5 additions & 0 deletions plugins/module_utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,11 @@ def __init__(self, module, endpoint, client=None):
self.check_mode = self.module.check_mode
self.endpoint = endpoint
query_params = self.module.params.get("query_params")
self.module.deprecate(
"The 'data' option is being removed. All sub options will be moved up one level to an option.",
version="3.0.0",
collection_name="networktocode.nautobot",
)

if not HAS_PYNAUTOBOT:
self.module.fail_json(
Expand Down
1 change: 1 addition & 0 deletions plugins/modules/aggregate.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
type: str
data:
description:
- (deprecated) In the next version of the modules the `data` option will be removed. All sub options will now be an option of the module.
- "Defines the aggregate configuration"
type: dict
suboptions:
Expand Down
1 change: 1 addition & 0 deletions plugins/modules/cable.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
type: dict
required: true
description:
- (deprecated) In the next version of the modules the `data` option will be removed. All sub options will now be an option of the module.
- Defines the cable configuration
suboptions:
termination_a_type:
Expand Down
1 change: 1 addition & 0 deletions plugins/modules/circuit.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
type: dict
required: true
description:
- (deprecated) In the next version of the modules the `data` option will be removed. All sub options will now be an option of the module.
- Defines the circuit configuration
suboptions:
cid:
Expand Down
1 change: 1 addition & 0 deletions plugins/modules/circuit_termination.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
required: true
type: dict
description:
- (deprecated) In the next version of the modules the `data` option will be removed. All sub options will now be an option of the module.
- Defines the circuit termination configuration
suboptions:
circuit:
Expand Down
1 change: 1 addition & 0 deletions plugins/modules/circuit_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
required: true
type: dict
description:
- (deprecated) In the next version of the modules the `data` option will be removed. All sub options will now be an option of the module.
- Defines the circuit type configuration
suboptions:
name:
Expand Down
1 change: 1 addition & 0 deletions plugins/modules/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
required: true
type: dict
description:
- (deprecated) In the next version of the modules the `data` option will be removed. All sub options will now be an option of the module.
- Defines the cluster configuration
suboptions:
name:
Expand Down
1 change: 1 addition & 0 deletions plugins/modules/cluster_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
required: true
type: dict
description:
- (deprecated) In the next version of the modules the `data` option will be removed. All sub options will now be an option of the module.
- Defines the cluster group configuration
suboptions:
name:
Expand Down
1 change: 1 addition & 0 deletions plugins/modules/cluster_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
required: true
type: dict
description:
- (deprecated) In the next version of the modules the `data` option will be removed. All sub options will now be an option of the module.
- Defines the cluster type configuration
suboptions:
name:
Expand Down
1 change: 1 addition & 0 deletions plugins/modules/console_port.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
type: dict
required: true
description:
- (deprecated) In the next version of the modules the `data` option will be removed. All sub options will now be an option of the module.
- Defines the console port configuration
suboptions:
device:
Expand Down
1 change: 1 addition & 0 deletions plugins/modules/console_port_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
type: dict
required: true
description:
- (deprecated) In the next version of the modules the `data` option will be removed. All sub options will now be an option of the module.
- Defines the console port template configuration
suboptions:
device_type:
Expand Down
1 change: 1 addition & 0 deletions plugins/modules/console_server_port.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
type: dict
required: true
description:
- (deprecated) In the next version of the modules the `data` option will be removed. All sub options will now be an option of the module.
- Defines the console server port configuration
suboptions:
device:
Expand Down
1 change: 1 addition & 0 deletions plugins/modules/console_server_port_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
type: dict
required: true
description:
- (deprecated) In the next version of the modules the `data` option will be removed. All sub options will now be an option of the module.
- Defines the console server port template configuration
suboptions:
device_type:
Expand Down
1 change: 1 addition & 0 deletions plugins/modules/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
type: str
data:
description:
- (deprecated) In the next version of the modules the `data` option will be removed. All sub options will now be an option of the module.
- Defines the device configuration
suboptions:
name:
Expand Down
1 change: 1 addition & 0 deletions plugins/modules/device_bay.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
type: str
data:
description:
- (deprecated) In the next version of the modules the `data` option will be removed. All sub options will now be an option of the module.
- Defines the device bay configuration
suboptions:
device:
Expand Down
1 change: 1 addition & 0 deletions plugins/modules/device_bay_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
type: str
data:
description:
- (deprecated) In the next version of the modules the `data` option will be removed. All sub options will now be an option of the module.
- Defines the device bay template configuration
suboptions:
device_type:
Expand Down
1 change: 1 addition & 0 deletions plugins/modules/device_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
type: str
data:
description:
- (deprecated) In the next version of the modules the `data` option will be removed. All sub options will now be an option of the module.
- Defines the interface configuration
suboptions:
device:
Expand Down
1 change: 1 addition & 0 deletions plugins/modules/device_interface_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
type: str
data:
description:
- (deprecated) In the next version of the modules the `data` option will be removed. All sub options will now be an option of the module.
- Defines the prefix configuration
suboptions:
device_type:
Expand Down
1 change: 1 addition & 0 deletions plugins/modules/device_role.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
type: str
data:
description:
- (deprecated) In the next version of the modules the `data` option will be removed. All sub options will now be an option of the module.
- Defines the device role configuration
suboptions:
name:
Expand Down
1 change: 1 addition & 0 deletions plugins/modules/device_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
type: str
data:
description:
- (deprecated) In the next version of the modules the `data` option will be removed. All sub options will now be an option of the module.
- Defines the device type configuration
suboptions:
manufacturer:
Expand Down
1 change: 1 addition & 0 deletions plugins/modules/front_port.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
type: dict
required: true
description:
- (deprecated) In the next version of the modules the `data` option will be removed. All sub options will now be an option of the module.
- Defines the front port configuration
suboptions:
device:
Expand Down
1 change: 1 addition & 0 deletions plugins/modules/front_port_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
type: dict
required: true
description:
- (deprecated) In the next version of the modules the `data` option will be removed. All sub options will now be an option of the module.
- Defines the front port template configuration
suboptions:
device_type:
Expand Down
1 change: 1 addition & 0 deletions plugins/modules/inventory_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
data:
type: dict
description:
- (deprecated) In the next version of the modules the `data` option will be removed. All sub options will now be an option of the module.
- Defines the inventory item configuration
suboptions:
device:
Expand Down
1 change: 1 addition & 0 deletions plugins/modules/ip_address.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
data:
type: dict
description:
- (deprecated) In the next version of the modules the `data` option will be removed. All sub options will now be an option of the module.
- Defines the IP address configuration
suboptions:
family:
Expand Down
1 change: 1 addition & 0 deletions plugins/modules/ipam_role.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
data:
type: dict
description:
- (deprecated) In the next version of the modules the `data` option will be removed. All sub options will now be an option of the module.
- Defines the ipam role configuration
suboptions:
name:
Expand Down
1 change: 1 addition & 0 deletions plugins/modules/manufacturer.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
data:
type: dict
description:
- (deprecated) In the next version of the modules the `data` option will be removed. All sub options will now be an option of the module.
- Defines the manufacturer configuration
suboptions:
name:
Expand Down
1 change: 1 addition & 0 deletions plugins/modules/platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
data:
type: dict
description:
- (deprecated) In the next version of the modules the `data` option will be removed. All sub options will now be an option of the module.
- Defines the platform configuration
suboptions:
name:
Expand Down
1 change: 1 addition & 0 deletions plugins/modules/power_feed.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
type: dict
required: true
description:
- (deprecated) In the next version of the modules the `data` option will be removed. All sub options will now be an option of the module.
- Defines the power feed configuration
suboptions:
power_panel:
Expand Down
1 change: 1 addition & 0 deletions plugins/modules/power_outlet.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
type: dict
required: true
description:
- (deprecated) In the next version of the modules the `data` option will be removed. All sub options will now be an option of the module.
- Defines the power outlet configuration
suboptions:
device:
Expand Down
1 change: 1 addition & 0 deletions plugins/modules/power_outlet_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
type: dict
required: true
description:
- (deprecated) In the next version of the modules the `data` option will be removed. All sub options will now be an option of the module.
- Defines the power outlet configuration
suboptions:
device_type:
Expand Down
1 change: 1 addition & 0 deletions plugins/modules/power_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
type: dict
required: true
description:
- (deprecated) In the next version of the modules the `data` option will be removed. All sub options will now be an option of the module.
- Defines the power panel configuration
suboptions:
site:
Expand Down
1 change: 1 addition & 0 deletions plugins/modules/power_port.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
type: dict
required: true
description:
- (deprecated) In the next version of the modules the `data` option will be removed. All sub options will now be an option of the module.
- Defines the power port configuration
suboptions:
device:
Expand Down
1 change: 1 addition & 0 deletions plugins/modules/power_port_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
type: dict
required: true
description:
- (deprecated) In the next version of the modules the `data` option will be removed. All sub options will now be an option of the module.
- Defines the power port configuration
suboptions:
device_type:
Expand Down
1 change: 1 addition & 0 deletions plugins/modules/prefix.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
data:
type: dict
description:
- (deprecated) In the next version of the modules the `data` option will be removed. All sub options will now be an option of the module.
- Defines the prefix configuration
suboptions:
family:
Expand Down
1 change: 1 addition & 0 deletions plugins/modules/provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
data:
type: dict
description:
- (deprecated) In the next version of the modules the `data` option will be removed. All sub options will now be an option of the module.
- Defines the provider configuration
suboptions:
name:
Expand Down
1 change: 1 addition & 0 deletions plugins/modules/rack.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
data:
type: dict
description:
- (deprecated) In the next version of the modules the `data` option will be removed. All sub options will now be an option of the module.
- Defines the rack configuration
suboptions:
name:
Expand Down
1 change: 1 addition & 0 deletions plugins/modules/rack_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
data:
type: dict
description:
- (deprecated) In the next version of the modules the `data` option will be removed. All sub options will now be an option of the module.
- Defines the rack group configuration
suboptions:
description:
Expand Down
1 change: 1 addition & 0 deletions plugins/modules/rack_role.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
data:
type: dict
description:
- (deprecated) In the next version of the modules the `data` option will be removed. All sub options will now be an option of the module.
- Defines the rack role configuration
suboptions:
name:
Expand Down
1 change: 1 addition & 0 deletions plugins/modules/rear_port.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
type: dict
required: true
description:
- (deprecated) In the next version of the modules the `data` option will be removed. All sub options will now be an option of the module.
- Defines the rear port configuration
suboptions:
device:
Expand Down
1 change: 1 addition & 0 deletions plugins/modules/rear_port_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
type: dict
required: true
description:
- (deprecated) In the next version of the modules the `data` option will be removed. All sub options will now be an option of the module.
- Defines the rear port template configuration
suboptions:
device_type:
Expand Down
Loading

0 comments on commit b7d4c81

Please sign in to comment.