# Copyright 2021 Dell Inc. or its subsidiaries. All Rights Reserved.
#
#  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.


# Default configurations written for :
  # ----Mellanox Quantum(TM) HDR InfiniBand Switch, 40 QSFP56 ports----
# Change the configurations as per the switch model to avoid failures

# Subnet Manager: centralized resource used by infiniband
# to handle the management of the fabric.
# Cache and Log directories of subnet manager
# container are mounted to below mentioned path on host.

# cache_directory: opensm stores certain data to the disk such that
# subsequent runs are consistent. The default directory used is /var/cache/opensm.
# The following files are included in it: guid2lid, guid2mkey, neighbors

# log_directory: controls the directory in which the temporary files
# generated by opensm are created. These files are: opensm-subnet.lst,
# opensm.fdbs, and opensm.log. By default, this directory is /var/log.

subnet_manager:
  cache_directory: /var/cache/opensm
  log_directory: /var/log

# mellanox_switch_config: list of configuration lines to apply to the switch.
  # Example:
    # mellanox_switch_config:
      # - Command 1
      # - Command 2
  # By default, the list is empty.
mellanox_switch_config:

# mellanox_switch_interface_config: contains interface configuration.
  # It is a dict mapping switch interface names to configuration dicts.
  # Each dict may contain the following items:
    # description - a description to apply to the interface.
    # config - a list of per-interface configuration.
mellanox_switch_interface_config:
  ib 1/1:
    description: port 1
    config:
      - "no shutdown"
  ib 1/2:
    description: port 2
    config:
      - "no shutdown"
  ib 1/3:
    description: port 3
    config:
      - "no shutdown"
  ib 1/4:
    description: port 4
    config:
      - "no shutdown"
  ib 1/5:
    description: port 5
    config:
      - "no shutdown"
  ib 1/6:
    description: port 6
    config:
      - "no shutdown"
  ib 1/7:
    description: port 7
    config:
      - "no shutdown"
  ib 1/8:
    description: port 8
    config:
      - "no shutdown"
  ib 1/9:
    description: port 9
    config:
      - "no shutdown"
  ib 1/10:
    description: port 10
    config:
      - "no shutdown"
  ib 1/11:
    description: port 11
    config:
      - "no shutdown"
  ib 1/12:
    description: port 12
    config:
      - "no shutdown"
  ib 1/13:
    description: port 13
    config:
      - "no shutdown"
  ib 1/14:
    description: port 14
    config:
      - "no shutdown"
  ib 1/15:
    description: port 15
    config:
      - "no shutdown"
  ib 1/16:
    description: port 16
    config:
      - "no shutdown"
  ib 1/17:
    description: port 17
    config:
      - "no shutdown"
  ib 1/18:
    description: port 18
    config:
      - "no shutdown"
  ib 1/19:
    description: port 19
    config:
      - "no shutdown"
  ib 1/20:
    description: port 20
    config:
      - "no shutdown"
  ib 1/21:
    description: port 21
    config:
      - "no shutdown"
  ib 1/22:
    description: port 22
    config:
      - "no shutdown"
  ib 1/23:
    description: port 23
    config:
      - "no shutdown"
  ib 1/24:
    description: port 24
    config:
      - "no shutdown"
  ib 1/25:
    description: port 25
    config:
      - "no shutdown"
  ib 1/26:
    description: port 26
    config:
      - "no shutdown"
  ib 1/27:
    description: port 27
    config:
      - "no shutdown"
  ib 1/28:
    description: port 28
    config:
      - "no shutdown"
  ib 1/29:
    description: port 29
    config:
      - "no shutdown"
  ib 1/30:
    description: port 30
    config:
      - "no shutdown"
  ib 1/31:
    description: port 31
    config:
      - "no shutdown"
  ib 1/32:
    description: port 32
    config:
      - "no shutdown"
  ib 1/33:
    description: port 33
    config:
      - "no shutdown"
  ib 1/34:
    description: port 34
    config:
      - "no shutdown"
  ib 1/35:
    description: port 35
    config:
      - "no shutdown"
  ib 1/36:
    description: port 36
    config:
      - "no shutdown"
  ib 1/37:
    description: port 37
    config:
      - "no shutdown"
  ib 1/38:
    description: port 38
    config:
      - "no shutdown"
  ib 1/39:
    description: port 39
    config:
      - "no shutdown"
  ib 1/40:
    description: port 40
    config:
      - "no shutdown"

# save_changes_to_startup: is a boolean flag. By default, this option is set to false.
# When set to true, it will save the switch's running configuration to the startup configuration file
# after the role applies its configuration. This will allow the configuration to persist after a
# restart or power failure.
save_changes_to_startup: false