From 26511c323e00ef698d50af515db4f9f1840e9394 Mon Sep 17 00:00:00 2001 From: akshith-gunasheelan Date: Thu, 2 Nov 2023 12:17:00 +0530 Subject: [PATCH] Linting_errors_fixed --- ...liance_device_snmp_v3_trap_destinations.py | 6 +- .../oneview_appliance_device_snmp_v3_users.py | 24 +++--- ...eview_appliance_network_interface_facts.py | 4 +- .../oneview_appliance_network_interfaces.py | 4 +- .../modules/oneview_connection_template.py | 12 +-- plugins/modules/oneview_enclosure.py | 12 +-- plugins/modules/oneview_enclosure_group.py | 38 ++++---- plugins/modules/oneview_ethernet_network.py | 6 +- plugins/modules/oneview_fcoe_network.py | 2 +- .../oneview_hypervisor_cluster_profile.py | 4 +- ...neview_hypervisor_cluster_profile_facts.py | 4 +- plugins/modules/oneview_id_pools.py | 2 +- .../oneview_id_pools_ipv4_range_facts.py | 4 +- plugins/modules/oneview_interconnect_facts.py | 19 ++-- plugins/modules/oneview_label_facts.py | 2 +- plugins/modules/oneview_logical_enclosure.py | 78 ++++++++--------- .../oneview_logical_enclosure_facts.py | 44 +++++----- .../modules/oneview_logical_interconnect.py | 6 +- .../oneview_logical_interconnect_group.py | 24 +++--- plugins/modules/oneview_network_set.py | 2 +- plugins/modules/oneview_network_set_facts.py | 4 +- plugins/modules/oneview_rack_manager.py | 22 ++--- plugins/modules/oneview_rack_manager_facts.py | 5 +- plugins/modules/oneview_repositories.py | 4 +- plugins/modules/oneview_repositories_facts.py | 1 - plugins/modules/oneview_san_manager.py | 14 +-- plugins/modules/oneview_san_manager_facts.py | 4 +- .../oneview_sas_logical_interconnect.py | 2 +- .../oneview_sas_logical_interconnect_group.py | 20 ++--- ...eview_sas_logical_jbod_attachment_facts.py | 4 +- .../modules/oneview_sas_logical_jbod_facts.py | 4 +- plugins/modules/oneview_scope.py | 4 +- plugins/modules/oneview_server_hardware.py | 84 +++++++++--------- .../modules/oneview_server_hardware_facts.py | 48 +++++------ plugins/modules/oneview_server_profile.py | 86 +++++++++---------- .../modules/oneview_server_profile_facts.py | 46 +++++----- .../oneview_server_profile_template.py | 6 +- .../oneview_server_profile_template_facts.py | 1 - plugins/modules/oneview_storage_pool.py | 18 ++-- plugins/modules/oneview_storage_pool_facts.py | 18 ++-- plugins/modules/oneview_storage_system.py | 44 +++++----- .../modules/oneview_storage_system_facts.py | 6 +- ...oneview_storage_volume_attachment_facts.py | 14 +-- .../oneview_storage_volume_template.py | 10 +-- plugins/modules/oneview_task.py | 38 ++++---- plugins/modules/oneview_task_facts.py | 12 +-- plugins/modules/oneview_uplink_set.py | 4 +- plugins/modules/oneview_user_facts.py | 2 +- plugins/modules/oneview_volume.py | 6 +- plugins/modules/oneview_volume_facts.py | 10 +-- 50 files changed, 417 insertions(+), 421 deletions(-) diff --git a/plugins/modules/oneview_appliance_device_snmp_v3_trap_destinations.py b/plugins/modules/oneview_appliance_device_snmp_v3_trap_destinations.py index 6609090a..1e2f715e 100644 --- a/plugins/modules/oneview_appliance_device_snmp_v3_trap_destinations.py +++ b/plugins/modules/oneview_appliance_device_snmp_v3_trap_destinations.py @@ -76,9 +76,9 @@ state: present name: 172.0.0.1 data: - destinationAddress: "172.0.0.1" - port: 162 - userName: "test1" + destinationAddress: "172.0.0.1" + port: 162 + userName: "test1" delegate_to: localhost - name: Update the userId of specified SNMPv3 Trap Destination diff --git a/plugins/modules/oneview_appliance_device_snmp_v3_users.py b/plugins/modules/oneview_appliance_device_snmp_v3_users.py index 852764a4..e076c55e 100644 --- a/plugins/modules/oneview_appliance_device_snmp_v3_users.py +++ b/plugins/modules/oneview_appliance_device_snmp_v3_users.py @@ -72,10 +72,10 @@ api_version: 800 state: present data: - type: "Users" - userName: "testUser" - securityLevel: "Authentication" - authenticationProtocol: "SHA512" + type: "Users" + userName: "testUser" + securityLevel: "Authentication" + authenticationProtocol: "SHA512" delegate_to: localhost - debug: @@ -83,13 +83,13 @@ - name: Set the password of specified SNMPv3 user oneview_appliance_device_snmp_v3_users: - config: "{{ config }}" - state: present - name: "testUser" - data: - userName: "testUser" - authenticationPassphrase: "NewPass1234" - delegate_to: localhost + config: "{{ config }}" + state: present + name: "testUser" + data: + userName: "testUser" + authenticationPassphrase: "NewPass1234" + delegate_to: localhost - debug: var: appliance_device_snmp_v3_users @@ -102,7 +102,7 @@ api_version: 800 state: absent data: - userName: "testUser" + userName: "testUser" delegate_to: localhost ''' diff --git a/plugins/modules/oneview_appliance_network_interface_facts.py b/plugins/modules/oneview_appliance_network_interface_facts.py index 063ca53b..93d54ef2 100644 --- a/plugins/modules/oneview_appliance_network_interface_facts.py +++ b/plugins/modules/oneview_appliance_network_interface_facts.py @@ -69,14 +69,14 @@ oneview_appliance_network_interface_facts: config: "{{ config }}" params: - mac_address: "{{ mac_address }}" + mac_address: "{{ mac_address }}" delegate_to: localhost - name: Gather facts about the all unconfigured Mac Addresses oneview_appliance_network_interface_facts: config: "{{ config }}" options: - - getAllMacAddress + - getAllMacAddress delegate_to: localhost - debug: var=appliance_network_interfaces diff --git a/plugins/modules/oneview_appliance_network_interfaces.py b/plugins/modules/oneview_appliance_network_interfaces.py index c6b7eb37..341e9ad0 100644 --- a/plugins/modules/oneview_appliance_network_interfaces.py +++ b/plugins/modules/oneview_appliance_network_interfaces.py @@ -77,8 +77,8 @@ ipv4Subnet: "{{ ipv4_subnet }}" ipv4Gateway: "{{ gateway }}" ipv4NameServers: - - "{{ dnsServer1 }}" - - "{{ dnsServer2 }}" + - "{{ dnsServer1 }}" + - "{{ dnsServer2 }}" delegate_to: localhost - debug: var=appliance_network_interfaces ''' diff --git a/plugins/modules/oneview_connection_template.py b/plugins/modules/oneview_connection_template.py index 83f9b618..e7ccca99 100644 --- a/plugins/modules/oneview_connection_template.py +++ b/plugins/modules/oneview_connection_template.py @@ -67,12 +67,12 @@ api_version: 2000 state: present data: - name: 'name1304244267-1467656930023' - type : "connection-template" - bandwidth : - maximumBandwidth : 10000 - typicalBandwidth : 2000 - newName : "CT-23" + name: 'name1304244267-1467656930023' + type: "connection-template" + bandwidth: + maximumBandwidth: 10000 + typicalBandwidth: 2000 + newName: "CT-23" delegate_to: localhost ''' diff --git a/plugins/modules/oneview_enclosure.py b/plugins/modules/oneview_enclosure.py index 961da552..9702ac55 100644 --- a/plugins/modules/oneview_enclosure.py +++ b/plugins/modules/oneview_enclosure.py @@ -116,12 +116,12 @@ api_version: 1600 state: present data: - enclosureGroupUri : '{{ enclosure_group_uri }}' - hostname : '{{ enclosure_hostname }}' - username : '{{ enclosure_username }}' - password : '{{ enclosure_password }}' + enclosureGroupUri: '{{ enclosure_group_uri }}' + hostname: '{{ enclosure_hostname }}' + username: '{{ enclosure_username }}' + password: '{{ enclosure_password }}' name: 'Test-Enclosure' - licensingIntent : 'OneView' + licensingIntent: 'OneView' - name: Updates the enclosure to have a name of "Test-Enclosure-Renamed". oneview_enclosure: @@ -132,7 +132,7 @@ state: present data: name: 'Test-Enclosure' - newName : 'Test-Enclosure-Renamed' + newName: 'Test-Enclosure-Renamed' - name: Reconfigure the enclosure "Test-Enclosure" oneview_enclosure: diff --git a/plugins/modules/oneview_enclosure_group.py b/plugins/modules/oneview_enclosure_group.py index 4a61b4f3..9a3843c6 100644 --- a/plugins/modules/oneview_enclosure_group.py +++ b/plugins/modules/oneview_enclosure_group.py @@ -68,29 +68,29 @@ api_version: 2000 state: present data: - name: "Enclosure Group 1" - stackingMode: "Enclosure" # Not supported in V600 - interconnectBayMappings: - - interconnectBay: 1 - - interconnectBay: 2 - - interconnectBay: 3 - - interconnectBay: 4 - - interconnectBay: 5 - - interconnectBay: 6 - - interconnectBay: 7 - - interconnectBay: 8 + name: "Enclosure Group 1" + stackingMode: "Enclosure" # Not supported in V600 + interconnectBayMappings: + - interconnectBay: 1 + - interconnectBay: 2 + - interconnectBay: 3 + - interconnectBay: 4 + - interconnectBay: 5 + - interconnectBay: 6 + - interconnectBay: 7 + - interconnectBay: 8 delegate_to: localhost - name: Update the Enclosure Group changing the name attribute oneview_enclosure_group: - hostname: 172.16.101.48 - username: administrator - password: my_password - api_version: 2000 - state: present - data: - name: "Enclosure Group 1" - newName: "Enclosure Group 1 (renamed)" + hostname: 172.16.101.48 + username: administrator + password: my_password + api_version: 2000 + state: present + data: + name: "Enclosure Group 1" + newName: "Enclosure Group 1 (renamed)" delegate_to: localhost - name: Ensure that Enclosure Group is absent diff --git a/plugins/modules/oneview_ethernet_network.py b/plugins/modules/oneview_ethernet_network.py index 64ad3809..4b0bc4fa 100644 --- a/plugins/modules/oneview_ethernet_network.py +++ b/plugins/modules/oneview_ethernet_network.py @@ -84,8 +84,8 @@ name: 'Test Ethernet Network' purpose: Management bandwidth: - maximumBandwidth: 3000 - typicalBandwidth: 2000 + maximumBandwidth: 3000 + typicalBandwidth: 2000 delegate_to: localhost - name: Ensure that the Ethernet Network is present with name 'Renamed Ethernet Network' @@ -160,7 +160,7 @@ state: absent data: networkUris: - - "/rest/ethernet-networks/e2f0031b-52bd-4223-9ac1-d91cb519d548" + - "/rest/ethernet-networks/e2f0031b-52bd-4223-9ac1-d91cb519d548" delegate_to: localhost ''' diff --git a/plugins/modules/oneview_fcoe_network.py b/plugins/modules/oneview_fcoe_network.py index 22af893b..0e1fd3a0 100644 --- a/plugins/modules/oneview_fcoe_network.py +++ b/plugins/modules/oneview_fcoe_network.py @@ -107,7 +107,7 @@ state: absent data: networkUris: - - "/rest/fcoe-networks/e2f0031b-52bd-4223-9ac1-d91cb519d548" + - "/rest/fcoe-networks/e2f0031b-52bd-4223-9ac1-d91cb519d548" delegate_to: localhost ''' diff --git a/plugins/modules/oneview_hypervisor_cluster_profile.py b/plugins/modules/oneview_hypervisor_cluster_profile.py index 66bf7d90..c7e5700a 100644 --- a/plugins/modules/oneview_hypervisor_cluster_profile.py +++ b/plugins/modules/oneview_hypervisor_cluster_profile.py @@ -95,7 +95,7 @@ hypervisorManagerUri: '/rest/hypervisor-managers/ee73af7a-1775-44ba-8a66-d0479ec85678' hostprefix: 'Test-cluster-host' params: - create_vswitch_layout: True + create_vswitch_layout: true - name: Update the Hypervisor Cluster Profile name to 'hcp Renamed' oneview_hypervisor_cluster_profile: hostname: 172.16.101.48 @@ -109,7 +109,7 @@ hypervisorType: 'Vmware' hypervisorManagerUri: '/rest/hypervisor-manager/rdy-dfdf12' params: - force: True + force: true - name: Ensure that the Hypervisor Cluster Profile is absent oneview_hypervisor_cluster_profile: hostname: 172.16.101.48 diff --git a/plugins/modules/oneview_hypervisor_cluster_profile_facts.py b/plugins/modules/oneview_hypervisor_cluster_profile_facts.py index 08e66710..540fd407 100644 --- a/plugins/modules/oneview_hypervisor_cluster_profile_facts.py +++ b/plugins/modules/oneview_hypervisor_cluster_profile_facts.py @@ -107,9 +107,9 @@ username: administrator password: my_password api_version: 1200 - name : "ClusterProfile-1" + name: "ClusterProfile-1" options: - - compliancePreview + - compliancePreview delegate_to: localhost - debug: var=hypervisor_cluster_profiles - debug: var=hypervisor_cluster_profile_compliance_preview diff --git a/plugins/modules/oneview_id_pools.py b/plugins/modules/oneview_id_pools.py index 9f8579a4..5a392b77 100644 --- a/plugins/modules/oneview_id_pools.py +++ b/plugins/modules/oneview_id_pools.py @@ -68,7 +68,7 @@ data: poolType: '{{ poolType }}' rangeUris: '{{ id_pool["rangeUris"] }}' - enabled: True + enabled: true delegate_to: localhost - name: Allocates one or more IDs from a pool diff --git a/plugins/modules/oneview_id_pools_ipv4_range_facts.py b/plugins/modules/oneview_id_pools_ipv4_range_facts.py index bf2e3975..660b0690 100644 --- a/plugins/modules/oneview_id_pools_ipv4_range_facts.py +++ b/plugins/modules/oneview_id_pools_ipv4_range_facts.py @@ -82,8 +82,8 @@ oneview_id_pools_ipv4_range_facts: config: "{{ config_file_path }}" options: - - schema -- debug: var=id_pools_ipv4_ranges + - schema +- debug: var=id_pools_ipv4_ranges - name: Gather paginated, filtered and sorted facts about ID Pools IPV4 Ranges oneview_id_pools_ipv4_range_facts: diff --git a/plugins/modules/oneview_interconnect_facts.py b/plugins/modules/oneview_interconnect_facts.py index 4dc06f1c..0c67b575 100644 --- a/plugins/modules/oneview_interconnect_facts.py +++ b/plugins/modules/oneview_interconnect_facts.py @@ -108,7 +108,7 @@ api_version: 1200 name: '0000A66102, interconnect 2' options: - - nameServers + - nameServers - debug: var=interconnects - debug: var=interconnect_name_servers @@ -121,7 +121,7 @@ api_version: 1200 name: '0000A66102, interconnect 2' options: - - statistics + - statistics - debug: var=interconnects - debug: var=interconnect_statistics @@ -134,7 +134,7 @@ api_version: 1200 name: '0000A66102, interconnect 2' options: - - portStatistics: 'd3' + - portStatistics: 'd3' - debug: var=interconnects - debug: var=interconnect_port_statistics @@ -147,9 +147,9 @@ api_version: 1200 name: 'Enc2, interconnect 2' options: - - subPortStatistics: - portName: 'd4' - subportNumber: 1 + - subPortStatistics: + portName: 'd4' + subportNumber: 1 - debug: var=interconnects - debug: var=interconnect_subport_statistics @@ -162,7 +162,7 @@ api_version: 1200 name: '0000A66102, interconnect 2' options: - - ports + - ports - debug: var=interconnects - debug: var=interconnect_ports @@ -175,7 +175,7 @@ api_version: 1200 name: '0000A66102, interconnect 2' options: - - port: d1 + - port: d1 - debug: var=interconnects - debug: var=interconnect_port @@ -188,11 +188,10 @@ api_version: 1200 name: '0000A66102, interconnect 2' options: - - pluggableModuleInformation + - pluggableModuleInformation - debug: var=interconnects - debug: var=interconnect_pluggable_module_information - ''' RETURN = ''' diff --git a/plugins/modules/oneview_label_facts.py b/plugins/modules/oneview_label_facts.py index e176f5ae..9281204c 100644 --- a/plugins/modules/oneview_label_facts.py +++ b/plugins/modules/oneview_label_facts.py @@ -101,7 +101,7 @@ password: my_password api_version: 2600 name: "{{ labels[0]['name'] }}" - get_resources: True + get_resources: true delegate_to: localhost - debug: var=labels diff --git a/plugins/modules/oneview_logical_enclosure.py b/plugins/modules/oneview_logical_enclosure.py index b24e8916..a6cfe400 100644 --- a/plugins/modules/oneview_logical_enclosure.py +++ b/plugins/modules/oneview_logical_enclosure.py @@ -81,10 +81,10 @@ api_version: 2000 state: present data: - enclosureUris: - - "/rest/enclosures/0000000000A66101" - enclosureGroupUri: "/rest/enclosure-groups/9fafc382-bbef-4a94-a9d1-05f77042f3ac" - name: "Encl1" + enclosureUris: + - "/rest/enclosures/0000000000A66101" + enclosureGroupUri: "/rest/enclosure-groups/9fafc382-bbef-4a94-a9d1-05f77042f3ac" + name: "Encl1" ignore_errors: true delegate_to: localhost @@ -96,13 +96,13 @@ api_version: 2000 state: firmware_updated data: - name: "Encl1" - firmware: - firmwareBaselineUri: "/rest/firmware-drivers/SPPGen9Snap3_2015_0221_71" - firmwareUpdateOn: "EnclosureOnly" - forceInstallFirmware: "false" - custom_headers: - if-Match: '*' + name: "Encl1" + firmware: + firmwareBaselineUri: "/rest/firmware-drivers/SPPGen9Snap3_2015_0221_71" + firmwareUpdateOn: "EnclosureOnly" + forceInstallFirmware: "false" + custom_headers: + if-Match: '*' delegate_to: localhost # This play is compatible with Synergy Enclosures @@ -114,16 +114,16 @@ api_version: 2000 state: firmware_updated data: - name: "Encl1" - firmware: - firmwareBaselineUri: "/rest/firmware-drivers/SPPGen9Snap3_2015_0221_71" - firmwareUpdateOn: "EnclosureOnly" - forceInstallFirmware: "false" - validateIfLIFirmwareUpdateIsNonDisruptive: "true" - logicalInterconnectUpdateMode: "Orchestrated" - updateFirmwareOnUnmanagedInterconnect: "true" - custom_headers: - if-Match: '*' + name: "Encl1" + firmware: + firmwareBaselineUri: "/rest/firmware-drivers/SPPGen9Snap3_2015_0221_71" + firmwareUpdateOn: "EnclosureOnly" + forceInstallFirmware: "false" + validateIfLIFirmwareUpdateIsNonDisruptive: "true" + logicalInterconnectUpdateMode: "Orchestrated" + updateFirmwareOnUnmanagedInterconnect: "true" + custom_headers: + if-Match: '*' delegate_to: localhost - name: Update the Logical Enclosure configuration script @@ -134,8 +134,8 @@ api_version: 2000 state: script_updated data: - name: "Encl1" - configurationScript: "# script (updated)" + name: "Encl1" + configurationScript: "# script (updated)" delegate_to: localhost - name: Generates a support dump for the Logical Enclosure @@ -146,11 +146,11 @@ api_version: 2000 state: dumped data: - name: "Encl1" - dump: - errorCode: "MyDump16" - encrypt: "true" - excludeApplianceDump: "false" + name: "Encl1" + dump: + errorCode: "MyDump16" + encrypt: "true" + excludeApplianceDump: "false" delegate_to: localhost - debug: var=generated_dump_uri @@ -162,7 +162,7 @@ api_version: 2000 state: reconfigured data: - name: "Encl1" + name: "Encl1" delegate_to: localhost - name: Makes the logical enclosure consistent with the enclosure group @@ -173,7 +173,7 @@ api_version: 2000 state: updated_from_group data: - name: "Encl1" + name: "Encl1" delegate_to: localhost - name: Update the Logical Enclosure changing the name attribute @@ -184,19 +184,19 @@ api_version: 2000 state: present data: - name: "Encl1" - newName: "Encl1 (renamed)" + name: "Encl1" + newName: "Encl1 (renamed)" delegate_to: localhost - name: Delete a Logical Enclosure (available only on HPE Synergy) oneview_logical_enclosure: - hostname: 172.16.101.48 - username: administrator - password: my_password - api_version: 2000 - state: absent - data: - name: 'Encl1' + hostname: 172.16.101.48 + username: administrator + password: my_password + api_version: 2000 + state: absent + data: + name: 'Encl1' delegate_to: localhost ''' diff --git a/plugins/modules/oneview_logical_enclosure_facts.py b/plugins/modules/oneview_logical_enclosure_facts.py index 31f6a7ee..f215e0b5 100644 --- a/plugins/modules/oneview_logical_enclosure_facts.py +++ b/plugins/modules/oneview_logical_enclosure_facts.py @@ -74,39 +74,39 @@ - name: Gather paginated, filtered and sorted facts about Logical Enclosures oneview_logical_enclosure_facts: - hostname: 172.16.101.48 - username: administrator - password: my_password - api_version: 2000 - params: - start: 0 - count: 3 - sort: 'name:descending' - filter: 'status=OK' - scope_uris: '/rest/scope/637fa556-a78d-4796-8fce-2179e249ea7d' + hostname: 172.16.101.48 + username: administrator + password: my_password + api_version: 2000 + params: + start: 0 + count: 3 + sort: 'name:descending' + filter: 'status=OK' + scope_uris: '/rest/scope/637fa556-a78d-4796-8fce-2179e249ea7d' - debug: var=logical_enclosures - name: Gather facts about a Logical Enclosure by name oneview_logical_enclosure_facts: - hostname: 172.16.101.48 - username: administrator - password: my_password - api_version: 2000 - name: "Encl1" + hostname: 172.16.101.48 + username: administrator + password: my_password + api_version: 2000 + name: "Encl1" delegate_to: localhost - debug: var=logical_enclosures - name: Gather facts about a Logical Enclosure by name with options oneview_logical_enclosure_facts: - hostname: 172.16.101.48 - username: administrator - password: my_password - api_version: 2000 - name: "Encl1" - options: - - script + hostname: 172.16.101.48 + username: administrator + password: my_password + api_version: 2000 + name: "Encl1" + options: + - script delegate_to: localhost - debug: var=logical_enclosures diff --git a/plugins/modules/oneview_logical_interconnect.py b/plugins/modules/oneview_logical_interconnect.py index 2bdb01bc..7022b056 100644 --- a/plugins/modules/oneview_logical_interconnect.py +++ b/plugins/modules/oneview_logical_interconnect.py @@ -172,7 +172,7 @@ data: name: "Name of the Logical Interconnect" snmpConfiguration: - enabled: True + enabled: true - name: Update the IGMP settings for the logical interconnect oneview_logical_interconnect: @@ -196,7 +196,7 @@ data: name: "Name of the Logical Interconnect" portMonitor: - enablePortMonitor: False + enablePortMonitor: false - name: Update the port flap settings of the logical interconnect oneview_logical_interconnect: @@ -257,7 +257,7 @@ name: "Name of the Logical Interconnect" telemetryConfiguration: sampleCount: 12 - enableTelemetry: True + enableTelemetry: true sampleInterval: 300 - debug: var=telemetry_configuration diff --git a/plugins/modules/oneview_logical_interconnect_group.py b/plugins/modules/oneview_logical_interconnect_group.py index 923f8000..24fa2087 100644 --- a/plugins/modules/oneview_logical_interconnect_group.py +++ b/plugins/modules/oneview_logical_interconnect_group.py @@ -75,11 +75,11 @@ interconnectMapEntryTemplates: - logicalDownlinkUri: ~ logicalLocation: - locationEntries: - - relativeValue: "1" - type: "Bay" - - relativeValue: 1 - type: "Enclosure" + locationEntries: + - relativeValue: "1" + type: "Bay" + - relativeValue: 1 + type: "Enclosure" permittedInterconnectTypeName: 'HP VC Flex-10/10D Module' # Alternatively you can inform permittedInterconnectTypeUri @@ -117,13 +117,13 @@ logicalPortConfigInfos: - desiredSpeed: 'Auto' logicalLocation: - locationEntries: - - relativeValue: 1 - type: "Bay" - - relativeValue: 'Q1' #This port value can be either Port Number or Port Name - type: "Port" - - relativeValue: 1 - type: "Enclosure" + locationEntries: + - relativeValue: 1 + type: "Bay" + - relativeValue: 'Q1' # This port value can be either Port Number or Port Name + type: "Port" + - relativeValue: 1 + type: "Enclosure" - name: Ensure that the Logical Interconnect Group is present with name 'Test' oneview_logical_interconnect_group: diff --git a/plugins/modules/oneview_network_set.py b/plugins/modules/oneview_network_set.py index b2fc78f1..da6fcf3d 100644 --- a/plugins/modules/oneview_network_set.py +++ b/plugins/modules/oneview_network_set.py @@ -94,7 +94,7 @@ api_version: 600 state: absent data: - name: 'OneViewSDK Test Network Set - Renamed' + name: 'OneViewSDK Test Network Set - Renamed' # This feature is only available for V300 and V500 - name: Update the Network set with two scopes diff --git a/plugins/modules/oneview_network_set_facts.py b/plugins/modules/oneview_network_set_facts.py index 28704cde..d17b2bdc 100644 --- a/plugins/modules/oneview_network_set_facts.py +++ b/plugins/modules/oneview_network_set_facts.py @@ -96,7 +96,7 @@ password: my_password api_version: 1200 options: - - withoutEthernet + - withoutEthernet no_log: true delegate_to: localhost @@ -124,7 +124,7 @@ api_version: 1200 name: Name of the Network Set options: - - withoutEthernet + - withoutEthernet no_log: true delegate_to: localhost diff --git a/plugins/modules/oneview_rack_manager.py b/plugins/modules/oneview_rack_manager.py index c19c8c4f..7d54f8dd 100644 --- a/plugins/modules/oneview_rack_manager.py +++ b/plugins/modules/oneview_rack_manager.py @@ -70,10 +70,10 @@ api_version: 4400 state: present data: - hostname : "5.6.7.8" - username : "username" - password : "password" - force: false + hostname: "5.6.7.8" + username: "username" + password: "password" + force: false delegate_to: localhost - name: Gather facts about all Rack Managers @@ -96,10 +96,10 @@ api_version: 4400 state: present data: - hostname: "{{ rack_manager_name }}" - username: 'username' - password: 'password' - force: false + hostname: "{{ rack_manager_name }}" + username: 'username' + password: 'password' + force: false delegate_to: localhost - name: Refresh the rack manager @@ -110,7 +110,7 @@ api_version: 4400 state: refresh_state_set data: - name: "{{ rack_manager_name }}" + name: "{{ rack_manager_name }}" delegate_to: localhost - name: Remove the rack manager by its name @@ -121,7 +121,7 @@ api_version: 4400 state: absent data: - name: "{{ rack_manager_name }}" + name: "{{ rack_manager_name }}" delegate_to: localhost - name: Do nothing when the rack manager is already removed @@ -132,7 +132,7 @@ api_version: 4400 state: absent data: - name: "{{ rack_manager_name }}" + name: "{{ rack_manager_name }}" delegate_to: localhost ''' diff --git a/plugins/modules/oneview_rack_manager_facts.py b/plugins/modules/oneview_rack_manager_facts.py index 564843e7..bcaf4652 100644 --- a/plugins/modules/oneview_rack_manager_facts.py +++ b/plugins/modules/oneview_rack_manager_facts.py @@ -76,10 +76,10 @@ - debug: var=rack_managers - set_fact: - rack_manager_name : "{{ rack_managers[0]['name'] }}" + rack_manager_name: "{{ rack_managers[0]['name'] }}" - set_fact: - rack_manager_uri : "{{ rack_managers[0]['uri'] }}" + rack_manager_uri: "{{ rack_managers[0]['uri'] }}" - debug: var=rack_manager_name @@ -163,7 +163,6 @@ - debug: var=rack_manager_managers - debug: var=rack_manager_env_conf - debug: var=rack_manager_remote_support - ''' RETURN = ''' diff --git a/plugins/modules/oneview_repositories.py b/plugins/modules/oneview_repositories.py index 4cf5af0b..d93358b1 100644 --- a/plugins/modules/oneview_repositories.py +++ b/plugins/modules/oneview_repositories.py @@ -74,7 +74,7 @@ oneview_repositories: config: "{{ config }}" state: present - validate_etag: False + validate_etag: false data: repositoryName: "{{ repository_name }}" userName: "{{ repository_username }}" @@ -112,7 +112,7 @@ data: name: "{{ repository_name }}" params: - force: True + force: true delegate_to: localhost register: deleted diff --git a/plugins/modules/oneview_repositories_facts.py b/plugins/modules/oneview_repositories_facts.py index c25db1e3..ef2ffdba 100644 --- a/plugins/modules/oneview_repositories_facts.py +++ b/plugins/modules/oneview_repositories_facts.py @@ -106,7 +106,6 @@ when: repositories | default('', True) - debug: var=repositories - ''' RETURN = ''' diff --git a/plugins/modules/oneview_san_manager.py b/plugins/modules/oneview_san_manager.py index 8c877884..84a1d7e2 100644 --- a/plugins/modules/oneview_san_manager.py +++ b/plugins/modules/oneview_san_manager.py @@ -74,8 +74,8 @@ api_version: 4600 state: present data: - providerDisplayName: "" - connectionInfo: + providerDisplayName: "" + connectionInfo: - name: "Host" value: "" - name: "Username" @@ -125,8 +125,8 @@ api_version: 4600 state: refresh_state_set data: - name: "{{ san_manager_name }}" - refreshState: "RefreshPending" + name: "{{ san_manager_name }}" + refreshState: "RefreshPending" delegate_to: localhost - name: Update the San Manager @@ -165,7 +165,7 @@ value: "" - name: "Password" value: "" - updatePassword: True + updatePassword: true - name: "UseHttps" value: true delegate_to: localhost @@ -178,7 +178,7 @@ api_version: 4600 state: absent data: - name: "{{ san_manager_name }}" + name: "{{ san_manager_name }}" delegate_to: localhost - name: Do nothing when the san manager is already removed @@ -189,7 +189,7 @@ api_version: 4600 state: absent data: - name: "{{ san_manager_name }}" + name: "{{ san_manager_name }}" delegate_to: localhost ''' diff --git a/plugins/modules/oneview_san_manager_facts.py b/plugins/modules/oneview_san_manager_facts.py index ad310f2d..59ec2eb8 100644 --- a/plugins/modules/oneview_san_manager_facts.py +++ b/plugins/modules/oneview_san_manager_facts.py @@ -61,9 +61,9 @@ delegate_to: localhost - debug: var=san_managers - set_fact: - san_manager_name : "{{ san_managers[0]['name'] }}" + san_manager_name: "{{ san_managers[0]['name'] }}" - set_fact: - san_manager_uri : "{{ san_managers[0]['uri'] }}" + san_manager_uri: "{{ san_managers[0]['uri'] }}" - debug: var=san_manager_name - name: Gather paginated, filtered and sorted facts about san Manager oneview_san_manager_facts: diff --git a/plugins/modules/oneview_sas_logical_interconnect.py b/plugins/modules/oneview_sas_logical_interconnect.py index bfb2b2bc..dee5b612 100644 --- a/plugins/modules/oneview_sas_logical_interconnect.py +++ b/plugins/modules/oneview_sas_logical_interconnect.py @@ -80,7 +80,7 @@ delegate_to: localhost - set_fact: - sas_logical_interconnect_name : "{{ sas_logical_interconnects[0]['name'] }}" + sas_logical_interconnect_name: "{{ sas_logical_interconnects[0]['name'] }}" - name: Return the SAS Logical Interconnect to a consistent state oneview_sas_logical_interconnect: diff --git a/plugins/modules/oneview_sas_logical_interconnect_group.py b/plugins/modules/oneview_sas_logical_interconnect_group.py index a26984cf..24f88b57 100644 --- a/plugins/modules/oneview_sas_logical_interconnect_group.py +++ b/plugins/modules/oneview_sas_logical_interconnect_group.py @@ -83,19 +83,19 @@ interconnectMapEntryTemplates: - enclosureIndex: 1 logicalLocation: - locationEntries: - - relativeValue: 1 - type: "Enclosure" - - relativeValue: 4 - type: "Bay" + locationEntries: + - relativeValue: 1 + type: "Enclosure" + - relativeValue: 4 + type: "Bay" permittedInterconnectTypeName: "{{ contents.sas_logical_interconnect_group.permitted_interconnect_type_name }}" - enclosureIndex: 1 logicalLocation: - locationEntries: - - relativeValue: 1 - type: "Enclosure" - - relativeValue: 1 - type: "Bay" + locationEntries: + - relativeValue: 1 + type: "Enclosure" + - relativeValue: 1 + type: "Bay" permittedInterconnectTypeName: "{{ contents.sas_logical_interconnect_group.permitted_interconnect_type_name }}" # Alternatively you can inform permittedInterconnectTypeUri delegate_to: localhost diff --git a/plugins/modules/oneview_sas_logical_jbod_attachment_facts.py b/plugins/modules/oneview_sas_logical_jbod_attachment_facts.py index 09957520..f222710d 100644 --- a/plugins/modules/oneview_sas_logical_jbod_attachment_facts.py +++ b/plugins/modules/oneview_sas_logical_jbod_attachment_facts.py @@ -67,9 +67,9 @@ - debug: var=sas_logical_jbod_attachments - set_fact: - jbod_attachment_name : "{{ sas_logical_jbod_attachments[0]['name'] }}" + jbod_attachment_name: "{{ sas_logical_jbod_attachments[0]['name'] }}" - set_fact: - jbod_attachment_uri : "{{ sas_logical_jbod_attachments[0]['uri'] }}" + jbod_attachment_uri: "{{ sas_logical_jbod_attachments[0]['uri'] }}" - name: Gather paginated, filtered and sorted facts about SAS Logical JBOD attachments oneview_sas_logical_jbod_attachment_facts: diff --git a/plugins/modules/oneview_sas_logical_jbod_facts.py b/plugins/modules/oneview_sas_logical_jbod_facts.py index 63eae327..05da6703 100644 --- a/plugins/modules/oneview_sas_logical_jbod_facts.py +++ b/plugins/modules/oneview_sas_logical_jbod_facts.py @@ -73,9 +73,9 @@ - debug: var=sas_logical_jbods - set_fact: - jbod_name : "{{ sas_logical_jbods[0]['name'] }}" + jbod_name: "{{ sas_logical_jbods[0]['name'] }}" - set_fact: - jbod_uri : "{{ sas_logical_jbods[0]['uri'] }}" + jbod_uri: "{{ sas_logical_jbods[0]['uri'] }}" - name: Gather paginated, filtered and sorted facts about SAS Logical JBODs oneview_sas_logical_jbod_facts: diff --git a/plugins/modules/oneview_scope.py b/plugins/modules/oneview_scope.py index 98328473..a88a0aba 100644 --- a/plugins/modules/oneview_scope.py +++ b/plugins/modules/oneview_scope.py @@ -108,8 +108,8 @@ name: 'SampleScopeRenamed' resourceAssignments: removedResourceUris: - - '{{ fc_network_1.uri }}' - - '{{ fc_network_2.uri }}' + - '{{ fc_network_1.uri }}' + - '{{ fc_network_2.uri }}' delegate_to: localhost ''' diff --git a/plugins/modules/oneview_server_hardware.py b/plugins/modules/oneview_server_hardware.py index d81785f0..05e97ac3 100644 --- a/plugins/modules/oneview_server_hardware.py +++ b/plugins/modules/oneview_server_hardware.py @@ -90,12 +90,12 @@ api_version: 1200 state: present data: - hostname : "172.18.6.15" - username : "username" - password : "password" - force : false - licensingIntent: "OneView" - configurationState: "Managed" + hostname: "172.18.6.15" + username: "username" + password: "password" + force: false + licensingIntent: "OneView" + configurationState: "Managed" delegate_to: localhost - name: Ensure that the Server Hardware is present and is inserted in the desired scopes @@ -106,10 +106,10 @@ api_version: 1200 state: present data: - name : "172.18.6.15" - scopeUris: - - '/rest/scopes/00SC123456' - - '/rest/scopes/01SC123456' + name: "172.18.6.15" + scopeUris: + - '/rest/scopes/00SC123456' + - '/rest/scopes/01SC123456' delegate_to: localhost - name: Add multiple rack-mount servers @@ -120,14 +120,14 @@ api_version: 1200 state: multiple_servers_added data: - mpHostsAndRanges : - - '172.18.6.15' - username : 'username' - password : 'password' - initialScopeUris: - - "/rest/scopes/01SC123456" - licensingIntent: "OneView" - configurationState: "Managed" + mpHostsAndRanges: + - '172.18.6.15' + username: 'username' + password: 'password' + initialScopeUris: + - "/rest/scopes/01SC123456" + licensingIntent: "OneView" + configurationState: "Managed" delegate_to: localhost - name: Power Off the server hardware @@ -138,10 +138,10 @@ api_version: 1200 state: power_state_set data: - name : "172.18.6.15" - powerStateData: - powerState: "Off" - powerControl: "MomentaryPress" + name: "172.18.6.15" + powerStateData: + powerState: "Off" + powerControl: "MomentaryPress" delegate_to: localhost - name: Check for Firmware Compliance @@ -152,9 +152,9 @@ api_version: 1200 state: check_firmware_compliance data: - firmwareComplianceData: - firmwareBaselineId: "abc-123-def-456-baseline-id" - serverUUID: "abc-123-def-456" + firmwareComplianceData: + firmwareBaselineId: "abc-123-def-456-baseline-id" + serverUUID: "abc-123-def-456" delegate_to: localhost - name: Update Firmware of the server hardware @@ -165,12 +165,12 @@ api_version: 1200 state: firmware_update data: - name: "172.18.6.15" - firmwareUpdateData: - baselineUri: "/rest/firmware-drivers/abc-123" - forceApplyFirmware: "false" - firmwareInstallType: "FirmwareOnlyOfflineMode" - installationPolicy: "LowerThanBaseline" + name: "172.18.6.15" + firmwareUpdateData: + baselineUri: "/rest/firmware-drivers/abc-123" + forceApplyFirmware: "false" + firmwareInstallType: "FirmwareOnlyOfflineMode" + installationPolicy: "LowerThanBaseline" delegate_to: localhost when: ansible_facts['server_hardware']['serverFirmwareUpdateRequired'] == true @@ -182,9 +182,9 @@ api_version: 1200 state: refresh_state_set data: - name : "172.18.6.15" - refreshStateData: - refreshState : "RefreshPending" + name: "172.18.6.15" + refreshStateData: + refreshState: "RefreshPending" delegate_to: localhost - name: Update the Server Hardware iLO firmware version @@ -195,7 +195,7 @@ api_version: 1200 state: ilo_firmware_version_updated data: - name : "172.18.6.15" + name: "172.18.6.15" delegate_to: localhost - name: Set the calibrated max power of a server hardware @@ -206,9 +206,9 @@ api_version: 1200 state: environmental_configuration_set data: - name : "172.18.6.15" - environmentalConfigurationData: - calibratedMaxPower: 2500 + name: "172.18.6.15" + environmentalConfigurationData: + calibratedMaxPower: 2500 delegate_to: localhost - name: Remove the server hardware by its IP @@ -219,7 +219,7 @@ api_version: 1200 state: absent data: - name : "172.18.6.15" + name: "172.18.6.15" delegate_to: localhost - name: Set the server UID state off @@ -230,7 +230,7 @@ api_version: 1200 state: uid_state_off data: - name : '0000A66102, bay 12' + name: '0000A66102, bay 12' delegate_to: localhost - name: Set the server one-time boot device to Network @@ -241,7 +241,7 @@ api_version: 1200 state: one_time_boot_network data: - name : '0000A66102, bay 12' + name: '0000A66102, bay 12' delegate_to: localhost - name: Set the server one-time boot device to No one-time boot @@ -252,7 +252,7 @@ api_version: 1200 state: one_time_boot_normal data: - name : '0000A66102, bay 12' + name: '0000A66102, bay 12' delegate_to: localhost ''' diff --git a/plugins/modules/oneview_server_hardware_facts.py b/plugins/modules/oneview_server_hardware_facts.py index e9d1c132..5d9b3c39 100644 --- a/plugins/modules/oneview_server_hardware_facts.py +++ b/plugins/modules/oneview_server_hardware_facts.py @@ -134,23 +134,23 @@ - name: Gather all facts about a Server Hardware oneview_server_hardware_facts: - hostname: 172.16.101.48 - username: administrator - password: my_password - api_version: 1200 - name : "Encl1, bay 1" - options: - - bios # optional - - javaRemoteConsoleUrl # optional - - physicalServerHardware # optional - - environmentalConfig # optional - - iloSsoUrl # optional - - remoteConsoleUrl # optional - - utilization: # optional - fields : 'AveragePower' - filter : ['startDate=2016-05-30T03:29:42.000Z'] - view : 'day' - - firmware # optional + hostname: 172.16.101.48 + username: administrator + password: my_password + api_version: 1200 + name: "Encl1, bay 1" + options: + - bios # optional + - javaRemoteConsoleUrl # optional + - physicalServerHardware # optional + - environmentalConfig # optional + - iloSsoUrl # optional + - remoteConsoleUrl # optional + - utilization: # optional + fields: 'AveragePower' + filter: ['startDate=2016-05-30T03:29:42.000Z'] + view: 'day' + - firmware # optional delegate_to: localhost - debug: var=server_hardwares @@ -165,13 +165,13 @@ - name: Gather facts about the Server Hardware firmware oneview_server_hardware_facts: - hostname: 172.16.101.48 - username: administrator - password: my_password - api_version: 1200 - name : "0000A66102, bay 12" - options: - - firmware + hostname: 172.16.101.48 + username: administrator + password: my_password + api_version: 1200 + name: "0000A66102, bay 12" + options: + - firmware delegate_to: localhost - debug: var=server_hardware_firmware diff --git a/plugins/modules/oneview_server_profile.py b/plugins/modules/oneview_server_profile.py index 3e84b518..7563cfa4 100644 --- a/plugins/modules/oneview_server_profile.py +++ b/plugins/modules/oneview_server_profile.py @@ -102,44 +102,44 @@ api_version: 1600 state: present data: - name: Web-Server-L2 - # You can choose either server_template or serverProfileTemplateUri to inform the Server Profile Template - # serverProfileTemplateUri: "/rest/server-profile-templates/31ade62c-2112-40a0-935c-2f9450a75198" - server_template: Compute-node-template - # You can inform a server_hardware or a serverHardwareUri. If any hardware was informed, it will try - # get one available automatically - # server_hardware: Encl1, bay 12 - # serverHardwareUri: /rest/server-hardware/30303437-3933-4753-4831-30335835524E - - # You can choose either serverHardwareTypeUri or serverHardwareTypeName to inform the Server Hardware Type - # serverHardwareTypeUri: /rest/server-hardware-types/BCAB376E-DA2E-450D-B053-0A9AE7E5114C - # serverHardwareTypeName: SY 480 Gen9 1 - # You can choose either enclosureName or enclosureUri to inform the Enclosure - # enclosureUri: /rest/enclosures/09SGH100Z6J1 - enclosureName: 0000A66102 - sanStorage: - hostOSType: Windows 2012 / WS2012 R2 - manageSanStorage: true - volumeAttachments: - - id: 1 - # You can choose either volumeName or volumeUri to inform the Volumes - # volumeName: DemoVolume001 - volumeUri: /rest/storage-volumes/BCAB376E-DA2E-450D-B053-0A9AE7E5114C - # You can choose either volumeStoragePoolUri or volumeStoragePoolName to inform the Volume Storage Pool - # volumeStoragePoolName: FST_CPG2 - volumeStoragePoolUri: /rest/storage-pools/30303437-3933-4753-4831-30335835524E - # You can choose either volumeStorageSystemUri or volumeStorageSystemName to inform the Volume Storage - # System - # volumeStorageSystemName: ThreePAR7200-2127 - volumeStorageSystemUri: /rest/storage-systems/TXQ1000307 - lunType: 'Auto' - storagePaths: - - isEnabled: true - connectionId: 1 - storageTargetType: Auto - - isEnabled: true - connectionId: 2 - storageTargetType: Auto + name: Web-Server-L2 + # You can choose either server_template or serverProfileTemplateUri to inform the Server Profile Template + # serverProfileTemplateUri: "/rest/server-profile-templates/31ade62c-2112-40a0-935c-2f9450a75198" + server_template: Compute-node-template + # You can inform a server_hardware or a serverHardwareUri. If any hardware was informed, it will try + # get one available automatically + # server_hardware: Encl1, bay 12 + # serverHardwareUri: /rest/server-hardware/30303437-3933-4753-4831-30335835524E + + # You can choose either serverHardwareTypeUri or serverHardwareTypeName to inform the Server Hardware Type + # serverHardwareTypeUri: /rest/server-hardware-types/BCAB376E-DA2E-450D-B053-0A9AE7E5114C + # serverHardwareTypeName: SY 480 Gen9 1 + # You can choose either enclosureName or enclosureUri to inform the Enclosure + # enclosureUri: /rest/enclosures/09SGH100Z6J1 + enclosureName: 0000A66102 + sanStorage: + hostOSType: Windows 2012 / WS2012 R2 + manageSanStorage: true + volumeAttachments: + - id: 1 + # You can choose either volumeName or volumeUri to inform the Volumes + # volumeName: DemoVolume001 + volumeUri: /rest/storage-volumes/BCAB376E-DA2E-450D-B053-0A9AE7E5114C + # You can choose either volumeStoragePoolUri or volumeStoragePoolName to inform the Volume Storage Pool + # volumeStoragePoolName: FST_CPG2 + volumeStoragePoolUri: /rest/storage-pools/30303437-3933-4753-4831-30335835524E + # You can choose either volumeStorageSystemUri or volumeStorageSystemName to inform the Volume Storage + # System + # volumeStorageSystemName: ThreePAR7200-2127 + volumeStorageSystemUri: /rest/storage-systems/TXQ1000307 + lunType: 'Auto' + storagePaths: + - isEnabled: true + connectionId: 1 + storageTargetType: Auto + - isEnabled: true + connectionId: 2 + storageTargetType: Auto delegate_to: localhost - debug: var=server_profile - debug: var=serial_number @@ -172,14 +172,14 @@ password: my_password api_version: 1600 # This is required for unassigning a SH, or creating a SP and not auto-assigning a SH - auto_assign_server_hardware: False + auto_assign_server_hardware: false data: name: server-profile-with-sh # Specify a blank serverHardwareName or serverHardwareUri when auto_assign_server_hardware is False to unassign a SH serverHardwareName: delegate_to: localhost -- name : Remediate compliance issues +- name: Remediate compliance issues oneview_server_profile: hostname: 172.16.101.48 username: administrator @@ -187,10 +187,10 @@ api_version: 1600 state: compliant data: - name: Web-Server-L2 + name: Web-Server-L2 delegate_to: localhost -- name : Remove the server profile +- name: Remove the server profile oneview_server_profile: hostname: 172.16.101.48 username: administrator @@ -198,7 +198,7 @@ api_version: 1600 state: absent data: - name: Web-Server-L2 + name: Web-Server-L2 delegate_to: localhost ''' diff --git a/plugins/modules/oneview_server_profile_facts.py b/plugins/modules/oneview_server_profile_facts.py index 66310dd8..1439e759 100644 --- a/plugins/modules/oneview_server_profile_facts.py +++ b/plugins/modules/oneview_server_profile_facts.py @@ -138,30 +138,30 @@ username: administrator password: my_password api_version: 1600 - name : "Encl1, bay 1" + name: "Encl1, bay 1" options: - - schema - - compliancePreview - - newProfileTemplate - - profilePorts: - enclosureGroupUri: '/rest/enclosure-groups/3af25c76-dec7-4753-83f6-e1ad06c29a43' - serverHardwareTypeUri: '/rest/server-hardware-types/C8DEF9A6-9586-465E-A951-3070988BC226' - - messages - - transformation: - enclosureGroupUri: '/rest/enclosure-groups/3af25c76-dec7-4753-83f6-e1ad06c29a43' - serverHardwareTypeUri: '/rest/server-hardware-types/C8DEF9A6-9586-465E-A951-3070988BC226' - - availableNetworks: - enclosureGroupUri: '/rest/enclosure-groups/3af25c76-dec7-4753-83f6-e1ad06c29a43' - serverHardwareTypeUri: '/rest/server-hardware-types/C8DEF9A6-9586-465E-A951-3070988BC226' - - availableServers - - availableStorageSystem: - storageSystemId: "{{storage_system_id}}" - enclosureGroupUri: '/rest/enclosure-groups/3af25c76-dec7-4753-83f6-e1ad06c29a43' - serverHardwareTypeUri: '/rest/server-hardware-types/C8DEF9A6-9586-465E-A951-3070988BC226' - - availableStorageSystems: - enclosureGroupUri: '/rest/enclosure-groups/3af25c76-dec7-4753-83f6-e1ad06c29a43' - serverHardwareTypeUri: '/rest/server-hardware-types/C8DEF9A6-9586-465E-A951-3070988BC226' - - availableTargets + - schema + - compliancePreview + - newProfileTemplate + - profilePorts: + enclosureGroupUri: '/rest/enclosure-groups/3af25c76-dec7-4753-83f6-e1ad06c29a43' + serverHardwareTypeUri: '/rest/server-hardware-types/C8DEF9A6-9586-465E-A951-3070988BC226' + - messages + - transformation: + enclosureGroupUri: '/rest/enclosure-groups/3af25c76-dec7-4753-83f6-e1ad06c29a43' + serverHardwareTypeUri: '/rest/server-hardware-types/C8DEF9A6-9586-465E-A951-3070988BC226' + - availableNetworks: + enclosureGroupUri: '/rest/enclosure-groups/3af25c76-dec7-4753-83f6-e1ad06c29a43' + serverHardwareTypeUri: '/rest/server-hardware-types/C8DEF9A6-9586-465E-A951-3070988BC226' + - availableServers + - availableStorageSystem: + storageSystemId: "{{storage_system_id}}" + enclosureGroupUri: '/rest/enclosure-groups/3af25c76-dec7-4753-83f6-e1ad06c29a43' + serverHardwareTypeUri: '/rest/server-hardware-types/C8DEF9A6-9586-465E-A951-3070988BC226' + - availableStorageSystems: + enclosureGroupUri: '/rest/enclosure-groups/3af25c76-dec7-4753-83f6-e1ad06c29a43' + serverHardwareTypeUri: '/rest/server-hardware-types/C8DEF9A6-9586-465E-A951-3070988BC226' + - availableTargets delegate_to: localhost diff --git a/plugins/modules/oneview_server_profile_template.py b/plugins/modules/oneview_server_profile_template.py index 5677e21f..4a322b32 100644 --- a/plugins/modules/oneview_server_profile_template.py +++ b/plugins/modules/oneview_server_profile_template.py @@ -90,7 +90,7 @@ serverHardwareTypeUri: "/rest/server-hardware-types/94B55683-173F-4B36-8FA6-EC250BA2328B" enclosureGroupUri: "/rest/enclosure-groups/ad5e9e88-b858-4935-ba58-017d60a17c89" params: - force: True + force: true delegate_to: localhost - name: Create a basic connection-less server profile template (using names) @@ -105,7 +105,7 @@ serverHardwareTypeName: "BL460c Gen8 1" enclosureGroupName: "EGSAS_3" params: - force: True + force: true delegate_to: localhost - name: Rename Server Profile Template @@ -131,7 +131,7 @@ data: name: "ProfileTemplate101" params: - force: True + force: true delegate_to: localhost ''' diff --git a/plugins/modules/oneview_server_profile_template_facts.py b/plugins/modules/oneview_server_profile_template_facts.py index 60f0b6a2..19a316e8 100644 --- a/plugins/modules/oneview_server_profile_template_facts.py +++ b/plugins/modules/oneview_server_profile_template_facts.py @@ -123,7 +123,6 @@ serverHardwareTypeUri: "/rest/server-hardware-types/253F1D49-0FEE-4DCD-B14C-B26234E9D414" enclosureGroupUri: "/rest/enclosure-groups/293e8efe-c6b1-4783-bf88-2d35a8e49071" delegate_to: localhost - ''' RETURN = ''' diff --git a/plugins/modules/oneview_storage_pool.py b/plugins/modules/oneview_storage_pool.py index 2c49279c..665ec09e 100644 --- a/plugins/modules/oneview_storage_pool.py +++ b/plugins/modules/oneview_storage_pool.py @@ -70,8 +70,8 @@ api_version: 300 state: present data: - storageSystemUri: "/rest/storage-systems/TXQ1010307" - poolName: "FST_CPG2" + storageSystemUri: "/rest/storage-systems/TXQ1010307" + poolName: "FST_CPG2" delegate_to: localhost - name: Delete the Storage Pool (prior to API500) oneview_storage_pool: @@ -81,7 +81,7 @@ api_version: 300 state: absent data: - poolName: "FST_CPG2" + poolName: "FST_CPG2" delegate_to: localhost - name: Ensure the storage pool 'FST_CPG2' is managed by the appliance (API500 onwards) oneview_storage_pool: @@ -91,9 +91,9 @@ api_version: 1200 state: present data: - storageSystemUri: "/rest/storage-systems/TXQ1010307" - poolName: FST_CPG2 - isManaged: True + storageSystemUri: "/rest/storage-systems/TXQ1010307" + poolName: FST_CPG2 + isManaged: true delegate_to: localhost - name: Ensure the storage pool 'FST_CPG2' is unmanaged (API500 onwards) oneview_storage_pool: @@ -103,9 +103,9 @@ api_version: 1200 state: present data: - storageSystemUri: "/rest/storage-systems/TXQ1010307" - poolName: FST_CPG2 - isManaged: False + storageSystemUri: "/rest/storage-systems/TXQ1010307" + poolName: FST_CPG2 + isManaged: false delegate_to: localhost ''' diff --git a/plugins/modules/oneview_storage_pool_facts.py b/plugins/modules/oneview_storage_pool_facts.py index 2cfaa5d6..1d023394 100644 --- a/plugins/modules/oneview_storage_pool_facts.py +++ b/plugins/modules/oneview_storage_pool_facts.py @@ -95,16 +95,16 @@ password: my_password api_version: 1200 options: - - reachableStoragePools + - reachableStoragePools params: - sort: 'name:ascending' - filter: status='OK' - networks: - - /rest/network/123456A - - /rest/network/123456B - scope_exclusions: - - /rest/storage-pools/5F9CA89B-C632-4F09-BC55-A8AA00DA5C4A - scope_uris: '/rest/scopes/754e0dce-3cbd-4188-8923-edf86f068bf7' + sort: 'name:ascending' + filter: status='OK' + networks: + - /rest/network/123456A + - /rest/network/123456B + scope_exclusions: + - /rest/storage-pools/5F9CA89B-C632-4F09-BC55-A8AA00DA5C4A + scope_uris: '/rest/scopes/754e0dce-3cbd-4188-8923-edf86f068bf7' delegate_to: localhost - debug: var=storage_pools_reachable_storage_pools ''' diff --git a/plugins/modules/oneview_storage_system.py b/plugins/modules/oneview_storage_system.py index 5fadec82..605e98c5 100644 --- a/plugins/modules/oneview_storage_system.py +++ b/plugins/modules/oneview_storage_system.py @@ -65,16 +65,16 @@ api_version: 1200 state: present data: - credentials: - ip_hostname: '{{ storage_system_ip_hostname }}' - username: '{{ storage_system_username }}' - password: '{{ storage_system_password }}' - managedDomain: TestDomain - managedPools: - - domain: TestDomain - type: StoragePoolV2 - name: CPG_FC-AO - deviceType: FC + credentials: + ip_hostname: '{{ storage_system_ip_hostname }}' + username: '{{ storage_system_username }}' + password: '{{ storage_system_password }}' + managedDomain: TestDomain + managedPools: + - domain: TestDomain + type: StoragePoolV2 + name: CPG_FC-AO + deviceType: FC delegate_to: localhost @@ -87,17 +87,17 @@ state: present data: credentials: - username: '{{ storage_system_username }}' - password: '{{ storage_system_password }}' + username: '{{ storage_system_username }}' + password: '{{ storage_system_password }}' hostname: '{{ storage_system_ip }}' family: StoreServ deviceSpecificAttributes: - managedDomain: TestDomain - managedPools: - - domain: TestDomain - type: StoragePoolV2 - name: CPG_FC-AO - deviceType: FC + managedDomain: TestDomain + managedPools: + - domain: TestDomain + type: StoragePoolV2 + name: CPG_FC-AO + deviceType: FC delegate_to: localhost @@ -126,8 +126,8 @@ api_version: 1200 state: absent data: - credentials: - ip_hostname: 172.18.11.12 + credentials: + ip_hostname: 172.18.11.12 delegate_to: localhost - name: Remove the storage system by its IP (API500 onwards) @@ -138,8 +138,8 @@ api_version: 1200 state: absent data: - credentials: - hostname: 172.18.11.12 + credentials: + hostname: 172.18.11.12 delegate_to: localhost ''' diff --git a/plugins/modules/oneview_storage_system_facts.py b/plugins/modules/oneview_storage_system_facts.py index 7a5b8c59..82587dc8 100644 --- a/plugins/modules/oneview_storage_system_facts.py +++ b/plugins/modules/oneview_storage_system_facts.py @@ -132,8 +132,8 @@ api_version: 1200 name: "ThreePAR7200-4555" options: - - hostTypes - - storagePools + - hostTypes + - storagePools delegate_to: localhost - debug: var=storage_systems @@ -147,7 +147,7 @@ password: my_password api_version: 1200 options: - - reachablePorts + - reachablePorts params: networks: - /rest/fc-networks/01FC123456 diff --git a/plugins/modules/oneview_storage_volume_attachment_facts.py b/plugins/modules/oneview_storage_volume_attachment_facts.py index e99ca911..cd842b7e 100644 --- a/plugins/modules/oneview_storage_volume_attachment_facts.py +++ b/plugins/modules/oneview_storage_volume_attachment_facts.py @@ -125,10 +125,10 @@ api_version: 1200 options: - extraUnmanagedStorageVolumes: - start: 0 # optional - count: '-1' # optional - filter: '' # optional - sort: '' # optional + start: 0 # optional + count: '-1' # optional + filter: '' # optional + sort: '' # optional delegate_to: localhost - debug: var=storage_volume_attachments @@ -159,9 +159,9 @@ storageVolumeUri: "/rest/storage-volumes/12345-AAA-BBBB-CCCC-121212AA" options: - paths: - # You could inform either the path id or the path uri - pathId: '9DFC8953-15A4-4EA9-AB65-23AB12AB23' # optional - # pathUri: '/rest/storage-volume-attachments/123-123-123/paths/123-123-123' + # You could inform either the path id or the path uri + pathId: '9DFC8953-15A4-4EA9-AB65-23AB12AB23' # optional + # pathUri: '/rest/storage-volume-attachments/123-123-123/paths/123-123-123' delegate_to: localhost - debug: var=storage_volume_attachments diff --git a/plugins/modules/oneview_storage_volume_template.py b/plugins/modules/oneview_storage_volume_template.py index 57ceb0c0..b9e53e46 100644 --- a/plugins/modules/oneview_storage_volume_template.py +++ b/plugins/modules/oneview_storage_volume_template.py @@ -68,10 +68,10 @@ api_version: 1200 state: present data: - name: "Volume Template Name" - description: "Example Template" - rootTemplateUri: "/rest/storage-volume-templates/5dbaf127-053b-4988-82fe-a80800eef1f3" - properties: {} + name: "Volume Template Name" + description: "Example Template" + rootTemplateUri: "/rest/storage-volume-templates/5dbaf127-053b-4988-82fe-a80800eef1f3" + properties: {} delegate_to: localhost @@ -83,7 +83,7 @@ api_version: 1200 state: absent data: - name: 'Volume Template Name' + name: 'Volume Template Name' delegate_to: localhost ''' diff --git a/plugins/modules/oneview_task.py b/plugins/modules/oneview_task.py index 3fddb418..74438147 100644 --- a/plugins/modules/oneview_task.py +++ b/plugins/modules/oneview_task.py @@ -52,25 +52,25 @@ EXAMPLES = ''' tasks: - - name: Gather facts about the last 5 running tasks - oneview_task_facts: - config: "{{ config }}" - params: - count: 5 - view: "tree" - filter: ["taskState='Running'", "isCancellable=true"] - delegate_to: localhost - - - debug: var=tasks - - - name: Sets the state of task to 'Cancelling' - oneview_task: - config: "{{ config }}" - data: - name: "{{ tasks[0]['name'] }}" - uri: "{{ tasks[0]['uri'] }}" - delegate_to: localhost - when: contents.api_version >= 1200 and ( tasks | length > 0 ) + - name: Gather facts about the last 5 running tasks + oneview_task_facts: + config: "{{ config }}" + params: + count: 5 + view: "tree" + filter: ["taskState='Running'", "isCancellable=true"] + delegate_to: localhost + + - debug: var=tasks + + - name: Sets the state of task to 'Cancelling' + oneview_task: + config: "{{ config }}" + data: + name: "{{ tasks[0]['name'] }}" + uri: "{{ tasks[0]['uri'] }}" + delegate_to: localhost + when: contents.api_version >= 1200 and ( tasks | length > 0 ) ''' RETURN = ''' diff --git a/plugins/modules/oneview_task_facts.py b/plugins/modules/oneview_task_facts.py index b5a282cc..3a144dc3 100644 --- a/plugins/modules/oneview_task_facts.py +++ b/plugins/modules/oneview_task_facts.py @@ -79,12 +79,12 @@ - name: Gather facts about aggregate tree of tasks with specified filter oneview_task_facts: - config: "{{ config }}" - params: - childLimit: 40 - topCount: 2 - view: "aggregatedTree" - filter: "taskState='Completed'" + config: "{{ config }}" + params: + childLimit: 40 + topCount: 2 + view: "aggregatedTree" + filter: "taskState='Completed'" - name: Gather facts about the last 5 tasks with state 'Completed' oneview_task_facts: diff --git a/plugins/modules/oneview_uplink_set.py b/plugins/modules/oneview_uplink_set.py index 414f4c1a..486ca6fe 100644 --- a/plugins/modules/oneview_uplink_set.py +++ b/plugins/modules/oneview_uplink_set.py @@ -80,8 +80,8 @@ logicalInterconnectName: "Name of the Logical Interconnect" # option 1 # logicalInterconnectUri: "/rest/logical-interconnects/461a9cef-beef-4916-8be1-926078ffb948" # option 2 networkUris: [ - '/rest/ethernet-networks/9e8472ad-5ad1-4cbd-aab1-566b67ffc6a4', - '/rest/ethernet-networks/28ea7c1a-4930-4432-854b-30cf239226a2' + '/rest/ethernet-networks/9e8472ad-5ad1-4cbd-aab1-566b67ffc6a4', + '/rest/ethernet-networks/28ea7c1a-4930-4432-854b-30cf239226a2' ] fcNetworkUris: [] fcoeNetworkUris: [] diff --git a/plugins/modules/oneview_user_facts.py b/plugins/modules/oneview_user_facts.py index 2908e0cd..f17b33d7 100644 --- a/plugins/modules/oneview_user_facts.py +++ b/plugins/modules/oneview_user_facts.py @@ -104,7 +104,7 @@ config: "{{ config }}" userName: "testUser" options: - - getUserRoles + - getUserRoles delegate_to: localhost - debug: var=users diff --git a/plugins/modules/oneview_volume.py b/plugins/modules/oneview_volume.py index 997e2c59..e957718f 100644 --- a/plugins/modules/oneview_volume.py +++ b/plugins/modules/oneview_volume.py @@ -161,7 +161,7 @@ storageSystemUri: '/rest/storage-systems/TXQ1000307' wwn: 'DC:32:13:72:47:00:10:00:30:71:47:16:33:58:47:95' provisioningParameters: - shareable: True + shareable: true when: wwn is defined - name: Update the name of the volume to 'Volume with Storage Pool - Renamed' and shareable to false @@ -174,7 +174,7 @@ data: name: 'Volume with Storage Pool' newName: 'Volume with Storage Pool - Renamed' - isShareable: False + isShareable: false delegate_to: localhost - name: Remove extra presentations from the specified volume on the storage system @@ -241,7 +241,7 @@ state: absent data: name: 'Volume added with a specific WWN' - export_only: True + export_only: true ''' RETURN = ''' diff --git a/plugins/modules/oneview_volume_facts.py b/plugins/modules/oneview_volume_facts.py index ef5152fd..936a6190 100644 --- a/plugins/modules/oneview_volume_facts.py +++ b/plugins/modules/oneview_volume_facts.py @@ -91,8 +91,8 @@ password: my_password api_version: 1200 options: - - attachableVolumes # optional - - extraManagedVolumePaths # optional + - attachableVolumes # optional + - extraManagedVolumePaths # optional - debug: var=storage_volumes - debug: var=attachable_volumes - debug: var=extra_managed_volume_paths @@ -106,7 +106,7 @@ api_version: 1200 name: "{{ volume_name }}" options: - - snapshots # optional + - snapshots # optional - debug: var=storage_volumes - debug: var=snapshots @@ -119,8 +119,8 @@ api_version: 1200 name: "{{ volume_name }}" options: - - snapshots: # optional - name: "{{ snapshot_name }}" + - snapshots: # optional + name: "{{ snapshot_name }}" - debug: var=storage_volumes - debug: var=snapshots '''