-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #377 from gzecchi/develop
Release v5.2.0 - Added the capability to handle OneView Appliance SNMP Settings
- Loading branch information
Showing
31 changed files
with
3,172 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
### | ||
# Copyright (2016-2017) Hewlett Packard Enterprise Development LP | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# You may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
### | ||
--- | ||
- hosts: all | ||
vars: | ||
- config: "{{ playbook_dir }}/oneview_config.json" | ||
tasks: | ||
- name: Ensure that the Appliance Device Read Community is present with Community String 'public' | ||
oneview_appliance_device_read_community: | ||
config: "{{ config }}" | ||
state: present | ||
data: | ||
communityString: 'public' | ||
delegate_to: localhost | ||
|
||
- debug: | ||
var: appliance_device_read_community |
27 changes: 27 additions & 0 deletions
27
examples/oneview_appliance_device_read_community_facts.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
### | ||
# Copyright (2016-2017) Hewlett Packard Enterprise Development LP | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# You may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
### | ||
--- | ||
- hosts: all | ||
vars: | ||
- config: "{{ playbook_dir }}/oneview_config.json" | ||
tasks: | ||
- name: Gather facts about the Appliance snmp configuration | ||
oneview_appliance_device_read_community_facts: | ||
config: "{{ config }}" | ||
delegate_to: localhost | ||
|
||
- debug: | ||
var: appliance_device_read_community |
64 changes: 64 additions & 0 deletions
64
examples/oneview_appliance_device_snmp_v1_trap_destinations.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
### | ||
# Copyright (2016-2017) Hewlett Packard Enterprise Development LP | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# You may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
### | ||
--- | ||
- hosts: all | ||
vars: | ||
- config: "{{ playbook_dir }}/oneview_config.json" | ||
tasks: | ||
- name: Create or Update an Appliance Device SNMPv1 Trap Destination by Destination Address | ||
oneview_appliance_device_snmp_v1_trap_destinations: | ||
config: "{{ config }}" | ||
state: present | ||
data: | ||
communityString: "public" | ||
destination: "10.0.0.1" | ||
port: 162 | ||
delegate_to: localhost | ||
|
||
- debug: | ||
var: appliance_device_snmp_v1_trap_destinations | ||
|
||
- name: Create or Update an Appliance Device SNMPv1 Trap Destination by URI | ||
oneview_appliance_device_snmp_v1_trap_destinations: | ||
config: "{{ config }}" | ||
state: present | ||
data: | ||
communityString: "private" | ||
uri: "/rest/appliance/trap-destinations/1" | ||
port: 162 | ||
delegate_to: localhost | ||
|
||
- debug: | ||
var: appliance_device_snmp_v1_trap_destinations | ||
|
||
- name: Delete an Appliance Device SNMPv1 Trap Destination by Destination Address | ||
oneview_appliance_device_snmp_v1_trap_destinations: | ||
config: "{{ config }}" | ||
state: absent | ||
data: | ||
destination: "10.0.0.1" | ||
delegate_to: localhost | ||
|
||
- name: Delete an Appliance Device SNMPv1 Trap Destination by URI | ||
oneview_appliance_device_snmp_v1_trap_destinations: | ||
config: "{{ config }}" | ||
state: absent | ||
data: | ||
uri: "/rest/appliance/trap-destinations/1" | ||
delegate_to: localhost | ||
|
||
- debug: | ||
var: appliance_device_snmp_v1_trap_destinations |
58 changes: 58 additions & 0 deletions
58
examples/oneview_appliance_device_snmp_v1_trap_destinations_facts.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
### | ||
# Copyright (2016-2017) Hewlett Packard Enterprise Development LP | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# You may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
### | ||
--- | ||
- hosts: all | ||
vars: | ||
- config: "{{ playbook_dir }}/oneview_config.json" | ||
tasks: | ||
- name: Gather facts about all appliance SNMPv1 trap forwarding destinations. | ||
oneview_appliance_device_snmp_v1_trap_destinations_facts: | ||
config: "{{ config_file_path }}" | ||
delegate_to: localhost | ||
|
||
- debug: | ||
var: appliance_device_snmp_v1_trap_destinations | ||
|
||
- name: Gather paginated, filtered and sorted facts about SNMPv1 trap forwarding destinations | ||
oneview_appliance_device_snmp_v1_trap_destinations_facts: | ||
config: "{{ config }}" | ||
params: | ||
start: 0 | ||
count: 3 | ||
sort: 'destination:descending' | ||
filter: "port='162'" | ||
delegate_to: localhost | ||
|
||
- debug: | ||
var: appliance_device_snmp_v1_trap_destinations | ||
|
||
- name: Gather facts about a Trap Destination by ID | ||
oneview_appliance_device_snmp_v1_trap_destinations_facts: | ||
config: "{{ config }}" | ||
id: "1" | ||
delegate_to: localhost | ||
|
||
- debug: | ||
var: appliance_device_snmp_v1_trap_destinations | ||
|
||
- name: Gather facts about a Trap Destination by Destination | ||
oneview_appliance_device_snmp_v1_trap_destinations_facts: | ||
config: "{{ config }}" | ||
destination: "1.1.1.1" | ||
delegate_to: localhost | ||
|
||
- debug: | ||
var: appliance_device_snmp_v1_trap_destinations |
53 changes: 53 additions & 0 deletions
53
examples/oneview_appliance_device_snmp_v3_trap_destinations.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
### | ||
# Copyright (2016-2017) Hewlett Packard Enterprise Development LP | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# You may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
### | ||
--- | ||
- hosts: all | ||
vars: | ||
- config: "{{ playbook_dir }}/oneview_config.json" | ||
tasks: | ||
- name: Ensure that the SNMPv3 Trap Destination is present | ||
oneview_appliance_device_snmp_v3_trap_destinations: | ||
config: "{{ config }}" | ||
state: present | ||
data: | ||
type: "Destination" | ||
destinationAddress: "10.0.0.1" | ||
port: 162 | ||
userId: "8e57d829-2f17-4167-ae23-8fb46607c76c" | ||
delegate_to: localhost | ||
|
||
- debug: | ||
var: oneview_appliance_device_snmp_v3_trap_destinations | ||
|
||
- name: Update the userId of specified SNMPv3 Trap Destination | ||
oneview_appliance_device_snmp_v3_trap_destinations: | ||
config: "{{ config }}" | ||
state: present | ||
data: | ||
destinationAddress: "10.0.0.1" | ||
userId: "3953867c-5283-4059-a9ae-33487f901e85" | ||
delegate_to: localhost | ||
|
||
- debug: | ||
var: oneview_appliance_device_snmp_v3_trap_destinations | ||
|
||
- name: Ensure that the SNMPv3 Trap Destination is absent | ||
oneview_appliance_device_snmp_v3_trap_destinations: | ||
config: "{{ config }}" | ||
state: absent | ||
data: | ||
destinationAddress: "10.0.0.1" | ||
delegate_to: localhost |
49 changes: 49 additions & 0 deletions
49
examples/oneview_appliance_device_snmp_v3_trap_destinations_facts.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
### | ||
# Copyright (2016-2017) Hewlett Packard Enterprise Development LP | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# You may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
### | ||
--- | ||
- hosts: all | ||
vars: | ||
- config: "{{ playbook_dir }}/oneview_config.json" | ||
tasks: | ||
- name: Gather facts about the appliance SNMPv3 trap forwarding destinations. | ||
oneview_appliance_device_snmp_v3_trap_destinations_facts: | ||
config: "{{ config }}" | ||
delegate_to: localhost | ||
|
||
- debug: | ||
var: appliance_device_snmp_v3_trap_destinations | ||
|
||
- name: Gather paginated, filtered and sorted facts about SNMPv3 trap forwarding destinations | ||
oneview_appliance_device_snmp_v3_trap_destinations_facts: | ||
config: "{{ config }}" | ||
params: | ||
start: 0 | ||
count: 3 | ||
sort: 'destinationAddress:descending' | ||
filter: "port='162'" | ||
delegate_to: localhost | ||
|
||
- debug: | ||
var: appliance_device_snmp_v3_trap_destinations | ||
|
||
- name: Gather facts about a Trap Destination by ID | ||
oneview_appliance_device_snmp_v3_trap_destinations_facts: | ||
config: "{{ config }}" | ||
id: "19dc6a96-bd04-4724-819b-32bc660fcefc" | ||
delegate_to: localhost | ||
|
||
- debug: | ||
var: appliance_device_snmp_v3_trap_destinations |
Oops, something went wrong.