diff --git a/CHANGELOG.md b/CHANGELOG.md
index 561b66bbd..df3a21b83 100755
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,17 @@
# Ansible Modules for HPE OneView Change Log
+## v6.0.0(unreleased)
+This release extends the planned support of the modules to OneView REST API version 2600 (OneView v6.0)
+
+### Modules supported in this release
+- oneview_appliance_configuration_timeconfig
+- oneview_appliance_ssh_access
+- oneview_appliance_ssh_access_facts
+- oneview_appliance_time_and_locale_configuration
+- oneview_appliance_time_and_locale_configuration_facts
+- oneview_firmware_driver
+- oneview_firmware_driver_facts
+
## v5.10.0
This release extends the planned support of the modules to OneView REST API version 2400 (OneView v5.6).
diff --git a/endpoints-support.md b/endpoints-support.md
index ec074dd6c..41cc2e431 100755
--- a/endpoints-support.md
+++ b/endpoints-support.md
@@ -18,13 +18,15 @@
## HPE OneView
-| Endpoints | Verb | V500 | V600 | V800 | V1000 | V1200 | V1600 | V1800 | V2000 | V2200 | V2400 |
-| --------------------------------------------------------------------------------------- | -------- | :------------------: | :------------------: | :------------------: | :------------------: | :------------------: | :------------------: | :------------------: | :------------------: | :------------------: | :------------------: |
+| Endpoints | Verb | V500 | V600 | V800 | V1000 | V1200 | V1600 | V1800 | V2000 | V2200 | V2400 | V2600 |
+| --------------------------------------------------------------------------------------- | -------- | :------------------: | :------------------: | :------------------: | :------------------: | :------------------: | :------------------: | :------------------: | :------------------: | :------------------: | :------------------: | :------------------: |
| **Alerts** |
|/rest/alerts |GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| **Appliance Device Read Community String** |
|/rest/appliance/device-read-community-string |GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|/rest/appliance/device-read-community-string |PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
+| **Appliance Configuration Timeconfig**
+|/rest/appliance/configuration/timeconfig/locales |GET | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: |
| **Appliance SNMPv1 Trap Destinations** |
|/rest/appliance/trap-destinations |GET | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|/rest/appliance/trap-destinations/validation |POST | :white_check_mark: | :white_check_mark: | :white_check_mark: |
@@ -47,8 +49,11 @@
|/rest/appliance/snmpv3-trap-forwarding/users/{id} |PUT | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: |
|/rest/appliance/snmpv3-trap-forwarding/users/{id} |DELETE | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: |
| **Appliance Time and Locale Configuration** |
-|/rest/appliance/configuration/time-locale |GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
-|/rest/appliance/configuration/time-locale |POST | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
+|/rest/appliance/configuration/time-locale |GET | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
+|/rest/appliance/configuration/time-locale |POST | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
+| **Appliance SSH Access**
+|/rest/appliance/ssh-access |GET | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: |
+|/rest/appliance/ssh-access |PUT | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: |
| **Certificates Server**
|/rest/certificates/servers |POST | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|/rest/certificates/https/remote/example.com |GET | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
@@ -133,14 +138,15 @@
|/rest/fcoe-networks/{id} | PATCH | :white_check_mark: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: |
|/rest/fcoe-networks/{id} | PUT | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|/rest/fcoe-networks/{id} | DELETE | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
-|/rest/fcoe-networks/bulk-delete | POST | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
+|/rest/fcoe-networks/bulk-delete | POST | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| **Firmware Bundles** |
|/rest/firmware-bundles | POST | :white_check_mark: |
| **Firmware Drivers** |
-|/rest/firmware-drivers | GET | :white_check_mark: |
-|/rest/firmware-drivers | POST | :white_check_mark: |
-|/rest/firmware-drivers/{id} | GET | :white_check_mark: |
-|/rest/firmware-drivers/{id} | DELETE | :white_check_mark: |
+|/rest/firmware-drivers | GET | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: |
+|/rest/firmware-drivers | POST | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: |
+|/rest/firmware-drivers/schema | GET | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: |
+|/rest/firmware-drivers/{id} | GET | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: |
+|/rest/firmware-drivers/{id} | DELETE | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: |
| **Hypervisor Cluster Profiles**
|/rest/hypervisor-cluster-profiles |POST | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|/rest/hypervisor-cluster-profiles |GET | :heavy_minus_sign: | :heavy_minus_sign: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
diff --git a/examples/oneview_appliance_configuration_timeconfig_facts.yml b/examples/oneview_appliance_configuration_timeconfig_facts.yml
new file mode 100644
index 000000000..a7ea8cb6c
--- /dev/null
+++ b/examples/oneview_appliance_configuration_timeconfig_facts.yml
@@ -0,0 +1,26 @@
+###
+# Copyright (2021) 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 configuration Timeconfig
+ oneview_appliance_configuration_timeconfig_facts:
+ config: "{{ config }}"
+ delegate_to: localhost
+
+ - debug: var=appliance_configuration_timeconfig
diff --git a/examples/oneview_appliance_ssh_access.yml b/examples/oneview_appliance_ssh_access.yml
new file mode 100644
index 000000000..f8d7ef807
--- /dev/null
+++ b/examples/oneview_appliance_ssh_access.yml
@@ -0,0 +1,37 @@
+###
+# Copyright (2021) 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: Ensures the Appliance SSH Access is false
+ oneview_appliance_ssh_access:
+ config: "{{ config }}"
+ state: present
+ data:
+ allowSshAccess: False
+ delegate_to: localhost
+ - debug: var=appliance_ssh_access
+
+ - name: Ensures the Appliance SSH Access is true
+ oneview_appliance_ssh_access:
+ config: "{{ config }}"
+ state: present
+ data:
+ allowSshAccess: True
+ delegate_to: localhost
+ - debug: var=appliance_ssh_access
diff --git a/examples/oneview_appliance_time_and_locale_configuration.yml b/examples/oneview_appliance_time_and_locale_configuration.yml
index 9d05fc989..4431ecc6b 100644
--- a/examples/oneview_appliance_time_and_locale_configuration.yml
+++ b/examples/oneview_appliance_time_and_locale_configuration.yml
@@ -1,5 +1,5 @@
###
-# Copyright (2017) Hewlett Packard Enterprise Development LP
+# Copyright (2021) 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.
@@ -18,7 +18,31 @@
vars:
- config: "{{ playbook_dir }}/oneview_config.json"
tasks:
- - name: Ensures the Appliance time and locale configuration locale is en_US.UTF-8
+ - name: Add the Appliance time and locale configuration locale is ja_JP.UTF-8
+ oneview_appliance_time_and_locale_configuration:
+ config: "{{ config }}"
+ state: present
+ data:
+ locale: ja_JP.UTF-8
+ ntpServers: [16.110.135.123]
+ timezone: UTC
+ type: TimeAndLocale
+ delegate_to: localhost
+ - debug: var=appliance_time_and_locale_configuration
+
+ - name: Ensures the Appliance time and locale configuration locale is ja_JP.UTF-8 is already present
+ oneview_appliance_time_and_locale_configuration:
+ config: "{{ config }}"
+ state: present
+ data:
+ locale: ja_JP.UTF-8
+ ntpServers: [16.110.135.123]
+ timezone: UTC
+ type: TimeAndLocale
+ delegate_to: localhost
+ - debug: var=appliance_time_and_locale_configuration
+
+ - name: Change the Appliance time and locale configuration locale to en_US.UTF-8
oneview_appliance_time_and_locale_configuration:
config: "{{ config }}"
state: present
@@ -28,3 +52,4 @@
timezone: UTC
type: TimeAndLocale
delegate_to: localhost
+ - debug: var=appliance_time_and_locale_configuration
diff --git a/examples/oneview_firmware_driver.yml b/examples/oneview_firmware_driver.yml
index 9e2c41e4d..a3692ffc0 100644
--- a/examples/oneview_firmware_driver.yml
+++ b/examples/oneview_firmware_driver.yml
@@ -1,5 +1,5 @@
###
-# Copyright (2016-2017) Hewlett Packard Enterprise Development LP
+# Copyright (2021) 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.
@@ -17,9 +17,9 @@
- hosts: all
vars:
config: "{{ playbook_dir }}/oneview_config.json"
- firmware_name: "" # provide your firwmare name here
- baseline_firmware_name: "" # provide the name of the SPP to be used as base for the custom SPP creation
- hotfix_firmware_list: [] # provide array containing list of hotfixes to be included in the custom SPP
+ firmware_name: "custom_ansible_firmware" # provide your firwmare name here
+ baseline_firmware_name: "Service Pack for Synergy" # provide the name of the SPP to be used as base for the custom SPP creation
+ hotfix_firmware_list: ["hotfix1", "hotfix2"] # provide array containing list of hotfixes to be included in the custom SPP
tasks:
- name: Create the Firmware Driver
oneview_firmware_driver:
@@ -31,6 +31,16 @@
hotfixNames: "{{ hotfix_firmware_list }}"
delegate_to: localhost
+ - name: Create the Firmware Driver if already present
+ oneview_firmware_driver:
+ config: "{{ config }}"
+ state: present
+ data:
+ customBaselineName: "{{ firmware_name }}"
+ baselineName: "{{ baseline_firmware_name }}"
+ hotfixNames: "{{ hotfix_firmware_list }}"
+ delegate_to: localhost
+
- name: Delete the Firmware Driver
oneview_firmware_driver:
config: "{{ config }}"
diff --git a/examples/oneview_firmware_driver_facts.yml b/examples/oneview_firmware_driver_facts.yml
index 679741907..c08723012 100644
--- a/examples/oneview_firmware_driver_facts.yml
+++ b/examples/oneview_firmware_driver_facts.yml
@@ -1,5 +1,5 @@
###
-# Copyright (2016-2017) Hewlett Packard Enterprise Development LP
+# Copyright (2021) 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.
@@ -21,6 +21,7 @@
- name: Gather facts about all Firmware Drivers
oneview_firmware_driver_facts:
config: "{{ config }}"
+ delegate_to: localhost
- debug: var=firmware_drivers
@@ -31,12 +32,23 @@
start: 0
count: 3
sort: 'name:descending'
+ delegate_to: localhost
- debug: var=firmware_drivers
- name: Gather facts about a Firmware Driver by name
oneview_firmware_driver_facts:
config: "{{ config }}"
- name: "Service Pack for ProLiant.iso"
+ name: "custom_firmware_bundle"
+ delegate_to: localhost
- - debug: var=firmware_drivers[0]['uri']
+ - debug: var=firmware_drivers
+
+ - name: Gather facts about Firmware Driver with options
+ oneview_firmware_driver_facts:
+ config: "{{ config }}"
+ options:
+ - schema
+ delegate_to: localhost
+
+ - debug: var=schema
diff --git a/library/oneview_appliance_configuration_timeconfig_facts.py b/library/oneview_appliance_configuration_timeconfig_facts.py
new file mode 100644
index 000000000..68b5920cd
--- /dev/null
+++ b/library/oneview_appliance_configuration_timeconfig_facts.py
@@ -0,0 +1,74 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+###
+# Copyright (2021) 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.
+###
+
+ANSIBLE_METADATA = {'status': ['stableinterface'],
+ 'supported_by': 'community',
+ 'metadata_version': '1.1'}
+
+DOCUMENTATION = '''
+---
+module: oneview_appliance_configuration_timeconfig_facts
+short_description: Retrieve the facts about the OneView appliance time configuration.
+description:
+ - Retrieve the facts about the OneView appliance time configuration.
+version_added: "2.9"
+requirements:
+ - "python >= 3.4.2"
+ - "hpeOneView >= 6.0.0"
+author:
+ "Shanmugam M (@SHANDCRUZ)"
+extends_documentation_fragment:
+ - oneview
+ - oneview.validateetag
+'''
+
+EXAMPLES = '''
+- name: Gather facts about the Appliance Configuration Timeconfig
+ oneview_appliance_configuration_timeconfig_facts:
+ config: "{{ config_file_path }}"
+
+- debug: var=appliance_configuration_timeconfig
+'''
+
+RETURN = '''
+appliance_configuration_timeconfig:
+ description: Has all the OneView facts about the Appliance time, locale, and timezone settings.
+ returned: Always.
+ type: dict
+'''
+
+from ansible.module_utils.oneview import OneViewModule
+
+
+class ApplianceConfigurationTimeconfigFactsModule(OneViewModule):
+ def __init__(self):
+ super(ApplianceConfigurationTimeconfigFactsModule, self).__init__(additional_arg_spec=dict())
+ self.set_resource_object(self.oneview_client.appliance_configuration_timeconfig)
+
+ def execute_module(self):
+ appliance_configuration_timeconfig = self.resource_client.get_all()
+ return dict(changed=False,
+ ansible_facts=dict(appliance_configuration_timeconfig=appliance_configuration_timeconfig))
+
+
+def main():
+ ApplianceConfigurationTimeconfigFactsModule().run()
+
+
+if __name__ == '__main__':
+ main()
diff --git a/library/oneview_appliance_ssh_access.py b/library/oneview_appliance_ssh_access.py
new file mode 100644
index 000000000..5b35ceb7a
--- /dev/null
+++ b/library/oneview_appliance_ssh_access.py
@@ -0,0 +1,107 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+###
+# Copyright (2021) 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.
+###
+
+ANSIBLE_METADATA = {'status': ['stableinterface'],
+ 'supported_by': 'community',
+ 'metadata_version': '1.1'}
+
+DOCUMENTATION = '''
+---
+module: oneview_appliance_ssh_access
+short_description: Retrieve the facts about the OneView appliance ssh access configuration.
+description:
+ - Retrieve the facts about the OneView appliance ssh access configuration.
+version_added: "2.9"
+requirements:
+ - "python >= 3.4.2"
+ - "hpeOneView >= 6.0.0"
+author:
+ "Shanmugam M (@SHANDCRUZ)"
+options:
+ state:
+ description:
+ - Indicates the desired state for the Appliance SSH Access.
+ C(present) will ensure data properties are compliant with OneView.
+ choices: ['present']
+ data:
+ description:
+ - List with the Appliance SSH Access properties.
+ required: true
+
+extends_documentation_fragment:
+ - oneview
+ - oneview.validateetag
+'''
+
+EXAMPLES = '''
+- name: Ensures the Appliance SSH Access is false
+ oneview_appliance_ssh_access:
+ config: "{{ config }}"
+ state: present
+ data:
+ allowSshAccess: False
+ delegate_to: localhost
+- debug: var=appliance_ssh_access
+
+- name: Ensures the Appliance SSH Access is true
+ oneview_appliance_ssh_access:
+ config: "{{ config }}"
+ state: present
+ data:
+ allowSshAccess: True
+ delegate_to: localhost
+- debug: var=appliance_ssh_access
+'''
+
+RETURN = '''
+appliance_ssh_access:
+ description: Has all the OneView facts about the Appliance SSH Access.
+ returned: Always.
+ type: dict
+'''
+
+from ansible.module_utils.oneview import OneViewModule
+
+
+class ApplianceSshAccessModule(OneViewModule):
+ MSG_UPDATED = 'Appliance SSH Access updated successfully.'
+ MSG_ALREADY_PRESENT = 'Appliance SSH Access is already updated.'
+ RESOURCE_FACT_NAME = 'appliance_ssh_access'
+
+ def __init__(self):
+ additional_arg_spec = dict(data=dict(required=True, type='dict'),
+ state=dict(required=True, choices=['present']))
+ super(ApplianceSshAccessModule, self).__init__(additional_arg_spec=additional_arg_spec)
+ self.set_resource_object(self.oneview_client.appliance_ssh_access)
+
+ def execute_module(self):
+ changed, msg, ansible_facts = False, '', {}
+ self.current_resource = self.resource_client.get_all()
+ changed, msg = self._update_resource()
+ ansible_facts = dict(appliance_ssh_access=self.current_resource.data)
+ return dict(changed=changed,
+ msg=msg,
+ ansible_facts=ansible_facts)
+
+
+def main():
+ ApplianceSshAccessModule().run()
+
+
+if __name__ == '__main__':
+ main()
diff --git a/library/oneview_appliance_ssh_access_facts.py b/library/oneview_appliance_ssh_access_facts.py
new file mode 100644
index 000000000..739aaa1e6
--- /dev/null
+++ b/library/oneview_appliance_ssh_access_facts.py
@@ -0,0 +1,76 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+###
+# Copyright (2021) 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.
+###
+
+ANSIBLE_METADATA = {'status': ['stableinterface'],
+ 'supported_by': 'community',
+ 'metadata_version': '1.1'}
+
+DOCUMENTATION = '''
+---
+module: oneview_appliance_ssh_access_facts
+short_description: Retrieve the facts about the OneView appliance SSH access configuration.
+description:
+ - Retrieve the facts about the OneView appliance SSH access configuration.
+version_added: "2.9"
+requirements:
+ - "python >= 3.4.2"
+ - "hpeOneView >= 6.0.0"
+author:
+ "Shanmugam M (@SHANDCRUZ)"
+extends_documentation_fragment:
+ - oneview
+ - oneview.validateetag
+'''
+
+EXAMPLES = '''
+- name: Gather facts about the Appliance SSH Access
+ oneview_appliance_ssh_access_facts:
+ config: "{{ config file path}}"
+ delegate_to: localhost
+
+- debug: var=appliance_ssh_access
+'''
+
+RETURN = '''
+appliance_ssh_access:
+ description: Has all the OneView facts about the Appliance SSH access.
+ returned: Always.
+ type: dict
+'''
+
+from ansible.module_utils.oneview import OneViewModule
+
+
+class ApplianceSshAccessFactsModule(OneViewModule):
+ def __init__(self):
+ super(ApplianceSshAccessFactsModule, self).__init__(additional_arg_spec=dict())
+ self.set_resource_object(self.oneview_client.appliance_ssh_access)
+
+ def execute_module(self):
+ appliance_ssh_access = self.resource_client.get_all()
+ appliance_ssh_access = appliance_ssh_access.data
+ return dict(changed=False,
+ ansible_facts=dict(appliance_ssh_access=appliance_ssh_access))
+
+
+def main():
+ ApplianceSshAccessFactsModule().run()
+
+
+if __name__ == '__main__':
+ main()
diff --git a/library/oneview_appliance_time_and_locale_configuration.py b/library/oneview_appliance_time_and_locale_configuration.py
index f6a1a83ff..bff4b9b43 100644
--- a/library/oneview_appliance_time_and_locale_configuration.py
+++ b/library/oneview_appliance_time_and_locale_configuration.py
@@ -1,7 +1,7 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
###
-# Copyright (2016-2017) Hewlett Packard Enterprise Development LP
+# Copyright (2021) 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.
@@ -26,11 +26,11 @@
short_description: Manage OneView Appliance Locale and Time Configuration.
description:
- Provides an interface to manage Appliance Locale and Time Configuration. It can only update it.
-version_added: "2.3"
+version_added: "2.9"
requirements:
- - "python >= 2.7.9"
- - "hpeOneView >= 3.2.0"
-author: "Thiago Miotto (@tmiotto)"
+ - "python >= 3.4.2"
+ - "hpeOneView >= 6.0.0"
+author: "Shanmugam M (@SHANDCRUZ)"
options:
state:
description:
@@ -44,15 +44,45 @@
extends_documentation_fragment:
- oneview
+ - oneview.validateetag
'''
EXAMPLES = '''
-- name: Ensure that the Appliance Locale and Time Configuration is present with locale 'en_US.UTF-8'
+- name: Add the Appliance time and locale configuration locale is ja_JP.UTF-8
oneview_appliance_time_and_locale_configuration:
- config: "{{ config_file_path }}"
+ config: "{{ config }}"
state: present
data:
- locale: 'en_US.UTF-8'
+ locale: ja_JP.UTF-8
+ ntpServers: [16.110.135.123]
+ timezone: UTC
+ type: TimeAndLocale
+ delegate_to: localhost
+- debug: var=appliance_time_and_locale_configuration
+
+- name: Ensures the Appliance time and locale configuration locale is ja_JP.UTF-8 is already present
+ oneview_appliance_time_and_locale_configuration:
+ config: "{{ config }}"
+ state: present
+ data:
+ locale: ja_JP.UTF-8
+ ntpServers: [16.110.135.123]
+ timezone: UTC
+ type: TimeAndLocale
+ delegate_to: localhost
+- debug: var=appliance_time_and_locale_configuration
+
+- name: Change the Appliance time and locale configuration locale to en_US.UTF-8
+ oneview_appliance_time_and_locale_configuration:
+ config: "{{ config }}"
+ state: present
+ data:
+ locale: en_US.UTF-8
+ ntpServers: [16.110.135.123]
+ timezone: UTC
+ type: TimeAndLocale
+ delegate_to: localhost
+- debug: var=appliance_time_and_locale_configuration
'''
RETURN = '''
@@ -62,11 +92,12 @@
type: dict
'''
-from ansible.module_utils.oneview import OneViewModuleBase
+from ansible.module_utils.oneview import OneViewModule
+from ansible.module_utils.oneview import compare
-class ApplianceTimeAndLocaleConfigurationModule(OneViewModuleBase):
- MSG_UPDATED = 'Appliance Locale and Time Configuration updated successfully.'
+class ApplianceTimeAndLocaleConfigurationModule(OneViewModule):
+ MSG_CREATED = 'Appliance Locale and Time Configuration configured successfully.'
MSG_ALREADY_PRESENT = 'Appliance Locale and Time Configuration is already configured.'
RESOURCE_FACT_NAME = 'appliance_time_and_locale_configuration'
@@ -80,8 +111,22 @@ def __init__(self):
self.resource_client = self.oneview_client.appliance_time_and_locale_configuration
def execute_module(self):
- resource = self.resource_client.get()
- return self.resource_present(resource, self.RESOURCE_FACT_NAME)
+ if self.state == 'present':
+ changed, msg, appliance_time_and_locale_configuration = self.__present()
+ return dict(changed=changed, msg=msg, ansible_facts=appliance_time_and_locale_configuration)
+
+ def __present(self):
+ resource_data = {}
+ self.current_resource = self.resource_client.get_all()
+ if self.current_resource:
+ resource_data = self.current_resource.data.copy()
+ merged_data = resource_data.copy()
+ merged_data.update(self.data)
+ if not compare(resource_data, merged_data):
+ self.current_resource = self.resource_client.create(self.data)
+ return True, self.MSG_CREATED, dict(appliance_time_and_locale_configuration=self.current_resource.data)
+ else:
+ return False, self.MSG_ALREADY_PRESENT, dict(appliance_time_and_locale_configuration=self.current_resource.data)
def main():
diff --git a/library/oneview_appliance_time_and_locale_configuration_facts.py b/library/oneview_appliance_time_and_locale_configuration_facts.py
index 71f195954..19a47411e 100644
--- a/library/oneview_appliance_time_and_locale_configuration_facts.py
+++ b/library/oneview_appliance_time_and_locale_configuration_facts.py
@@ -1,7 +1,7 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
###
-# Copyright (2016-2017) Hewlett Packard Enterprise Development LP
+# Copyright (2021) 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.
@@ -26,14 +26,15 @@
short_description: Retrieve the facts about the OneView appliance time and locale configuration.
description:
- Retrieve the facts about the OneView appliance time and locale configuration.
-version_added: "2.3"
+version_added: "2.9"
requirements:
- - "python >= 2.7.9"
- - "hpeOneView >= 3.2.0"
+ - "python >= 3.4.2"
+ - "hpeOneView >= 6.0.0"
author:
- "Thiago Miotto (@tmiotto)"
+ "Shanmugam M (@SHANDCRUZ)"
extends_documentation_fragment:
- oneview
+ - oneview.validateetag
'''
EXAMPLES = '''
@@ -51,15 +52,16 @@
type: dict
'''
-from ansible.module_utils.oneview import OneViewModuleBase
+from ansible.module_utils.oneview import OneViewModule
-class ApplianceTimeAndLocaleConfigurationFactsModule(OneViewModuleBase):
+class ApplianceTimeAndLocaleConfigurationFactsModule(OneViewModule):
def __init__(self):
super(ApplianceTimeAndLocaleConfigurationFactsModule, self).__init__(additional_arg_spec=dict())
+ self.set_resource_object(self.oneview_client.appliance_time_and_locale_configuration)
def execute_module(self):
- appliance_time_and_locale_configuration = self.oneview_client.appliance_time_and_locale_configuration.get()
+ appliance_time_and_locale_configuration = self.resource_client.get_all()
return dict(changed=False,
ansible_facts=dict(appliance_time_and_locale_configuration=appliance_time_and_locale_configuration))
diff --git a/library/oneview_firmware_driver.py b/library/oneview_firmware_driver.py
index 984cd0c25..6acdc2e5c 100644
--- a/library/oneview_firmware_driver.py
+++ b/library/oneview_firmware_driver.py
@@ -1,7 +1,7 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
###
-# Copyright (2016-2017) Hewlett Packard Enterprise Development LP
+# Copyright (2021) 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.
@@ -24,20 +24,20 @@
---
module: oneview_firmware_driver
short_description: Provides an interface to remove Firmware Driver resources.
-version_added: "2.3"
+version_added: "2.9"
description:
- Provides an interface to remove Firmware Driver resources.
requirements:
- - "python >= 2.7.9"
- - "hpeOneView >= 2.0.1"
-author: "Bruno Souza (@bsouza)"
+ - "python >= 3.4.2"
+ - "hpeOneView >= 6.0.0"
+author: "Venkatesh Ravula (@VenkateshRavula)"
options:
state:
- description:
- - Indicates the desired state for the Firmware Driver.
- C(present) will ensure data properties are compliant with OneView.
- C(absent) will remove the resource from OneView, if it exists.
- choices: ['present', 'absent']
+ description:
+ - Indicates the desired state for the Firmware Driver.
+ C(present) will ensure data properties are compliant with OneView.
+ C(absent) will remove the resource from OneView, if it exists.
+ choices: ['present', 'absent']
name:
description:
- Firmware driver name.
@@ -45,49 +45,65 @@
data:
description:
- List with the Firmware Driver properties.
- required: False
+ required: True
extends_documentation_fragment:
- oneview
+ - oneview.validateetag
'''
EXAMPLES = '''
-- name: Create the Firmware Driver using names to find the baseline and hotfix firmwares.
+- name: Create the Firmware Driver
oneview_firmware_driver:
- config: "{{ config_file_path }}"
+ config: "{{ config }}"
state: present
data:
- customBaselineName: "Service Pack for ProLiant - Custom"
- baselineName: "Service Pack for ProLiant"
- hotfixNames: ['hotfix 1', 'hotfix 2']
+ customBaselineName: "{{ firmware_name }}"
+ baselineName: "{{ baseline_firmware_name }}"
+ hotfixNames: "{{ hotfix_firmware_list }}"
+ delegate_to: localhost
-- name: Create the Firmware Driver using URIs to find the baseline and hotfix firmwares.
+- name: Create the Firmware Driver if already present
oneview_firmware_driver:
- config: "{{ config_file_path }}"
+ config: "{{ config }}"
state: present
data:
- customBaselineName: "Service Pack for ProLiant - Custom"
- baselineUri: "/rest/firmware-driver/SPP1"
- hotfixUris: ['/rest/firmware-driver/hotfix1', '/rest/firmware-driver/hotfix2']
+ customBaselineName: "{{ firmware_name }}"
+ baselineName: "{{ baseline_firmware_name }}"
+ hotfixNames: "{{ hotfix_firmware_list }}"
+ delegate_to: localhost
-- name: Ensure that Firmware Driver is absent
+- name: Delete the Firmware Driver
oneview_firmware_driver:
- config: "{{ config_file_path }}"
+ config: "{{ config }}"
state: absent
- name: "Service Pack for ProLiant.iso"
+ name: "{{ firmware_name }}"
+ delegate_to: localhost
+
+- name: Do nothing when Firmware Driver is absent
+ oneview_firmware_driver:
+ config: "{{ config }}"
+ state: absent
+ name: "{{ firmware_name }}"
+ delegate_to: localhost
'''
-RETURN = ''' # '''
+RETURN = '''
+firmware_drivers:
+ description: Has the facts about the OneView firmware driver.
+ returned: On state 'present'. Can be null.
+ type: dict
+'''
-from ansible.module_utils.oneview import OneViewModuleBase, OneViewModuleException
+from ansible.module_utils.oneview import OneViewModule, OneViewModuleException
+from copy import deepcopy
-class FirmwareDriverModule(OneViewModuleBase):
+class FirmwareDriverModule(OneViewModule):
MSG_CREATED = 'Firmware driver created successfully.'
- MSG_UPDATED = 'Firmware driver updated successfully.'
MSG_ALREADY_PRESENT = 'Firmware driver is already present.'
MSG_DELETED = 'Firmware driver deleted successfully.'
MSG_ALREADY_ABSENT = 'Firmware driver is already absent.'
- RESOURCE_FACT_NAME = 'firmware_driver'
+ RESOURCE_FACT_NAME = 'firmware_drivers'
def __init__(self):
argument_spec = dict(state=dict(required=True, choices=['absent', 'present']),
@@ -95,58 +111,55 @@ def __init__(self):
data=dict(required=False, type='dict'))
super(FirmwareDriverModule, self).__init__(additional_arg_spec=argument_spec)
- self.resource_client = self.oneview_client.firmware_drivers
+ self.set_resource_object(self.oneview_client.firmware_drivers)
def execute_module(self):
- data = self.data or {}
+ data = deepcopy(self.data) or {}
# Checks for the name and data['customBaselineName'] params for a name attribute to the Firmware Driver.
if not data.get('customBaselineName') and not self.module.params.get('name'):
- msg = 'A "name" parameter or a "customBaselineName" field inside the "data" parameter'
- msg += 'is required for this operation.'
+ msg = "A 'name' parameter or a 'customBaselineName' field inside the 'data' parameter "
+ msg += "is required for this operation."
raise OneViewModuleException(msg)
- if data.get('customBaselineName'):
- fw_name = data['customBaselineName']
- elif self.module.params.get('name'):
- fw_name = self.module.params['name']
-
- resource = self.get_by_name(fw_name)
+ # name parameter takes priority over customBaselineName
+ if data.get('customBaselineName') and not self.module.params.get('name'):
+ self.current_resource = self.resource_client.get_by_name(data['customBaselineName'])
if self.state == 'present':
- changed, msg, firmware_driver = self.__present(resource)
+ changed, msg, firmware_driver = self.__present(data)
return dict(changed=changed, msg=msg, ansible_facts=firmware_driver)
elif self.state == 'absent':
- return self.resource_absent(resource)
+ return self.resource_absent()
- def __present(self, resource):
- if not resource:
+ def __present(self, data):
+ if not self.current_resource:
data = self.__parse_data()
- resource = self.oneview_client.firmware_drivers.create(data)
- return True, self.MSG_CREATED, dict(firmware_driver=resource)
+ self.current_resource = self.resource_client.create(data)
+ return True, self.MSG_CREATED, dict(firmware_driver=self.current_resource.data)
else:
- return False, self.MSG_ALREADY_PRESENT, dict(firmware_driver=resource)
+ return False, self.MSG_ALREADY_PRESENT, dict(firmware_driver=self.current_resource.data)
def __parse_data(self):
- data = self.data.copy()
+ data = deepcopy(self.data)
# Allow usage of baselineName instead of baselineUri
if data.get('baselineName'):
baseline_name = data.pop('baselineName', "")
- spp = self.get_by_name(baseline_name)
+ spp = self.resource_client.get_by_name(baseline_name)
if spp:
- data['baselineUri'] = spp['uri']
+ data['baselineUri'] = spp.data['uri']
else:
- raise OneViewModuleException('Baseline SPP named "%s" not found in OneView Appliance.' % baseline_name)
+ raise OneViewModuleException("Baseline SPP named '{}' not found in OneView Appliance.".format(baseline_name))
# Allow usage of hotfixNames instead of hotfixUris
if data and data.get('hotfixNames'):
hotfix_names = data.pop('hotfixNames', [])
data['hotfixUris'] = data.get('hotfixUris', [])
for hotfix_name in hotfix_names:
- hotfix = self.get_by_name(hotfix_name)
+ hotfix = self.resource_client.get_by_name(hotfix_name)
if hotfix:
- data['hotfixUris'].append(hotfix['uri'])
+ data['hotfixUris'].append(hotfix.data['uri'])
else:
- raise OneViewModuleException('Hotfix named "%s" not found in OneView Appliance.' % hotfix_name)
+ raise OneViewModuleException("Hotfix named '{}' not found in OneView Appliance.".format(hotfix_name))
return data
diff --git a/library/oneview_firmware_driver_facts.py b/library/oneview_firmware_driver_facts.py
index cbcc18a7e..cd93515e5 100644
--- a/library/oneview_firmware_driver_facts.py
+++ b/library/oneview_firmware_driver_facts.py
@@ -1,7 +1,7 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
###
-# Copyright (2016-2017) Hewlett Packard Enterprise Development LP
+# Copyright (2021) 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.
@@ -26,12 +26,20 @@
short_description: Retrieve the facts about one or more of the OneView Firmware Drivers.
description:
- Retrieve the facts about one or more of the Firmware Drivers from OneView.
-version_added: "2.3"
+version_added: "2.9"
requirements:
- - "python >= 2.7.9"
- - "hpeOneView >= 2.0.1"
-author: "Bruno Souza (@bsouza)"
+ - "python >= 3.4.2"
+ - "hpeOneView >= 6.0.0"
+author: "Venkatesh Ravula (@VenkateshRavula)"
options:
+ name:
+ description:
+ - Firmware driver name.
+ required: false
+ uri:
+ description:
+ - Firmware driver uri.
+ required: false
params:
description:
- List of params to delimit, filter and sort the list of resources.
@@ -40,18 +48,22 @@
C(count): The number of resources to return.
C(sort): The sort order of the returned data set."
required: false
- name:
+ options:
description:
- - Firmware driver name.
+ - "List with options to gather additional facts about Firmware driver related resource.
+ Options allowed: C(schema)"
required: false
+
extends_documentation_fragment:
- oneview
+ - oneview.factsparams
'''
EXAMPLES = '''
- name: Gather facts about all Firmware Drivers
oneview_firmware_driver_facts:
- config: "{{ config_file_path }}"
+ config: "{{ config }}"
+ delegate_to: localhost
- debug: var=firmware_drivers
@@ -62,15 +74,26 @@
start: 0
count: 3
sort: 'name:descending'
+ delegate_to: localhost
- debug: var=firmware_drivers
- name: Gather facts about a Firmware Driver by name
oneview_firmware_driver_facts:
- config: "{{ config_file_path }}"
- name: "Service Pack for ProLiant.iso"
+ config: "{{ config }}"
+ name: "custom_firmware_bundle"
+ delegate_to: localhost
- debug: var=firmware_drivers
+
+- name: Gather facts about Firmware Driver with options
+ oneview_firmware_driver_facts:
+ config: "{{ config }}"
+ options:
+ - schema
+ delegate_to: localhost
+
+- debug: var=schema
'''
RETURN = '''
@@ -80,33 +103,36 @@
type: dict
'''
-from ansible.module_utils.oneview import OneViewModuleBase
+from ansible.module_utils.oneview import OneViewModule
-class FirmwareDriverFactsModule(OneViewModuleBase):
+class FirmwareDriverFactsModule(OneViewModule):
def __init__(self):
argument_spec = dict(
name=dict(required=False, type='str'),
+ uri=dict(required=False, type='str'),
+ options=dict(required=False, type='list'),
params=dict(required=False, type='dict')
-
)
super(FirmwareDriverFactsModule, self).__init__(additional_arg_spec=argument_spec)
-
- self.resource_client = self.oneview_client.firmware_drivers
+ self.set_resource_object(self.oneview_client.firmware_drivers)
def execute_module(self):
- name = self.module.params.get("name")
+ ansible_facts = {}
+ firmware_drivers = []
- if name:
- result = self.resource_client.get_by('name', name)
- else:
- result = self.resource_client.get_all(**self.facts_params)
+ if self.current_resource:
+ firmware_drivers = self.current_resource.data
+ elif self.options:
+ if self.options.get('schema'):
+ ansible_facts['schema'] = self.resource_client.get_schema()
+ elif not self.module.params.get("name") and not self.module.params.get('uri'):
+ firmware_drivers = self.resource_client.get_all(**self.facts_params)
- return dict(
- changed=False,
- ansible_facts=dict(firmware_drivers=result)
- )
+ ansible_facts['firmware_drivers'] = firmware_drivers
+
+ return dict(changed=False, ansible_facts=ansible_facts)
def main():
diff --git a/oneview-ansible.md b/oneview-ansible.md
index 6f1cc6df4..613c31b04 100644
--- a/oneview-ansible.md
+++ b/oneview-ansible.md
@@ -17,6 +17,7 @@
* [image_streamer_plan_script - Manage the Image Streamer Plan Script resources.](#image_streamer_plan_script)
* [image_streamer_plan_script_facts - Retrieve facts about the Image Streamer Plan Scripts.](#image_streamer_plan_script_facts)
* [oneview_alert_facts - Retrieve facts about the OneView Alerts.](#oneview_alert_facts)
+ * [oneview_appliance_configuration_timeconfig_facts - Retrieve facts about the OneView appliance supported locales.](#oneview_appliance_configuration_timeconfig_facts)
* [oneview_appliance_device_read_community - Manage the Appliance Device Read Community string.](#oneview_appliance_device_read_community)
* [oneview_appliance_device_read_community_facts - Retrieve the facts about the OneView appliance device read community.](#oneview_appliance_device_read_community_facts)
* [oneview_appliance_device_snmp_v1_trap_destinations - Manage the Appliance Device SNMPv1 Trap Destinations.](#oneview_appliance_device_snmp_v1_trap_destinations)
@@ -25,6 +26,8 @@
* [oneview_appliance_device_snmp_v3_trap_destinations_facts - Retrieve the facts about the OneView appliance SNMPv3 trap forwarding destinations.](#oneview_appliance_device_snmp_v3_trap_destinations_facts)
* [oneview_appliance_device_snmp_v3_users - Manage the Appliance Device SNMPv3 Users.](#oneview_appliance_device_snmp_v3_users)
* [oneview_appliance_device_snmp_v3_users_facts - Retrieve the facts about the OneView appliance SNMPv3 users.](#oneview_appliance_device_snmp_v3_users_facts)
+ * [oneview_appliance_ssh_access - Manage OneView Appliance SSH Access Configuration.](#oneview_appliance_ssh_access)
+ * [oneview_appliance_ssh_access_facts - Retrieve the facts about OneView Appliance SSH Access Configuration.](#oneview_appliance_ssh_access_facts)
* [oneview_appliance_time_and_locale_configuration - Manage OneView Appliance Locale and Time Configuration.](#oneview_appliance_time_and_locale_configuration)
* [oneview_appliance_time_and_locale_configuration_facts - Retrieve the facts about the OneView appliance time and locale configuration.](#oneview_appliance_time_and_locale_configuration_facts)
* [oneview_certificates_server - Manage OneView Certificates Server resources.](#oneview_certificates_server)
@@ -158,7 +161,7 @@ Deploy the operating system on a server using HPE ICsp.
| username | Yes | | | ICsp username. |
-
+
#### Examples
```yaml
@@ -216,7 +219,7 @@ Adds, removes and configures servers in ICsp.
| username | Yes | | | ICsp username. |
-
+
#### Examples
```yaml
@@ -289,7 +292,7 @@ Manage the Artifact Bundle resource.
| state | Yes | | - present
- absent
- downloaded
- archive_downloaded
- backup_uploaded
- backup_created
- extracted
- backup_extracted
| Indicates the desired state for the Artifact Bundle resource. `present` will ensure data properties are compliant with OneView. When the artifact bundle already exists, only the name is updated. Changes in any other attribute value is ignored. `absent` will remove the resource from OneView, if it exists. `downloaded` will download the Artifact Bundle to the file path provided. `archive_downloaded` will download the Artifact Bundle archive to the file path provided. `backup_uploaded` will upload the Backup for the Artifact Bundle from the file path provided. `backup_created` will create a Backup for the Artifact Bundle. `extracted` will extract an Artifact Bundle. `backup_extracted` will extract an Artifact Bundle from the Backup. |
-
+
#### Examples
```yaml
@@ -426,7 +429,7 @@ Retrieve facts about the Artifact Bundle.
| params | No | | | List of params to delimit, filter and sort the list of resources. params allowed: `start`: The first item to return, using 0-based indexing. `count`: The number of resources to return. `filter`: A general filter/query string to narrow the list of items returned. `sort`: The sort order of the returned data set. |
-
+
#### Examples
```yaml
@@ -507,7 +510,7 @@ Manages Image Stream OS Build Plan resources.
| state | Yes | | | Indicates the desired state for the OS Build Plan resource. `present` will ensure data properties are compliant with Synergy Image Streamer. `absent` will remove the resource from Synergy Image Streamer, if it exists. |
-
+
#### Examples
```yaml
@@ -591,7 +594,7 @@ Retrieve facts about one or more of the Image Streamer Build Plans.
| params | No | | | List of params to delimit, filter and sort the list of resources. params allowed: `start`: The first item to return, using 0-based indexing. `count`: The number of resources to return. `filter`: A general filter/query string to narrow the list of items returned. `sort`: The sort order of the returned data set. |
-
+
#### Examples
```yaml
@@ -671,7 +674,7 @@ Retrieve facts about the Image Streamer Deployment Groups.
| params | No | | | List of params to delimit, filter and sort the list of resources. params allowed: `start`: The first item to return, using 0-based indexing. `count`: The number of resources to return. `filter`: A general filter/query string to narrow the list of items returned. `sort`: The sort order of the returned data set. |
-
+
#### Examples
```yaml
@@ -745,7 +748,7 @@ Manage Image Streamer Deployment Plan resources.
| state | Yes | | | Indicates the desired state for the Deployment Plan resource. `present` will ensure data properties are compliant with Synergy Image Streamer. `absent` will remove the resource from Synergy Image Streamer, if it exists. |
-
+
#### Examples
```yaml
@@ -830,7 +833,7 @@ Retrieve facts about the Image Streamer Deployment Plans.
| params | No | | | List of params to delimit, filter and sort the list of resources. params allowed: `start`: The first item to return, using 0-based indexing. `count`: The number of resources to return. `filter`: A general filter/query string to narrow the list of items returned. `sort`: The sort order of the returned data set. |
-
+
#### Examples
```yaml
@@ -932,7 +935,7 @@ Manage Image Streamer Golden Image resources.
| state | Yes | | - present
- absent
- downloaded
- archive_downloaded
| Indicates the desired state for the Golden Image resource. `present` will ensure data properties are compliant with Synergy Image Streamer. `absent` will remove the resource from Synergy Image Streamer, if it exists. `downloaded` will download the Golden Image to the file path provided. `archive_downloaded` will download the Golden Image archive to the file path provided. |
-
+
#### Examples
```yaml
@@ -1055,7 +1058,7 @@ Retrieve facts about one or more of the Image Streamer Golden Image.
| params | No | | | List of params to delimit, filter and sort the list of resources. params allowed: `start`: The first item to return, using 0-based indexing. `count`: The number of resources to return. `filter`: A general filter/query string to narrow the list of items returned. `sort`: The sort order of the returned data set. |
-
+
#### Examples
```yaml
@@ -1136,7 +1139,7 @@ Retrieve facts about the Image Streamer OS Volumes.
| params | No | | | List of params to delimit, filter and sort the list of resources. params allowed: `start`: The first item to return, using 0-based indexing. `count`: The number of resources to return. `filter`: A general filter/query string to narrow the list of items returned. `sort`: The sort order of the returned data set. |
-
+
#### Examples
```yaml
@@ -1249,7 +1252,7 @@ Manage the Image Streamer Plan Script resources.
| state | Yes | | - present
- absent
- differences_retrieved
| Indicates the desired state for the Plan Script resource. `present` will ensure data properties are compliant with Synergy Image Streamer. `absent` will remove the resource from Synergy Image Streamer, if it exists. `differences_retrieved` will retrieve the modified contents of the Plan Script as per the selected attributes. |
-
+
#### Examples
```yaml
@@ -1354,7 +1357,7 @@ Retrieve facts about the Image Streamer Plan Scripts.
| params | No | | | List of params to delimit, filter and sort the list of resources. params allowed: `start`: The first item to return, using 0-based indexing. `count`: The number of resources to return. `filter`: A general filter/query string to narrow the list of items returned. `sort`: The sort order of the returned data set. |
-
+
#### Examples
```yaml
@@ -1436,7 +1439,7 @@ Retrieve facts about the OneView Alerts.
| params | No | | | List with parameters to help filter the alerts. Params allowed: `count`, `fields`, `filter`, `query`, `sort`, `start`, and `view`. |
-
+
#### Examples
```yaml
@@ -1499,6 +1502,58 @@ Retrieve facts about the OneView Alerts.
---
+## oneview_appliance_configuration_timeconfig_facts
+Retrieve facts about the OneView Time Configuration.
+
+#### Synopsis
+ Retrieve facts about the OneView Time Configuration.
+
+#### Requirements (on the host that executes the module)
+ * python >= 3.4.2
+ * hpeOneView >= 6.0.0
+
+#### Options
+
+| Parameter | Required | Default | Choices | Comments |
+| ------------- |-------------| ---------|----------- |--------- |
+| config | No | | | Path to a .json configuration file containing the OneView client configuration. The configuration file is optional. If the file path is not provided, the configuration will be loaded from environment variables. |
+
+
+
+## Example Playbook
+
+```yaml
+
+- name: Gather Facts about Oneview Appliance time configuration
+ oneview_appliance_configuration_timeconfig_facts:
+ config: "{{ config }}"
+ delegate_to: localhost
+
+- debug: var=appliance_configuration_timeconfig
+
+```
+
+
+
+#### Return Values
+
+| Name | Description | Returned | Type |
+| ------------- |-------------| ---------|----------- |
+| appliance_configuration_timeconfig | Has all the OneView facts about the supported appliance locales. | Always. Cannot be null. | dict |
+
+
+#### Notes
+
+- A sample configuration file for the config parameter can be found at: https://github.com/HewlettPackard/oneview-ansible/blob/master/examples/oneview_config-rename.json
+
+- Check how to use environment variables for configuration at: https://github.com/HewlettPackard/oneview-ansible#environment-variables
+
+- Additional Playbooks for the HPE OneView Ansible modules can be found at: https://github.com/HewlettPackard/oneview-ansible/tree/master/examples
+
+
+---
+
+
## oneview_appliance_device_read_community
Manage the Appliance Device Read Community string.
@@ -1518,7 +1573,7 @@ Manage the Appliance Device Read Community string.
| state | | | | Indicates the desired state for the Appliance Device Read Community. `present` ensures data properties are compliant with OneView. |
-
+
#### Examples
```yaml
@@ -1577,7 +1632,7 @@ Retrieve the facts about the OneView appliance device read community.
| config | No | | | Path to a .json configuration file containing the OneView client configuration. The configuration file is optional. If the file path is not provided, the configuration will be loaded from environment variables. |
-
+
#### Examples
```yaml
@@ -1634,7 +1689,7 @@ Manage the Appliance Device SNMPv1 Trap Destinations.
| state | | | | Indicates the desired state for the Appliance Device SNMPv1 Trap Destinations. `present` ensures data properties are compliant with OneView. `absent` removes the resource from OneView, if it exists. |
-
+
#### Examples
```yaml
@@ -1741,7 +1796,7 @@ Retrieve the facts about the OneView appliance SNMPv1 trap forwarding destinatio
| params | No | | | List of params to delimit, filter and sort the list of resources. params allowed: `start`: The first item to return, using 0-based indexing. `count`: The number of resources to return. `filter`: A general filter/query string to narrow the list of items returned. `sort`: The sort order of the returned data set. |
-
+
#### Examples
```yaml
@@ -1827,7 +1882,7 @@ Manage the Appliance Device SNMPv3 Trap Destinations.
| state | | | | Indicates the desired state for the Appliance Device SNMPv3 Trap Destinations. `present` ensures data properties are compliant with OneView. `absent` removes the resource from OneView, if it exists. |
-
+
#### Examples
```yaml
@@ -1915,7 +1970,7 @@ Retrieve the facts about the OneView appliance SNMPv3 trap forwarding destinatio
| config | No | | | Path to a .json configuration file containing the OneView client configuration. The configuration file is optional. If the file path is not provided, the configuration will be loaded from environment variables. |
-
+
#### Examples
```yaml
@@ -2001,7 +2056,7 @@ Manage the Appliance Device SNMPv3 Users.
| state | | | - present
- absent
- set_password
| Indicates the desired state for the Appliance Device SNMPv3 User. `present` ensures data properties are compliant with OneView. `absent` removes the resource from OneView, if it exists. `set_password` will set a user password to the value specified. This operation is non-idempotent. |
-
+
#### Examples
```yaml
@@ -2089,7 +2144,7 @@ Retrieve the facts about the OneView appliance SNMPv3 users.
| config | No | | | Path to a .json configuration file containing the OneView client configuration. The configuration file is optional. If the file path is not provided, the configuration will be loaded from environment variables. |
-
+
#### Examples
```yaml
@@ -2152,6 +2207,122 @@ Retrieve the facts about the OneView appliance SNMPv3 users.
- Additional Playbooks for the HPE OneView Ansible modules can be found at: https://github.com/HewlettPackard/oneview-ansible/tree/master/examples
+---
+
+## oneview_appliance_ssh_access
+Manage the OneView Appliance SSH Access resources.
+
+#### Synopsis
+ Enables or disables OneView Appliance SSH Access.
+
+#### Requirements (on the host that executes the module)
+ * python >= 3.4.2
+ * hpeOneView >= 6.0.0
+
+#### Options
+
+| Parameter | Required | Default | Choices | Comments |
+| ------------- |-------------| ---------|----------- |--------- |
+| config | No | | | Path to a .json configuration file containing the OneView client configuration. The configuration file is optional. If the file path is not provided, the configuration will be loaded from environment variables. |
+| data | Yes | | | List with ssh access properties and its associated states.
+
+
+
+## Example Playbook
+
+```yaml
+
+- name: Ensures the Appliance SSH Access is false
+ oneview_appliance_ssh_access:
+ config: "{{ config }}"
+ state: present
+ data:
+ allowSshAccess: false
+ delegate_to: localhost
+- debug: var=appliance_ssh_access
+
+- name: Ensures the Appliance SSH Access is true
+ oneview_appliance_ssh_access:
+ config: "{{ config }}"
+ state: present
+ data:
+ allowSshAccess: true
+ delegate_to: localhost
+- debug: var=appliance_ssh_access
+
+```
+
+
+
+#### Return Values
+
+| Name | Description | Returned | Type |
+| ------------- |-------------| ---------|----------- |
+| appliance_ssh_access | Has all the OneView facts about the appliance SSH access configuration. | On 'present' state. Cannot be null. | dict |
+| data | Yes | | | List with the Appliance SSH Access Configuration properties. |
+| state | | | | Indicates the desired state for the Appliance SSH access Configuration. `present` will ensure data properties are compliant with OneView. |
+
+
+#### Notes
+
+- A sample configuration file for the config parameter can be found at: https://github.com/HewlettPackard/oneview-ansible/blob/master/examples/oneview_config-rename.json
+
+- Check how to use environment variables for configuration at: https://github.com/HewlettPackard/oneview-ansible#environment-variables
+
+- Additional Playbooks for the HPE OneView Ansible modules can be found at: https://github.com/HewlettPackard/oneview-ansible/tree/master/examples
+
+
+---
+
+## oneview_appliance_ssh_access_facts
+Retrieve facts about the OneView Appliance SSH Access.
+
+#### Synopsis
+ Retrieve facts about the OneView Appliance SSH Access.
+
+#### Requirements (on the host that executes the module)
+ * python >= 3.4.2
+ * hpeOneView >= 6.0.0
+
+#### Options
+
+| Parameter | Required | Default | Choices | Comments |
+| ------------- |-------------| ---------|----------- |--------- |
+| config | No | | | Path to a .json configuration file containing the OneView client configuration. The configuration file is optional. If the file path is not provided, the configuration will be loaded from environment variables. |
+
+
+
+## Example Playbook
+
+```yaml
+
+- name: Gather facts about the Appliance SSH Access
+ oneview_appliance_ssh_access_facts:
+ config: "{{ config }}"
+ delegate_to: localhost
+
+- debug: var=appliance_ssh_access
+
+```
+
+
+
+#### Return Values
+
+| Name | Description | Returned | Type |
+| ------------- |-------------| ---------|----------- |
+| appliance_ssh_access | Has all the OneView facts about the appliance SSH access configuration. | Always. | dict |
+
+
+#### Notes
+
+- A sample configuration file for the config parameter can be found at: https://github.com/HewlettPackard/oneview-ansible/blob/master/examples/oneview_config-rename.json
+
+- Check how to use environment variables for configuration at: https://github.com/HewlettPackard/oneview-ansible#environment-variables
+
+- Additional Playbooks for the HPE OneView Ansible modules can be found at: https://github.com/HewlettPackard/oneview-ansible/tree/master/examples
+
+
---
@@ -2162,8 +2333,8 @@ Manage OneView Appliance Locale and Time Configuration.
Provides an interface to manage Appliance Locale and Time Configuration. It can only update it.
#### Requirements (on the host that executes the module)
- * python >= 2.7.9
- * hpeOneView >= 5.4.0
+ * python >= 3.4.2
+ * hpeOneView >= 6.0.0
#### Options
@@ -2174,17 +2345,46 @@ Manage OneView Appliance Locale and Time Configuration.
| state | | | | Indicates the desired state for the Appliance Locale and Time Configuration. `present` will ensure data properties are compliant with OneView. |
-
+
#### Examples
```yaml
-- name: Ensure that the Appliance Locale and Time Configuration is present with locale 'en_US.UTF-8'
+- name: Add the Appliance time and locale configuration locale is ja_JP.UTF-8
oneview_appliance_time_and_locale_configuration:
- config: "{{ config_file_path }}"
+ config: "{{ config }}"
+ state: present
+ data:
+ locale: ja_JP.UTF-8
+ ntpServers: [16.110.135.123]
+ timezone: UTC
+ type: TimeAndLocale
+ delegate_to: localhost
+- debug: var=appliance_time_and_locale_configuration
+
+- name: Ensures the Appliance time and locale configuration locale is ja_JP.UTF-8 is already present
+ oneview_appliance_time_and_locale_configuration:
+ config: "{{ config }}"
+ state: present
+ data:
+ locale: ja_JP.UTF-8
+ ntpServers: [16.110.135.123]
+ timezone: UTC
+ type: TimeAndLocale
+ delegate_to: localhost
+- debug: var=appliance_time_and_locale_configuration
+
+- name: Change the Appliance time and locale configuration locale to en_US.UTF-8
+ oneview_appliance_time_and_locale_configuration:
+ config: "{{ config }}"
state: present
data:
- locale: 'en_US.UTF-8'
+ locale: en_US.UTF-8
+ ntpServers: [16.110.135.123]
+ timezone: UTC
+ type: TimeAndLocale
+ delegate_to: localhost
+- debug: var=appliance_time_and_locale_configuration
```
@@ -2216,8 +2416,8 @@ Retrieve the facts about the OneView appliance time and locale configuration.
Retrieve the facts about the OneView appliance time and locale configuration.
#### Requirements (on the host that executes the module)
- * python >= 2.7.9
- * hpeOneView >= 5.4.0
+ * python >= 3.4.2
+ * hpeOneView >= 6.0.0
#### Options
@@ -2226,14 +2426,15 @@ Retrieve the facts about the OneView appliance time and locale configuration.
| config | No | | | Path to a .json configuration file containing the OneView client configuration. The configuration file is optional. If the file path is not provided, the configuration will be loaded from environment variables. |
-
+
#### Examples
```yaml
- name: Gather facts about the Appliance time and locale configuration
oneview_appliance_time_and_locale_configuration_facts:
- config: "{{ config_file_path }}"
+ config: "{{ config }}"
+ delegate_to: localhost
- debug: var=appliance_time_and_locale_configuration
@@ -2280,7 +2481,7 @@ Manage OneView Certificates Server resources.
| validate_etag | | True | | When the ETag Validation is enabled, the request will be conditionally processed only if the current ETag for the resource matches the ETag provided in the data. |
-
+
#### Examples
```yaml
@@ -2358,7 +2559,7 @@ Retrieve the facts about one or more of the OneView Certificates Server.
| remote | No | | | Remote Server Certificate. |
-
+
#### Examples
```yaml
@@ -2430,7 +2631,7 @@ Manage the OneView Connection Template resources.
| state | Yes | | | Indicates the desired state for the Connection Template resource. `present` will ensure data properties are compliant with OneView. |
-
+
#### Examples
```yaml
@@ -2494,7 +2695,7 @@ Retrieve facts about the OneView Connection Templates.
| params | No | | | List of params to delimit, filter and sort the list of resources. params allowed: `start`: The first item to return, using 0-based indexing. `count`: The number of resources to return. `filter`: A general filter/query string to narrow the list of items returned. `sort`: The sort order of the returned data set. |
-
+
#### Examples
```yaml
@@ -2587,7 +2788,7 @@ Manage OneView Data Center resources.
| validate_etag | | True | | When the ETag Validation is enabled, the request will be conditionally processed only if the current ETag for the resource matches the ETag provided in the data. |
-
+
#### Examples
```yaml
@@ -2687,7 +2888,7 @@ Retrieve facts about the OneView Data Centers.
| params | No | | | List of params to delimit, filter and sort the list of resources. params allowed: `start`: The first item to return, using 0-based indexing. `count`: The number of resources to return. `filter`: A general filter/query string to narrow the list of items returned. `sort`: The sort order of the returned data set. |
-
+
#### Examples
```yaml
@@ -2768,7 +2969,7 @@ Manage OneView Drive Enclosure resources.
| state | | | - power_state_set
- uid_state_set
- hard_reset_state_set
- refresh_state_set
| Indicates the desired state for the Drive Enclosure resource. `power_state_set` will set the power state for the Drive Enclosure. `uid_state_set` will set the uid state for the Drive Enclosure. `hard_reset_state_set` will request a hard reset of the Drive Enclosure. `refresh_state_set` will refresh a Drive Enclosure. |
-
+
#### Examples
```yaml
@@ -2849,7 +3050,7 @@ Retrieve the facts about one or more of the OneView Drive Enclosures.
| params | No | | | List of params to delimit, filter and sort the list of resources. params allowed: `start`: The first item to return, using 0-based indexing. `count`: The number of resources to return. `filter`: A general filter/query string to narrow the list of items returned. `sort`: The sort order of the returned data set. |
-
+
#### Examples
```yaml
@@ -2933,7 +3134,7 @@ Manage OneView Enclosure resources.
| state | | | - present
- absent
- reconfigured
- refreshed
- appliance_bays_powered_on
- uid_on
- uid_off
- manager_bays_uid_on
- manager_bays_uid_off
- manager_bays_power_state_e_fuse
- manager_bays_power_state_reset
- appliance_bays_power_state_e_fuse
- device_bays_power_state_e_fuse
- device_bays_power_state_reset
- interconnect_bays_power_state_e_fuse
- manager_bays_role_active
- device_bays_ipv4_removed
- interconnect_bays_ipv4_removed
- support_data_collection_set
- create_certificate_request
- get_certificate_request
- import_certificate_request
| Indicates the desired state for the Enclosure resource. `present` will ensure data properties are compliant with OneView. You can rename the enclosure providing an attribute `newName`. You can also rename the rack providing an attribute `rackName`. `absent` will remove the resource from OneView, if it exists. `reconfigured` will reapply the appliance's configuration on the enclosure. This includes running the same configuration steps that were performed as part of the enclosure add. `refreshed` will refresh the enclosure along with all of its components, including interconnects and servers. Any new hardware is added, and any hardware that is no longer present within the enclosure is removed. `appliance_bays_powered_on` will set the appliance bay power state on. `uid_on` will set the UID state on. `uid_off` will set the UID state off. `manager_bays_uid_on` will set the UID state on for the Synergy Frame Link Module. `manager_bays_uid_off` will set the UID state off for the Synergy Frame Link Module. `manager_bays_power_state_e_fuse` will E-Fuse the Synergy Frame Link Module bay in the path. `manager_bays_power_state_reset` will Reset the Synergy Frame Link Module bay in the path. `appliance_bays_power_state_e_fuse` will E-Fuse the appliance bay in the path. `device_bays_power_state_e_fuse` will E-Fuse the device bay in the path. `device_bays_power_state_reset` will Reset the device bay in the path. `interconnect_bays_power_state_e_fuse` will E-Fuse the IC bay in the path. `manager_bays_role_active` will set the active Synergy Frame Link Module. `device_bays_ipv4_removed` will release the IPv4 address in the device bay. `interconnect_bays_ipv4_removed` will release the IPv4 address in the interconnect bay. `support_data_collection_set` will set the support data collection state for the enclosure. The supported values for this state are `PendingCollection`, `Completed`, `Error` and `NotSupported` `create_certificate_request` will create a Certificate Signing Request (CSR) for an enclosure `get_certificate_request` will return an enclosure's Certificate Signing Request (CSR) that was generated by previous POST to same URI. `import_certificate_request` will import a signed server certificate into the enclosure to be used for secure communication with the appliance. |
-
+
#### Examples
```yaml
@@ -3267,7 +3468,7 @@ Retrieve facts about one or more Enclosures
| params | No | | | List of params to delimit, filter and sort the list of resources. params allowed: `start`: The first item to return, using 0-based indexing. `count`: The number of resources to return. `filter`: A general filter/query string to narrow the list of items returned. `sort`: The sort order of the returned data set. |
-
+
#### Examples
```yaml
@@ -3392,7 +3593,7 @@ Manage OneView Enclosure Group resources.
| state | | | | Indicates the desired state for the Enclosure Group resource. `present` will ensure data properties are compliant with OneView. `absent` will remove the resource from OneView, if it exists. |
-
+
#### Examples
```yaml
@@ -3484,7 +3685,7 @@ Retrieve facts about one or more of the OneView Enclosure Groups.
| params | No | | | List of params to delimit, filter and sort the list of resources. params allowed: `start`: The first item to return, using 0-based indexing. `count`: The number of resources to return. `filter`: A general filter/query string to narrow the list of items returned. `sort`: The sort order of the returned data set. |
-
+
#### Examples
```yaml
@@ -3571,7 +3772,7 @@ Manage OneView Ethernet Network resources.
| validate_etag | | True | | When the ETag Validation is enabled, the request will be conditionally processed only if the current ETag for the resource matches the ETag provided in the data. |
-
+
#### Examples
```yaml
@@ -3710,7 +3911,7 @@ Retrieve the facts about one or more of the OneView Ethernet Networks.
| params | No | | | List of params to delimit, filter and sort the list of resources. params allowed: `start`: The first item to return, using 0-based indexing. `count`: The number of resources to return. `filter`: A general filter/query string to narrow the list of items returned. `sort`: The sort order of the returned data set. |
-
+
#### Examples
```yaml
@@ -3807,7 +4008,7 @@ Manage OneView Events.
| state | | | | Indicates the desired state for the Event. `present` will ensure data properties are compliant with OneView. This operation is non-idempotent. |
-
+
#### Examples
```yaml
@@ -3867,7 +4068,7 @@ Retrieve the facts about one or more of the OneView Events.
| params | No | | | List of params to delimit, filter and sort the list of resources. params allowed: `start`: The first item to return, using 0-based indexing. `count`: The number of resources to return. `filter`: A general filter/query string to narrow the list of items returned. `sort`: The sort order of the returned data set. |
-
+
#### Examples
```yaml
@@ -3931,7 +4132,7 @@ Manage OneView Fabric resources.
| name | No | | | Fabric name. |
-
+
#### Examples
```yaml
@@ -3991,7 +4192,7 @@ Retrieve the facts about one or more of the OneView Fabrics.
| params | No | | | List of params to delimit, filter and sort the list of resources. params allowed: `start`: The first item to return, using 0-based indexing. `count`: The number of resources to return. `filter`: A general filter/query string to narrow the list of items returned. `sort`: The sort order of the returned data set. |
-
+
#### Examples
```yaml
@@ -4072,7 +4273,7 @@ Manage OneView Fibre Channel Network resources.
| validate_etag | | True | | When the ETag Validation is enabled, the request will be conditionally processed only if the current ETag for the resource matches the ETag provided in the data. |
-
+
#### Examples
```yaml
@@ -4163,7 +4364,7 @@ Retrieve the facts about one or more of the OneView Fibre Channel Networks
| params | No | | | List of params to delimit, filter and sort the list of resources. params allowed: `start`: The first item to return, using 0-based indexing. `count`: The number of resources to return. `filter`: A general filter/query string to narrow the list of items returned. `sort`: The sort order of the returned data set. |
-
+
#### Examples
```yaml
@@ -4246,7 +4447,7 @@ Manage OneView FCoE Network resources
| validate_etag | | True | | When the ETag Validation is enabled, the request will be conditionally processed only if the current ETag for the resource matches the ETag provided in the data. |
-
+
#### Examples
```yaml
@@ -4329,7 +4530,7 @@ Retrieve the facts about one or more of the OneView FCoE Networks
| params | No | | | List of params to delimit, filter and sort the list of resources. params allowed: `start`: The first item to return, using 0-based indexing. `count`: The number of resources to return. `filter`: A general filter/query string to narrow the list of items returned. `sort`: The sort order of the returned data set. |
-
+
#### Examples
```yaml
@@ -4412,7 +4613,7 @@ Upload OneView Firmware Bundle resources.
| state | | | | Indicates the desired state for the Firmware Driver resource. `present` will ensure that the firmware bundle is at OneView. |
-
+
#### Examples
```yaml
@@ -4469,7 +4670,7 @@ Provides an interface to remove Firmware Driver resources.
| state | | | | Indicates the desired state for the Firmware Driver. `present` will ensure data properties are compliant with OneView. `absent` will remove the resource from OneView, if it exists. |
-
+
#### Examples
```yaml
@@ -4533,7 +4734,7 @@ Retrieve the facts about one or more of the OneView Firmware Drivers.
| params | No | | | List of params to delimit, filter and sort the list of resources. params allowed: `start`: The first item to return, using 0-based indexing. `count`: The number of resources to return. `sort`: The sort order of the returned data set. |
-
+
#### Examples
```yaml
@@ -4605,7 +4806,7 @@ Manage OneView Hypervisor Cluster Profile resources.
| validate_etag | | True | | When the ETag Validation is enabled, the request will be conditionally processed only if the current ETag for the resource matches the ETag provided in the data. |
-
+
#### Examples
```yaml
@@ -4689,7 +4890,7 @@ Retrieve the facts about one or more of the OneView Hypervisor Cluster Profiles.
| params | No | | | List of params to delimit, filter and sort the list of resources. params allowed: `start`: The first item to return, using 0-based indexing. `count`: The number of resources to return. `sort`: The sort order of the returned data set. |
-
+
#### Examples
```yaml
@@ -4791,7 +4992,7 @@ Manage OneView Hypervisor Manager resources.
| validate_etag | | True | | When the ETag Validation is enabled, the request will be conditionally processed only if the current ETag for the resource matches the ETag provided in the data. |
-
+
#### Examples
```yaml
@@ -4871,7 +5072,7 @@ Retrieve the facts about one or more of the OneView Hypervisor Managers.
| params | No | | | List of params to delimit, filter and sort the list of resources. params allowed: `start`: The first item to return, using 0-based indexing. `count`: The number of resources to return. `sort`: The sort order of the returned data set. |
-
+
#### Examples
```yaml
@@ -4957,7 +5158,7 @@ Manage OneView ID pools IPV4 Range resources.
| validate_etag | | True | | When the ETag Validation is enabled, the request will be conditionally processed only if the current ETag for the resource matches the ETag provided in the data. |
-
+
#### Examples
```yaml
@@ -5020,7 +5221,7 @@ Retrieve the facts about one or more of the OneView ID Pools IPV4 Ranges.
| uri | No | | | ID Pools IPV4 Range ID or URI. |
-
+
#### Examples
```yaml
@@ -5114,7 +5315,7 @@ Manage OneView ID pools IPV4 Subnet resources.
| validate_etag | | True | | When the ETag Validation is enabled, the request will be conditionally processed only if the current ETag for the resource matches the ETag provided in the data. |
-
+
#### Examples
```yaml
@@ -5177,7 +5378,7 @@ Retrieve the facts about one or more of the OneView ID Pools IPV4 Subnets.
| uri | No | | | ID Pools IPV4 Subnet ID or URI. |
-
+
#### Examples
```yaml
@@ -5248,7 +5449,7 @@ Manage the OneView Interconnect resources.
| state | | | - powered_on
- powered_off
- uid_on
- uid_off
- device_reset
- update_ports
- reset_port_protection
- reconfigured
| Indicates the desired state for the Interconnect resource. `powered_on` turns the power on. `powered_off` turns the power off. `uid_on` turns the UID light on. `uid_off` turns the UID light off. `device_reset` perform a device reset. `update_ports` updates the interconnect ports. `reset_port_protection` triggers a reset of port protection. `reconfigured` will reapply the appliance's configuration on the interconnect. This includes running the same configuration steps that were performed as part of the interconnect add by the enclosure. |
-
+
#### Examples
```yaml
@@ -5332,7 +5533,7 @@ Retrieve facts about one or more of the OneView Interconnects.
| params | No | | | List of params to delimit, filter and sort the list of resources. params allowed: `start`: The first item to return, using 0-based indexing. `count`: The number of resources to return. `filter`: A general filter/query string to narrow the list of items returned. `sort`: The sort order of the returned data set. |
-
+
#### Examples
```yaml
@@ -5514,7 +5715,7 @@ Retrieve facts about the OneView Interconnect Link Topologies.
| params | No | | | List of params to delimit, filter and sort the list of resources. params allowed: `start`: The first item to return, using 0-based indexing. `count`: The number of resources to return. `filter`: A general filter/query string to narrow the list of items returned. `sort`: The sort order of the returned data set. |
-
+
#### Examples
```yaml
@@ -5587,7 +5788,7 @@ Retrieve facts about one or more of the OneView Interconnect Types.
| params | No | | | List of params to delimit, filter and sort the list of resources. params allowed: `start`: The first item to return, using 0-based indexing. `count`: The number of resources to return. `filter`: A general filter/query string to narrow the list of items returned. `sort`: The sort order of the returned data set. |
-
+
#### Examples
```yaml
@@ -5667,7 +5868,7 @@ Retrieve facts about the OneView Internal Link Sets.
| params | No | | | List of params to delimit, filter and sort the list of resources. params allowed: `start`: The first item to return, using 0-based indexing. `count`: The number of resources to return. `filter`: A general filter/query string to narrow the list of items returned. `sort`: The sort order of the returned data set. `query`: A general query string to narrow the list of resources returned. `fields`: Specifies which fields should be returned in the result set. `view`: Return a specific subset of the attributes of the resource or collection, by specifying the name of a predefined view. |
-
+
#### Examples
```yaml
@@ -5749,7 +5950,7 @@ Retrieve facts about one or more of the OneView Logical Downlinks.
| params | No | | | List of params to delimit, filter and sort the list of resources. params allowed: `start`: The first item to return, using 0-based indexing. `count`: The number of resources to return. `filter`: A general filter/query string to narrow the list of items returned. `sort`: The sort order of the returned data set. |
-
+
#### Examples
```yaml
@@ -5831,7 +6032,7 @@ Manage OneView Logical Enclosure resources.
| state | Yes | | - present
- firmware_updated
- script_updated
- dumped
- reconfigured
- updated_from_group
- absent
| Indicates the desired state for the Logical Enclosure resource. `present` ensures data properties are compliant with OneView. You can rename the enclosure providing an attribute `newName`. `firmware_updated` updates the firmware for the Logical Enclosure. `script_updated` updates the Logical Enclosure configuration script. `dumped` generates a support dump for the Logical Enclosure. `reconfigured` reconfigures all enclosures associated with a logical enclosure. `updated_from_group` makes the logical enclosure consistent with the enclosure group. `absent` will remove the resource from OneView, if it exists. |
-
+
#### Examples
```yaml
@@ -6009,7 +6210,7 @@ Retrieve facts about one or more of the OneView Logical Enclosures.
| params | No | | | List of params to delimit, filter and sort the list of resources. params allowed: `start`: The first item to return, using 0-based indexing. `count`: The number of resources to return. `filter`: A general filter/query string to narrow the list of items returned. `sort`: The sort order of the returned data set. |
-
+
#### Examples
```yaml
@@ -6108,7 +6309,7 @@ Manage OneView Logical Interconnect resources.
| validate_etag | | True | | When the ETag Validation is enabled, the request will be conditionally processed only if the current ETag for the resource matches the ETag provided in the data. |
-
+
#### Examples
```yaml
@@ -6356,7 +6557,7 @@ Retrieve facts about one or more of the OneView Logical Interconnects.
| params | No | | | List of params to delimit, filter and sort the list of resources. params allowed: `start`: The first item to return, using 0-based indexing. `count`: The number of resources to return. `filter`: A general filter/query string to narrow the list of items returned. `sort`: The sort order of the returned data set. |
-
+
#### Examples
```yaml
@@ -6483,7 +6684,7 @@ Manage OneView Logical Interconnect Group resources.
| validate_etag | | True | | When the ETag Validation is enabled, the request will be conditionally processed only if the current ETag for the resource matches the ETag provided in the data. |
-
+
#### Examples
```yaml
@@ -6613,7 +6814,7 @@ Retrieve facts about one or more of the OneView Logical Interconnect Groups
| params | No | | | List of params to delimit, filter and sort the list of resources. params allowed: `start`: The first item to return, using 0-based indexing. `count`: The number of resources to return. `filter`: A general filter/query string to narrow the list of items returned. `sort`: The sort order of the returned data set. |
-
+
#### Examples
```yaml
@@ -6713,7 +6914,7 @@ Manage OneView Logical Switch resources.
| validate_etag | | True | | When the ETag Validation is enabled, the request will be conditionally processed only if the current ETag for the resource matches the ETag provided in the data. |
-
+
#### Examples
```yaml
@@ -6862,7 +7063,7 @@ Retrieve the facts about one or more of the OneView Logical Switches.
| params | No | | | List of params to delimit, filter and sort the list of resources. params allowed: `start`: The first item to return, using 0-based indexing. `count`: The number of resources to return. `filter`: A general filter/query string to narrow the list of items returned. `sort`: The sort order of the returned data set. |
-
+
#### Examples
```yaml
@@ -6944,7 +7145,7 @@ Manage OneView Logical Switch Group resources.
| validate_etag | | True | | When the ETag Validation is enabled, the request will be conditionally processed only if the current ETag for the resource matches the ETag provided in the data. |
-
+
#### Examples
```yaml
@@ -7046,7 +7247,7 @@ Retrieve facts about OneView Logical Switch Groups.
| params | No | | | List of params to delimit, filter and sort the list of resources. params allowed: `start`: The first item to return, using 0-based indexing. `count`: The number of resources to return. `filter`: A general filter/query string to narrow the list of items returned. `sort`: The sort order of the returned data set. |
-
+
#### Examples
```yaml
@@ -7127,7 +7328,7 @@ Retrieve the facts about login details
| config | No | | | Path to a .json configuration file containing the OneView client configuration. The configuration file is optional. If the file path is not provided, the configuration will be loaded from environment variables. |
-
+
#### Examples
```yaml
@@ -7181,7 +7382,7 @@ Manage OneView Managed SAN resources.
| state | Yes | | - present
- refresh_state_set
- endpoints_csv_file_created
- issues_report_created
| Indicates the desired state for the Managed SAN resource. `present` ensures data properties are compliant with OneView. `refresh_state_set` updates the refresh state of the Managed SAN. `endpoints_csv_file_created` creates a SAN endpoints CSV file. `issues_report_created` creates an unexpected zoning report for a SAN. |
-
+
#### Examples
```yaml
@@ -7289,7 +7490,7 @@ Retrieve facts about the OneView Managed SANs.
| params | No | | | List of params to delimit, filter and sort the list of resources. params allowed: `start`: The first item to return, using 0-based indexing. `count`: The number of resources to return. `query`: A general query string to narrow the list of resources returned. `sort`: The sort order of the returned data set. |
-
+
#### Examples
```yaml
@@ -7402,7 +7603,7 @@ Manage OneView Network Set resources.
| validate_etag | | True | | When the ETag Validation is enabled, the request will be conditionally processed only if the current ETag for the resource matches the ETag provided in the data. |
-
+
#### Examples
```yaml
@@ -7500,7 +7701,7 @@ Retrieve facts about the OneView Network Sets
| params | No | | | List of params to delimit, filter and sort the list of resources. params allowed: `start`: The first item to return, using 0-based indexing. `count`: The number of resources to return. `filter`: A general filter/query string to narrow the list of items returned. `sort`: The sort order of the returned data set. |
-
+
#### Examples
```yaml
@@ -7616,7 +7817,7 @@ Retrieve facts about one or more OS Deployment Plans.
| params | No | | | List of params to delimit, filter and sort the list of resources. params allowed: `start`: The first item to return, using 0-based indexing. `count`: The number of resources to return. `filter`: A general filter/query string to narrow the list of items returned. `sort`: The sort order of the returned data set. |
-
+
#### Examples
```yaml
@@ -7712,7 +7913,7 @@ Manage OneView Deployment Server resources.
| validate_etag | | True | | When the ETag Validation is enabled, the request will be conditionally processed only if the current ETag for the resource matches the ETag provided in the data. |
-
+
#### Examples
```yaml
@@ -7791,7 +7992,7 @@ Retrieve facts about one or more OS Deployment Servers.
| params | No | | | List of params to delimit, filter and sort the list of resources. params allowed: `start`: The first item to return, using 0-based indexing. `count`: The number of resources to return. `filter`: A general filter/query string to narrow the list of items returned. `sort`: The sort order of the returned data set. `query`: A general query string to narrow the list of resources returned. `fields`: Specifies which fields should be returned in the result set. `view`: Return a specific subset of the attributes of the resource or collection, by specifying the name of a predefined view. |
-
+
#### Examples
```yaml
@@ -7873,7 +8074,7 @@ Manage OneView Power Device resources.
| validate_etag | | True | | When the ETag Validation is enabled, the request will be conditionally processed only if the current ETag for the resource matches the ETag provided in the data. |
-
+
#### Examples
```yaml
@@ -7979,7 +8180,7 @@ Retrieve facts about the OneView Power Devices.
| params | No | | | List of params to delimit, filter and sort the list of resources. params allowed: `start`: The first item to return, using 0-based indexing. `count`: The number of resources to return. `filter`: A general filter/query string to narrow the list of items returned. `query`: A general query string to narrow the list of resources returned. `sort`: The sort order of the returned data set. |
-
+
#### Examples
```yaml
@@ -8083,7 +8284,7 @@ Manage OneView Racks resources.
| validate_etag | | True | | When the ETag Validation is enabled, the request will be conditionally processed only if the current ETag for the resource matches the ETag provided in the data. |
-
+
#### Examples
```yaml
@@ -8167,7 +8368,7 @@ Retrieve facts about Rack resources.
| params | No | | | List of params to delimit, filter and sort the list of resources. params allowed: `start`: The first item to return, using 0-based indexing. `count`: The number of resources to return. `filter`: A general filter/query string to narrow the list of items returned. `sort`: The sort order of the returned data set. |
-
+
#### Examples
```yaml
@@ -8248,7 +8449,7 @@ Manage OneView SAN Manager resources.
| validate_etag | | True | | When the ETag Validation is enabled, the request will be conditionally processed only if the current ETag for the resource matches the ETag provided in the data. |
-
+
#### Examples
```yaml
@@ -8344,7 +8545,7 @@ Retrieve facts about one or more of the OneView SAN Managers
| provider_display_name | | | | Provider Display Name. |
-
+
#### Examples
```yaml
@@ -8419,7 +8620,7 @@ Manage the OneView SAS Interconnect resources.
| validate_etag | | True | | When the ETag Validation is enabled, the request will be conditionally processed only if the current ETag for the resource matches the ETag provided in the data. |
-
+
#### Examples
```yaml
@@ -8488,7 +8689,7 @@ Retrieve facts about the OneView SAS Interconnects.
| params | No | | | List of params to delimit, filter and sort the list of resources. params allowed: `start`: The first item to return, using 0-based indexing. `count`: The number of resources to return. `filter`: A general filter/query string to narrow the list of items returned. `sort`: The sort order of the returned data set. |
-
+
#### Examples
```yaml
@@ -8564,7 +8765,7 @@ Retrieve facts about the OneView SAS Interconnect Types.
| params | No | | | List of params to delimit, filter and sort the list of resources. params allowed: `start`: The first item to return, using 0-based indexing. `count`: The number of resources to return. `filter`: A general filter/query string to narrow the list of items returned. `sort`: The sort order of the returned data set. |
-
+
#### Examples
```yaml
@@ -8643,7 +8844,7 @@ Manage OneView SAS Logical Interconnect resources.
| state | Yes | | - compliant
- drive_enclosure_replaced
- configuration_updated
- firmware_updated
| Indicates the desired state for the SAS Logical Interconnect resources. `compliant` brings the list of SAS Logical Interconnect back to a consistent state. `configuration_updated` asynchronously applies or re-applies the SAS Logical Interconnect configuration to all managed interconnects. `firmware_updated` installs firmware to a SAS Logical Interconnect. `drive_enclosure_replaced` replacement operation of a drive enclosure. * All of them are non-idempotent. |
-
+
#### Examples
```yaml
@@ -8759,7 +8960,7 @@ Retrieve facts about one or more of the OneView SAS Logical Interconnects.
| params | No | | | List of params to delimit, filter and sort the list of resources. params allowed: `start`: The first item to return, using 0-based indexing. `count`: The number of resources to return. `filter`: A general filter/query string to narrow the list of items returned. `sort`: The sort order of the returned data set. |
-
+
#### Examples
```yaml
@@ -8854,7 +9055,7 @@ Manage OneView SAS Logical Interconnect Group resources.
| validate_etag | | True | | When the ETag Validation is enabled, the request will be conditionally processed only if the current ETag for the resource matches the ETag provided in the data. |
-
+
#### Examples
```yaml
@@ -8956,7 +9157,7 @@ Retrieve facts about one or more of the OneView SAS Logical Interconnect Groups.
| params | No | | | List of params to delimit, filter and sort the list of resources. params allowed: `start`: The first item to return, using 0-based indexing. `count`: The number of resources to return. `filter`: A general filter/query string to narrow the list of items returned. `sort`: The sort order of the returned data set. |
-
+
#### Examples
```yaml
@@ -9045,7 +9246,7 @@ Retrieve facts about one or more of the OneView SAS Logical JBOD Attachments.
| params | No | | | List of params to delimit, filter and sort the list of resources. params allowed: `start`: The first item to return, using 0-based indexing. `count`: The number of resources to return. `filter`: A general filter/query string to narrow the list of items returned. `sort`: The sort order of the returned data set. |
-
+
#### Examples
```yaml
@@ -9120,7 +9321,7 @@ Retrieve facts about one or more of the OneView SAS Logical JBODs.
| params | No | | | List of params to delimit, filter and sort the list of resources. params allowed: `start`: The first item to return, using 0-based indexing. `count`: The number of resources to return. `filter`: A general filter/query string to narrow the list of items returned. `sort`: The sort order of the returned data set. |
-
+
#### Examples
```yaml
@@ -9205,7 +9406,7 @@ Manage OneView Scope resources.
| validate_etag | | True | | When the ETag Validation is enabled, the request will be conditionally processed only if the current ETag for the resource matches the ETag provided in the data. |
-
+
#### Examples
```yaml
@@ -9304,7 +9505,7 @@ Retrieve facts about one or more of the OneView Scopes.
| params | No | | | List of params to delimit, filter and sort the list of resources. params allowed: c(start): The first item to return, using 0-based indexing. c(count): The number of resources to return. c(query): A general query string to narrow the list of resources returned. c(sort): The sort order of the returned data set. c(view): Returns a specific subset of the attributes of the resource or collection, by specifying the name of a predefined view. |
-
+
#### Examples
```yaml
@@ -9379,7 +9580,7 @@ Manage OneView Server Hardware resources.
| validate_etag | | True | | When the ETag Validation is enabled, the request will be conditionally processed only if the current ETag for the resource matches the ETag provided in the data. |
-
+
#### Examples
```yaml
@@ -9549,7 +9750,7 @@ Retrieve facts about the OneView Server Hardware.
| params | No | | | List of params to delimit, filter and sort the list of resources. params allowed: `start`: The first item to return, using 0-based indexing. `count`: The number of resources to return. `filter`: A general filter/query string to narrow the list of items returned. `sort`: The sort order of the returned data set. |
-
+
#### Examples
```yaml
@@ -9719,7 +9920,7 @@ Manage OneView Server Hardware Type resources.
| validate_etag | | True | | When the ETag Validation is enabled, the request will be conditionally processed only if the current ETag for the resource matches the ETag provided in the data. |
-
+
#### Examples
```yaml
@@ -9801,7 +10002,7 @@ Retrieve facts about Server Hardware Types of the OneView.
| params | No | | | List of params to delimit, filter and sort the list of resources. params allowed: `start`: The first item to return, using 0-based indexing. `count`: The number of resources to return. `filter`: A general filter/query string to narrow the list of items returned. `sort`: The sort order of the returned data set. |
-
+
#### Examples
```yaml
@@ -9883,7 +10084,7 @@ Manage OneView Server Profile resources
| validate_etag | | True | | When the ETag Validation is enabled, the request will be conditionally processed only if the current ETag for the resource matches the ETag provided in the data. |
-
+
#### Examples
```yaml
@@ -10053,7 +10254,7 @@ Retrieve facts about the OneView Server Profiles.
| uri | | | | Server Profile uri. |
-
+
#### Examples
```yaml
@@ -10223,7 +10424,7 @@ Manage OneView Server Profile Template resources.
| validate_etag | | True | | When the ETag Validation is enabled, the request will be conditionally processed only if the current ETag for the resource matches the ETag provided in the data. |
-
+
#### Examples
```yaml
@@ -10319,7 +10520,7 @@ Retrieve facts about the Server Profile Templates from OneView.
| uri | | | | Server Profile Template uri. |
-
+
#### Examples
```yaml
@@ -10434,7 +10635,7 @@ Manage OneView Storage Pool resources.
| state | Yes | | | Indicates the desired state for the Storage Pool resource. `present` will ensure data properties are compliant with OneView. From API500 onwards it is only possible to update its state. `absent` will remove the resource from OneView, if it exists. From API500 onwards absent state is immutable. |
-
+
#### Examples
```yaml
@@ -10528,7 +10729,7 @@ Retrieve facts about one or more Storage Pools.
| params | No | | | List of params to delimit, filter and sort the list of resources. params allowed: `start`: The first item to return, using 0-based indexing. `count`: The number of resources to return. `filter`: A general filter/query string to narrow the list of items returned. `sort`: The sort order of the returned data set. |
-
+
#### Examples
```yaml
@@ -10626,7 +10827,7 @@ Manage OneView Storage System resources.
| validate_etag | | True | | When the ETag Validation is enabled, the request will be conditionally processed only if the current ETag for the resource matches the ETag provided in the data. |
-
+
#### Examples
```yaml
@@ -10743,7 +10944,7 @@ Retrieve facts about the OneView Storage Systems
| storage_hostname | | | | Storage System IP or hostname. |
-
+
#### Examples
```yaml
@@ -10899,7 +11100,7 @@ Provides an interface to remove extra presentations from a specified server prof
| state | Yes | | - extra_presentations_removed
| Indicates the desired state for the Storage Volume Attachment `extra_presentations_removed` will remove extra presentations from a specified server profile. |
-
+
#### Examples
```yaml
@@ -10975,7 +11176,7 @@ Retrieve facts about the OneView Storage Volume Attachments.
| storageVolumeUri | No | | | Storage Volume uri. |
-
+
#### Examples
```yaml
@@ -11113,7 +11314,7 @@ Manage OneView Storage Volume Template resources.
| validate_etag | | True | | When the ETag Validation is enabled, the request will be conditionally processed only if the current ETag for the resource matches the ETag provided in the data. |
-
+
#### Examples
```yaml
@@ -11187,7 +11388,7 @@ Retrieve facts about Storage Volume Templates of the OneView.
| params | No | | | List of params to delimit, filter and sort the list of resources. params allowed: `start`: The first item to return, using 0-based indexing. `count`: The number of resources to return. `filter`: A general filter/query string to narrow the list of items returned. `sort`: The sort order of the returned data set. |
-
+
#### Examples
```yaml
@@ -11307,7 +11508,7 @@ Provides an interface to remove ToR Switch resources.
| state | | | - present
- absent
- ports_updated
| Indicates the desired state for the Switch resource. `present` will update the switch scopes, if they differ from what is declared. `absent` will remove the resource from OneView, if it exists. `ports_updated` will update the switch ports. |
-
+
#### Examples
```yaml
@@ -11359,7 +11560,7 @@ Retrieve facts about the OneView Switches.
| params | No | | | List of params to delimit, filter and sort the list of resources. params allowed: `start`: The first item to return, using 0-based indexing. `count`: The number of resources to return. `filter`: A general filter/query string to narrow the list of items returned. `sort`: The sort order of the returned data set. |
-
+
#### Examples
```yaml
@@ -11446,7 +11647,7 @@ Retrieve facts about the OneView Switch Types.
| params | No | | | List of params to delimit, filter and sort the list of resources. params allowed: `start`: The first item to return, using 0-based indexing. `count`: The number of resources to return. `filter`: A general filter/query string to narrow the list of items returned. `sort`: The sort order of the returned data set. |
-
+
#### Examples
```yaml
@@ -11525,7 +11726,7 @@ Retrieve facts about the OneView Tasks.
| params | No | | | List with parameters to help filter the tasks. Params allowed: `count`, `fields`, `filter`, `query`, `sort`, `start`, and `view`. |
-
+
#### Examples
```yaml
@@ -11596,7 +11797,7 @@ Manage OneView Unmanaged Device resources.
| validate_etag | | True | | When the ETag Validation is enabled, the request will be conditionally processed only if the current ETag for the resource matches the ETag provided in the data. |
-
+
#### Examples
```yaml
@@ -11694,7 +11895,7 @@ Retrieve facts about one or more of the OneView Unmanaged Device.
| params | No | | | List of params to delimit, filter and sort the list of resources. params allowed: `start`: The first item to return, using 0-based indexing. `count`: The number of resources to return. `filter`: A general filter/query string to narrow the list of items returned. `sort`: The sort order of the returned data set. |
-
+
#### Examples
```yaml
@@ -11776,7 +11977,7 @@ Manage OneView Uplink Set resources.
| validate_etag | | True | | When the ETag Validation is enabled, the request will be conditionally processed only if the current ETag for the resource matches the ETag provided in the data. |
-
+
#### Examples
```yaml
@@ -11872,7 +12073,7 @@ Retrieve facts about one or more of the OneView Uplink Sets.
| params | No | | | List of params to delimit, filter and sort the list of resources. params allowed: `start`: The first item to return, using 0-based indexing. `count`: The number of resources to return. `filter`: A general filter/query string to narrow the list of items returned. `sort`: The sort order of the returned data set. |
-
+
#### Examples
```yaml
@@ -11952,7 +12153,7 @@ Manage OneView Users.
| state | | | - present
- absent
- set_password
| Indicates the desired state for the User. `present` will ensure data properties are compliant with OneView. `absent` will remove the resource from OneView, if it exists. `set_password` will set a user password to the value specified. This operation is non-idempotent. |
-
+
#### Examples
```yaml
@@ -12037,7 +12238,7 @@ Retrieve the facts about one or more of the OneView Users.
| params | No | | | List of params to delimit, filter and sort the list of resources. params allowed: `start`: The first item to return, using 0-based indexing. `count`: The number of resources to return. `filter`: A general filter/query string to narrow the list of items returned. `sort`: The sort order of the returned data set. |
-
+
#### Examples
```yaml
@@ -12106,7 +12307,7 @@ Returns the range of possible API versions supported by the appliance
| params | No | | | List of params to delimit, filter and sort the list of resources. params allowed: `start`: The first item to return, using 0-based indexing. `count`: The number of resources to return. `filter`: A general filter/query string to narrow the list of items returned. `sort`: The sort order of the returned data set. |
-
+
#### Examples
```yaml
@@ -12161,7 +12362,7 @@ Manage OneView Volume resources.
| validate_etag | | True | | When the ETag Validation is enabled, the request will be conditionally processed only if the current ETag for the resource matches the ETag provided in the data. |
-
+
#### Examples
```yaml
@@ -12342,7 +12543,7 @@ Retrieve facts about the OneView Volumes.
| params | No | | | List of params to delimit, filter and sort the list of resources. params allowed: `start`: The first item to return, using 0-based indexing. `count`: The number of resources to return. `filter`: A general filter/query string to narrow the list of items returned. `sort`: The sort order of the returned data set. |
-
+
#### Examples
```yaml
@@ -12433,3 +12634,4 @@ Retrieve facts about the OneView Volumes.
---
+
diff --git a/test/oneview_module_loader.py b/test/oneview_module_loader.py
index 0004ba59b..00ce5b258 100755
--- a/test/oneview_module_loader.py
+++ b/test/oneview_module_loader.py
@@ -1,7 +1,7 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
###
-# Copyright (2017) Hewlett Packard Enterprise Development LP
+# Copyright (2021) 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.
@@ -60,12 +60,15 @@
from oneview_alert_facts import AlertFactsModule
from oneview_appliance_device_read_community import ApplianceDeviceReadCommunityModule
from oneview_appliance_device_read_community_facts import ApplianceDeviceReadCommunityFactsModule
+from oneview_appliance_configuration_timeconfig_facts import ApplianceConfigurationTimeconfigFactsModule
from oneview_appliance_device_snmp_v1_trap_destinations import ApplianceDeviceSnmpV1TrapDestinationsModule
from oneview_appliance_device_snmp_v1_trap_destinations_facts import ApplianceDeviceSnmpV1TrapDestinationsFactsModule
from oneview_appliance_device_snmp_v3_trap_destinations import ApplianceDeviceSnmpV3TrapDestinationsModule
from oneview_appliance_device_snmp_v3_trap_destinations_facts import ApplianceDeviceSnmpV3TrapDestinationsFactsModule
from oneview_appliance_device_snmp_v3_users import ApplianceDeviceSnmpV3UsersModule
from oneview_appliance_device_snmp_v3_users_facts import ApplianceDeviceSnmpV3UsersFactsModule
+from oneview_appliance_ssh_access_facts import ApplianceSshAccessFactsModule
+from oneview_appliance_ssh_access import ApplianceSshAccessModule
from oneview_appliance_time_and_locale_configuration_facts import ApplianceTimeAndLocaleConfigurationFactsModule
from oneview_appliance_time_and_locale_configuration import ApplianceTimeAndLocaleConfigurationModule
from oneview_certificates_server import CertificatesServerModule
diff --git a/test/test_oneview_appliance_configuration_timeconfig_facts.py b/test/test_oneview_appliance_configuration_timeconfig_facts.py
new file mode 100644
index 000000000..ab64614e6
--- /dev/null
+++ b/test/test_oneview_appliance_configuration_timeconfig_facts.py
@@ -0,0 +1,50 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+###
+# Copyright (2021) 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.
+###
+
+import pytest
+
+from hpe_test_utils import OneViewBaseTest
+from oneview_module_loader import ApplianceConfigurationTimeconfigFactsModule
+
+PARAMS_GET_ALL = dict(
+ config='config.json',
+ name=None
+)
+
+PRESENT_TIMECONFIG = [{
+ "locale": "en_US.UTF-8",
+ "displayName": "English (United States)"
+}]
+
+
+@pytest.mark.resource(TestApplianceConfigurationTimeconfigFactsModule='appliance_configuration_timeconfig')
+class TestApplianceConfigurationTimeconfigFactsModule(OneViewBaseTest):
+ def test_should_get_all_timeconfiguration(self):
+ self.resource.get_all.return_value = PRESENT_TIMECONFIG
+ self.mock_ansible_module.params = PARAMS_GET_ALL
+
+ ApplianceConfigurationTimeconfigFactsModule().run()
+
+ self.mock_ansible_module.exit_json.assert_called_once_with(
+ changed=False,
+ ansible_facts=dict(appliance_configuration_timeconfig=PRESENT_TIMECONFIG)
+ )
+
+
+if __name__ == '__main__':
+ pytest.main([__file__])
diff --git a/test/test_oneview_appliance_ssh_access.py b/test/test_oneview_appliance_ssh_access.py
new file mode 100644
index 000000000..9044eb9e2
--- /dev/null
+++ b/test/test_oneview_appliance_ssh_access.py
@@ -0,0 +1,62 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+###
+# Copyright (2021) 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.
+###
+
+import pytest
+import mock
+
+from hpe_test_utils import OneViewBaseTest
+from oneview_module_loader import ApplianceSshAccessModule
+
+DEFAULT_CONFIGURATION_TEMPLATE = dict(
+ allowSshAccess='True'
+)
+
+CHANGED_CONFIGURATION_TEMPLATE = dict(
+ allowSshAccess='False'
+)
+
+PARAMS_WITH_CHANGES = dict(
+ config='config.json',
+ state='present',
+ data=CHANGED_CONFIGURATION_TEMPLATE
+)
+
+
+@pytest.mark.resource(TestApplianceSshAccessModule='appliance_ssh_access')
+class TestApplianceSshAccessModule(OneViewBaseTest):
+ """
+ OneViewBaseTestCase provides the mocks used in this test case
+ """
+
+ def test_update_when_data_has_modified_attributes(self):
+ self.resource.data = DEFAULT_CONFIGURATION_TEMPLATE
+ self.resource.get_all.return_value = self.resource
+ self.mock_ansible_module.params = PARAMS_WITH_CHANGES
+ self.resource.update.return_value = self.resource
+
+ ApplianceSshAccessModule().run()
+
+ self.mock_ansible_module.exit_json.assert_called_once_with(
+ changed=True,
+ msg=ApplianceSshAccessModule.MSG_UPDATED,
+ ansible_facts=dict(appliance_ssh_access=DEFAULT_CONFIGURATION_TEMPLATE)
+ )
+
+
+if __name__ == '__main__':
+ pytest.main([__file__])
diff --git a/test/test_oneview_appliance_time_and_locale_configuration.py b/test/test_oneview_appliance_time_and_locale_configuration.py
index 5b58ba003..f0860334f 100644
--- a/test/test_oneview_appliance_time_and_locale_configuration.py
+++ b/test/test_oneview_appliance_time_and_locale_configuration.py
@@ -1,7 +1,7 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
###
-# Copyright (2016-2017) Hewlett Packard Enterprise Development LP
+# Copyright (2021) 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.
@@ -23,26 +23,26 @@
DEFAULT_CONFIGURATION_TEMPLATE = dict(
locale='en_US.UTF-8',
- localeDisplayName='English (United States)',
+ type='TimeAndLocale',
timezone='UTC'
)
CHANGED_CONFIGURATION_TEMPLATE = dict(
- locale='en_US.UTF-8',
- localeDisplayName='English (United States)',
- timezone='GMT'
+ locale='ja_JP.UTF-8',
+ type='TimeAndLocale',
+ timezone='UTC'
)
-PARAMS_FOR_PRESENT = dict(
+PARAMS_WITH_CHANGES = dict(
config='config.json',
state='present',
- data=DEFAULT_CONFIGURATION_TEMPLATE
+ data=CHANGED_CONFIGURATION_TEMPLATE
)
-PARAMS_WITH_CHANGES = dict(
+PARAMS_FOR_PRESENT = dict(
config='config.json',
state='present',
- data=CHANGED_CONFIGURATION_TEMPLATE
+ data=DEFAULT_CONFIGURATION_TEMPLATE
)
@@ -52,9 +52,9 @@ class TestApplianceTimeAndLocaleConfigurationModule(OneViewBaseTest):
OneViewBaseTestCase provides the mocks used in this test case
"""
- def test_should_not_update_when_data_is_equals(self):
- self.resource.get.return_value = DEFAULT_CONFIGURATION_TEMPLATE
-
+ def test_should_not_update_when_data_is_equal(self):
+ self.resource.get_all.return_value = self.resource
+ self.resource.data = DEFAULT_CONFIGURATION_TEMPLATE
self.mock_ansible_module.params = PARAMS_FOR_PRESENT
ApplianceTimeAndLocaleConfigurationModule().run()
@@ -65,18 +65,18 @@ def test_should_not_update_when_data_is_equals(self):
ansible_facts=dict(appliance_time_and_locale_configuration=DEFAULT_CONFIGURATION_TEMPLATE)
)
- def test_update_when_data_has_modified_attributes(self):
- self.resource.get.return_value = DEFAULT_CONFIGURATION_TEMPLATE
- self.resource.update.return_value = CHANGED_CONFIGURATION_TEMPLATE
-
+ def test_should_update_when_data_is_modified(self):
+ self.resource.data = DEFAULT_CONFIGURATION_TEMPLATE
+ self.resource.get_all.return_value = self.resource
self.mock_ansible_module.params = PARAMS_WITH_CHANGES
+ self.resource.create.return_value = self.resource
ApplianceTimeAndLocaleConfigurationModule().run()
self.mock_ansible_module.exit_json.assert_called_once_with(
changed=True,
- msg=ApplianceTimeAndLocaleConfigurationModule.MSG_UPDATED,
- ansible_facts=dict(appliance_time_and_locale_configuration=CHANGED_CONFIGURATION_TEMPLATE)
+ msg=ApplianceTimeAndLocaleConfigurationModule.MSG_CREATED,
+ ansible_facts=dict(appliance_time_and_locale_configuration=DEFAULT_CONFIGURATION_TEMPLATE)
)
diff --git a/test/test_oneview_appliance_time_and_locale_configuration_facts.py b/test/test_oneview_appliance_time_and_locale_configuration_facts.py
index a063f1aaf..5bd90bd08 100644
--- a/test/test_oneview_appliance_time_and_locale_configuration_facts.py
+++ b/test/test_oneview_appliance_time_and_locale_configuration_facts.py
@@ -1,7 +1,7 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
###
-# Copyright (2016-2017) Hewlett Packard Enterprise Development LP
+# Copyright (2021) 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.
@@ -35,7 +35,7 @@
@pytest.mark.resource(TestApplianceTimeAndLocaleConfigurationFactsModule='appliance_time_and_locale_configuration')
class TestApplianceTimeAndLocaleConfigurationFactsModule(OneViewBaseTest):
def test_should_get_appliance_time_and_locale_configuration(self):
- self.resource.get.return_value = PRESENT_CONFIGURATION
+ self.resource.get_all.return_value = PRESENT_CONFIGURATION
self.mock_ansible_module.params = PARAMS_GET
ApplianceTimeAndLocaleConfigurationFactsModule().run()
diff --git a/test/test_oneview_firmware_driver.py b/test/test_oneview_firmware_driver.py
index 2383b5bd2..44ab5b6f5 100644
--- a/test/test_oneview_firmware_driver.py
+++ b/test/test_oneview_firmware_driver.py
@@ -1,7 +1,7 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
###
-# Copyright (2016-2017) Hewlett Packard Enterprise Development LP
+# Copyright (2021) 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.
@@ -25,7 +25,7 @@
FIRMWARE_DRIVER_NAME = "Service Pack for ProLiant.iso"
FIRMWARE_DRIVER_TEMPLATE = dict(
- customBaselineName="Custom SPP Name",
+ customBaselineName=FIRMWARE_DRIVER_NAME,
baselineName="SPP1",
hotfixNames=["hotfix1", "hotfix2"]
)
@@ -53,15 +53,9 @@
@pytest.mark.resource(TestFirmwareDriverModule='firmware_drivers')
class TestFirmwareDriverModule(OneViewBaseTest):
def test_should_create_new_firmware_driver(self):
- my_arr = [[],
- [dict(uri='/rest/fake1')],
- [dict(uri='/rest/fake2')],
- [dict(uri='/rest/fake3')],
- ]
-
- self.resource.get_by.side_effect = my_arr
-
- self.resource.create.return_value = FIRMWARE_DRIVER_TEMPLATE
+ self.resource.data = {'uri': '/rest/fake'}
+ self.resource.get_by_name.side_effect = [None, self.resource, self.resource, self.resource]
+ self.resource.create.return_value = self.resource
self.mock_ansible_module.params = PARAMS_FOR_PRESENT
@@ -70,12 +64,12 @@ def test_should_create_new_firmware_driver(self):
self.mock_ansible_module.exit_json.assert_called_once_with(
changed=True,
msg=FirmwareDriverModule.MSG_CREATED,
- ansible_facts=dict(firmware_driver=FIRMWARE_DRIVER_TEMPLATE)
+ ansible_facts=dict(firmware_driver={'uri': '/rest/fake'})
)
def test_should_not_update_when_data_is_equals(self):
- self.resource.get_by.return_value = [FIRMWARE_DRIVER_TEMPLATE]
-
+ self.resource.data = FIRMWARE_DRIVER_TEMPLATE
+ self.resource.get_by_name.return_value = self.resource
self.mock_ansible_module.params = PARAMS_FOR_PRESENT
FirmwareDriverModule().run()
@@ -87,8 +81,8 @@ def test_should_not_update_when_data_is_equals(self):
)
def test_should_remove_firmware_driver(self):
- firmwares = [FIRMWARE_DRIVER]
- self.resource.get_by.return_value = firmwares
+ self.resource.data = FIRMWARE_DRIVER
+ self.resource.get_by_name.return_value = self.resource
self.mock_ansible_module.params = PARAMS_ABSENT
FirmwareDriverModule().run()
@@ -99,7 +93,7 @@ def test_should_remove_firmware_driver(self):
)
def test_should_do_nothing_when_firmware_driver_not_exist(self):
- self.resource.get_by.return_value = []
+ self.resource.get_by_name.return_value = None
self.mock_ansible_module.params = PARAMS_ABSENT
FirmwareDriverModule().run()
@@ -109,24 +103,22 @@ def test_should_do_nothing_when_firmware_driver_not_exist(self):
msg=FirmwareDriverModule.MSG_ALREADY_ABSENT
)
- def test_shoul_fail_when_missing_name_(self):
+ def test_should_fail_when_missing_name_(self):
fake_data = FIRMWARE_DRIVER_TEMPLATE.copy()
fake_data.pop('customBaselineName')
params_missing_name = PARAMS_FOR_PRESENT.copy()
params_missing_name['data'] = fake_data
- msg = 'A "name" parameter or a "customBaselineName" field inside the "data" parameter'
- msg += 'is required for this operation.'
+ msg = "A 'name' parameter or a 'customBaselineName' field inside the 'data' parameter "
+ msg += "is required for this operation."
self.mock_ansible_module.params = params_missing_name
FirmwareDriverModule().run()
self.mock_ansible_module.fail_json.assert_called_once_with(exception=mock.ANY, msg=msg)
- def test_should_fail_if_SPP_does_not_exist(self):
- msg = 'Baseline SPP named "SPP1" '
- msg += 'not found in OneView Appliance.'
-
- self.resource.get_by.side_effect = [[], []]
+ def test_should_fail_if_spp_does_not_exist(self):
+ msg = "Baseline SPP named 'SPP1' not found in OneView Appliance."
+ self.resource.get_by_name.side_effect = [None, None, None]
self.mock_ansible_module.params = PARAMS_FOR_PRESENT
@@ -135,10 +127,9 @@ def test_should_fail_if_SPP_does_not_exist(self):
self.mock_ansible_module.fail_json.assert_called_once_with(exception=mock.ANY, msg=msg)
def test_should_fail_if_hotfix_does_not_exist(self):
- msg = 'Hotfix named "hotfix1" '
- msg += 'not found in OneView Appliance.'
-
- self.resource.get_by.side_effect = [[], [dict(uri='/rest/fake1')], []]
+ msg = "Hotfix named 'hotfix1' not found in OneView Appliance."
+ self.resource.data = {'uri': '/rest/fake'}
+ self.resource.get_by_name.side_effect = [None, self.resource, None]
self.mock_ansible_module.params = PARAMS_FOR_PRESENT
diff --git a/test/test_oneview_firmware_driver_facts.py b/test/test_oneview_firmware_driver_facts.py
index 7be511544..c68be0ec3 100644
--- a/test/test_oneview_firmware_driver_facts.py
+++ b/test/test_oneview_firmware_driver_facts.py
@@ -1,7 +1,7 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
###
-# Copyright (2016-2017) Hewlett Packard Enterprise Development LP
+# Copyright (2021) 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.
@@ -33,6 +33,11 @@
name=None
)
+PARAMS_GET_WITH_OPTIONS = dict(
+ config='config.json',
+ options=['schema']
+)
+
FIRMWARE_DRIVER = dict(
category='firmware-drivers',
name=FIRMWARE_DRIVER_NAME,
@@ -55,9 +60,9 @@ def test_should_get_all_firmware_drivers(self):
ansible_facts=dict(firmware_drivers=firmwares)
)
- def test_should_get_by_name(self):
- firmwares = [FIRMWARE_DRIVER]
- self.resource.get_by.return_value = firmwares
+ def test_should_get_firmware_drivers_by_name(self):
+ self.resource.data = FIRMWARE_DRIVER
+ self.resource.get_by_name.return_value = self.resource
self.mock_ansible_module.params = PARAMS_GET_BY_NAME
@@ -65,7 +70,20 @@ def test_should_get_by_name(self):
self.mock_ansible_module.exit_json.assert_called_once_with(
changed=False,
- ansible_facts=dict(firmware_drivers=firmwares)
+ ansible_facts=dict(firmware_drivers=FIRMWARE_DRIVER)
+ )
+
+ def test_should_get_firmware_drivers_with_options(self):
+ self.resource.data = FIRMWARE_DRIVER
+ self.resource.get_schema.return_value = "schema"
+
+ self.mock_ansible_module.params = PARAMS_GET_WITH_OPTIONS
+
+ FirmwareDriverFactsModule().run()
+
+ self.mock_ansible_module.exit_json.assert_called_once_with(
+ changed=False,
+ ansible_facts=dict(firmware_drivers=[], schema="schema")
)