diff --git a/examples/oneview_enclosure_group.yml b/examples/oneview_enclosure_group.yml index 06b0abbf..e8a35ad3 100644 --- a/examples/oneview_enclosure_group.yml +++ b/examples/oneview_enclosure_group.yml @@ -24,7 +24,7 @@ state: present data: name: "Enclosure Group 1" - stackingMode: "Enclosure" + stackingMode: "Enclosure" # Not supported in V600 interconnectBayMappings: - interconnectBay: 1 - interconnectBay: 2 @@ -43,7 +43,7 @@ state: present data: name: "Enclosure Group 1" - stackingMode: "Enclosure" + stackingMode: "Enclosure" # Not supported in V600 interconnectBayMappings: - interconnectBay: 1 - interconnectBay: 2 diff --git a/examples/oneview_enclosure_group_facts.yml b/examples/oneview_enclosure_group_facts.yml index 4d0afc04..3764fae5 100644 --- a/examples/oneview_enclosure_group_facts.yml +++ b/examples/oneview_enclosure_group_facts.yml @@ -18,6 +18,7 @@ vars: - config: "{{ playbook_dir }}/oneview_config.json" - name: "Enclosure Group 1" + - scope_uris: "/rest/scopes/cd237b60-09e2-45c4-829e-082e318a6d2a" tasks: - name: Gather facts about all Enclosure Groups oneview_enclosure_group_facts: @@ -34,6 +35,7 @@ count: 3 sort: 'name:descending' filter: 'status=OK' + scope_uris: '{{ scope_uris }}' - debug: var=enclosure_groups diff --git a/library/oneview_enclosure_group.py b/library/oneview_enclosure_group.py index ce5d27bb..9f0133c5 100644 --- a/library/oneview_enclosure_group.py +++ b/library/oneview_enclosure_group.py @@ -29,7 +29,7 @@ version_added: "2.3" requirements: - "python >= 2.7.9" - - "hpOneView >= 3.1.0" + - "hpOneView >= 4.5.0" author: "Gustavo Hennig (@GustavoHennig)" options: state: @@ -50,11 +50,14 @@ EXAMPLES = ''' - name: Ensure that Enclosure Group is present using the default configuration oneview_enclosure_group: - config: "{{ config_file_name }}" + hostname: 172.16.101.48 + username: administrator + password: my_password + api_version: 600 state: present data: name: "Enclosure Group 1" - stackingMode: "Enclosure" + stackingMode: "Enclosure" # Not supported in V600 interconnectBayMappings: - interconnectBay: 1 - interconnectBay: 2 @@ -68,7 +71,10 @@ - name: Update the Enclosure Group changing the name attribute oneview_enclosure_group: - config: "{{ config_file_name }}" + hostname: 172.16.101.48 + username: administrator + password: my_password + api_version: 600 state: present data: name: "Enclosure Group 1" @@ -77,7 +83,10 @@ - name: Ensure that Enclosure Group is absent oneview_enclosure_group: - config: "{{ config_file_name }}" + hostname: 172.16.101.48 + username: administrator + password: my_password + api_version: 600 state: absent data: name: "Enclosure Group 1 (renamed)" diff --git a/library/oneview_enclosure_group_facts.py b/library/oneview_enclosure_group_facts.py index bc0344f0..6517a4e1 100644 --- a/library/oneview_enclosure_group_facts.py +++ b/library/oneview_enclosure_group_facts.py @@ -29,7 +29,7 @@ version_added: "2.3" requirements: - "python >= 2.7.9" - - "hpOneView >= 2.0.1" + - "hpOneView >= 4.5.0" author: - "Gustavo Hennig (@GustavoHennig)" - "Bruno Souza (@bsouza)" @@ -53,25 +53,35 @@ EXAMPLES = ''' - name: Gather facts about all Enclosure Groups oneview_enclosure_group_facts: - config: "{{ config_file_path }}" + hostname: 172.16.101.48 + username: administrator + password: my_password + api_version: 600 delegate_to: localhost - debug: var=enclosure_groups - name: Gather paginated, filtered and sorted facts about Enclosure Groups oneview_enclosure_group_facts: - config: "{{ config }}" + hostname: 172.16.101.48 + username: administrator + password: my_password + api_version: 600 params: start: 0 count: 3 sort: 'name:descending' filter: 'status=OK' + scope_uris: '/rest/scopes/cd237b60-09e2-45c4-829e-082e318a6d2a' - debug: var=enclosure_groups - name: Gather facts about an Enclosure Group by name with configuration script oneview_enclosure_group_facts: - config: "{{ config_file_path }}" + hostname: 172.16.101.48 + username: administrator + password: my_password + api_version: 600 name: "Test Enclosure Group Facts" options: - configuration_script diff --git a/oneview-ansible.md b/oneview-ansible.md index 94e05704..cf83fc9a 100755 --- a/oneview-ansible.md +++ b/oneview-ansible.md @@ -2288,7 +2288,7 @@ Manage OneView Enclosure Group resources. #### Requirements (on the host that executes the module) * python >= 2.7.9 - * hpOneView >= 3.1.0 + * hpOneView >= 4.5.0 #### Options @@ -2306,11 +2306,14 @@ Manage OneView Enclosure Group resources. - name: Ensure that Enclosure Group is present using the default configuration oneview_enclosure_group: - config: "{{ config_file_name }}" + hostname: 172.16.101.48 + username: administrator + password: my_password + api_version: 600 state: present data: name: "Enclosure Group 1" - stackingMode: "Enclosure" + stackingMode: "Enclosure" # Not supported in V600 interconnectBayMappings: - interconnectBay: 1 - interconnectBay: 2 @@ -2324,7 +2327,10 @@ Manage OneView Enclosure Group resources. - name: Update the Enclosure Group changing the name attribute oneview_enclosure_group: - config: "{{ config_file_name }}" + hostname: 172.16.101.48 + username: administrator + password: my_password + api_version: 600 state: present data: name: "Enclosure Group 1" @@ -2333,7 +2339,10 @@ Manage OneView Enclosure Group resources. - name: Ensure that Enclosure Group is absent oneview_enclosure_group: - config: "{{ config_file_name }}" + hostname: 172.16.101.48 + username: administrator + password: my_password + api_version: 600 state: absent data: name: "Enclosure Group 1 (renamed)" @@ -2370,7 +2379,7 @@ Retrieve facts about one or more of the OneView Enclosure Groups. #### Requirements (on the host that executes the module) * python >= 2.7.9 - * hpOneView >= 2.0.1 + * hpOneView >= 4.5.0 #### Options @@ -2389,25 +2398,35 @@ Retrieve facts about one or more of the OneView Enclosure Groups. - name: Gather facts about all Enclosure Groups oneview_enclosure_group_facts: - config: "{{ config_file_path }}" + hostname: 172.16.101.48 + username: administrator + password: my_password + api_version: 600 delegate_to: localhost - debug: var=enclosure_groups - name: Gather paginated, filtered and sorted facts about Enclosure Groups oneview_enclosure_group_facts: - config: "{{ config }}" + hostname: 172.16.101.48 + username: administrator + password: my_password + api_version: 600 params: start: 0 count: 3 sort: 'name:descending' filter: 'status=OK' + scope_uris: '/rest/scopes/cd237b60-09e2-45c4-829e-082e318a6d2a' - debug: var=enclosure_groups - name: Gather facts about an Enclosure Group by name with configuration script oneview_enclosure_group_facts: - config: "{{ config_file_path }}" + hostname: 172.16.101.48 + username: administrator + password: my_password + api_version: 600 name: "Test Enclosure Group Facts" options: - configuration_script