Skip to content

Commit

Permalink
Initial Changes
Browse files Browse the repository at this point in the history
  • Loading branch information
VenkateshRavula committed Jul 7, 2020
1 parent 9078f85 commit 620d08f
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 29 deletions.
34 changes: 17 additions & 17 deletions examples/oneview_ethernet_network.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,23 +58,23 @@
name: '{{ network_name }}'
delegate_to: localhost

- name: Ensure ethernet network has no scopes
oneview_ethernet_network:
config: "{{ config }}"
state: present
data:
name: "{{ network_name }}"
scopeUris: []
delegate_to: localhost

- name: Ensure Ethernet Network has two scopes
oneview_ethernet_network:
config: "{{ config }}"
state: present
data:
name: "{{ network_name }}"
scopeUris: "{{ network_scope_uris }}"
delegate_to: localhost
# - name: Ensure ethernet network has no scopes
# oneview_ethernet_network:
# config: "{{ config }}"
# state: present
# data:
# name: "{{ network_name }}"
# scopeUris: []
# delegate_to: localhost
#
# - name: Ensure Ethernet Network has two scopes
# oneview_ethernet_network:
# config: "{{ config }}"
# state: present
# data:
# name: "{{ network_name }}"
# scopeUris: "{{ network_scope_uris }}"
# delegate_to: localhost

- name: Rename the Ethernet Network to 'Updated Ethernet Network'
oneview_ethernet_network:
Expand Down
7 changes: 7 additions & 0 deletions examples/oneview_fc_network.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,13 @@
- hosts: all
vars:
config: "{{ playbook_dir }}/oneview_config.json"
contents: "{{lookup('file', config)}}"
network_name: 'Ansible Test FC Network'
network_scope_uris:
- '/rest/scopes/d0324c4b-56c9-485b-b7dd-8f6218a4b5bb'
- '/rest/scopes/9422ce05-dc39-4358-b723-c8c825eae412'
tasks:

- name: Create a Fibre Channel Network
oneview_fc_network:
config: "{{ config }}"
Expand All @@ -35,6 +37,10 @@
delegate_to: localhost
register: fc_network_1

- name: Display the api version present in config file
debug:
var: contents.api_version

- name: Do nothing with the Fibre Channel Network when no changes are provided
oneview_fc_network:
config: "{{ config }}"
Expand Down Expand Up @@ -65,6 +71,7 @@
data:
name: "{{ network_name }}"
scopeUris: "{{ network_scope_uris }}"
when: contents.api_version >= 300 and contents.api_version <= 500
delegate_to: localhost

- name: Delete the Fibre Channel Network
Expand Down
21 changes: 11 additions & 10 deletions examples/oneview_network_set.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
- hosts: all
vars:
config: "{{ playbook_dir }}/oneview_config.json"
ethernet_network_1_name: 'Test Ethernet Network 1' # Define a Name of an Ethernet Network to add on the Network Set
ethernet_network_1_name: 'test' # Define a Name of an Ethernet Network to add on the Network Set
ethernet_network_2_uri: '/rest/ethernet-networks/d7643aca-01e1-4fc0-a678-e1529ebd955d' # Define a URI of another Ethernet Network to add on the Network Set
network_set_scope_uris:
- /rest/scopes/483d4056-03a3-4eed-a606-e1d32e14dd61
Expand All @@ -31,21 +31,21 @@
name: 'OneViewSDK Test Network Set'
networkUris:
- '{{ ethernet_network_1_name }}' # can be a name
- '{{ ethernet_network_2_uri }}' # or a URI
# - '{{ ethernet_network_2_uri }}' # or a URI
bandwidth:
maximumBandwidth: 15000
typicalBandwidth: 3000
delegate_to: localhost

# Scope update is only supported V300 and V500
- name: Update the Network set with two scopes
oneview_network_set:
config: "{{ config }}"
state: present
data:
name: OneViewSDK Test Network Set
scopeUris: "{{ network_set_scope_uris }}"
delegate_to: localhost
# - name: Update the Network set with two scopes
# oneview_network_set:
# config: "{{ config }}"
# state: present
# data:
# name: OneViewSDK Test Network Set
# scopeUris: "{{ network_set_scope_uris }}"
# delegate_to: localhost

- name: Update the Network Set name to 'OneViewSDK Test Network Set - Renamed' and change the associated networks
oneview_network_set:
Expand All @@ -58,6 +58,7 @@
- '{{ ethernet_network_1_name }}'
delegate_to: localhost


- name: Delete the Network Set
oneview_network_set:
config: '{{ config }}'
Expand Down
4 changes: 2 additions & 2 deletions examples/oneview_uplink_set.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
- hosts: all
vars:
config: "{{ playbook_dir }}/oneview_config.json"
logical_interconnect_name: '<LIG>' # set the name of an existent logical interconnect to run this example
logical_interconnect_name: "LE-LIG" # set the name of an existent logical interconnect to run this example
ethernet_networks: # set at least one ethernet network URI for this example
- '/rest/ethernet-networks/21051893-e035-4c25-9dd0-8cd9cc953d25'
tasks:
Expand All @@ -31,7 +31,7 @@
# You can choose set the Logical Interconnect by logicalInterconnectUri or logicalInterconnectName
logicalInterconnectName: "{{ logical_interconnect_name }}" # option 1
# logicalInterconnectUri: "/rest/logical-interconnects/461a9cef-beef-4916-8be1-926078ffb948" # option 2
networkUris: "{{ ethernet_networks }}"
networkUris: []
fcNetworkUris: []
fcoeNetworkUris: []
portConfigInfos: []
Expand Down

0 comments on commit 620d08f

Please sign in to comment.