aristanetworks / avd

Arista Validated Designs
https://avd.arista.com
Apache License 2.0
295 stars 212 forks source link

Add schemas for missing keys in eos_designs #2834

Closed ClausHolbechArista closed 1 year ago

ClausHolbechArista commented 1 year ago

eos_designs:

eos_cli_config_gen:

Remove:

Role inputs - can be postponed to 4.x

  root_dir:
  documentation_dir_name:
  documentation_dir:
  devices_dir_name:
  devices_dir:
  output_dir_name:
  output_dir:
  structured_dir_name:
  structured_dir:
  eos_config_dir_name:
  eos_config_dir:
  fabric_dir_name:
    type: str
  fabric_dir:
    type: str

eos_config_deploy_eapi:
  eos_config_deploy_eapi_pre_running_config_backup:
    type: any
  post_running_config_backup_filename:
    type: any
  post_running_config_backup_dir_name:
    type: any
  post_running_config_backup_dir:
    type: any
  pre_running_config_backup_filename:
    type: any
  pre_running_config_backup_dir_name:
    type: any
  pre_running_config_backup_dir:
    type: any

Full list for reference:

  root_dir:
    type: str
  documentation_dir_name:
    type: str
  documentation_dir:
    type: str
  devices_dir_name:
    type: str
  devices_dir:
    type: str
  output_dir_name:
    type: str
  output_dir:
    type: str
  structured_dir_name:
    type: str
  structured_dir:
    type: str
  eos_config_dir_name:
    type: str
  eos_config_dir:
    type: str
  avd_structured_config_file_format:
    type: str
  molecule_ephemeral_directory:
    type: any
  molecule_file:
    type: any
  molecule_instance_config:
    type: any
  molecule_no_log:
    type: any
  molecule_scenario_directory:
    type: any
  molecule_yml:
    type: str
  is_for_test:
    type: bool
  inventory_file:
    type: str
  inventory_dir:
    type: str
  inventory_hostname:
    type: str
  inventory_hostname_short:
    type: str
  group_names:
    type: list
  ansible_facts:
    type: any
  playbook_dir:
    type: any
  ansible_playbook_python:
    type: any
  ansible_config_file:
    type: any
  groups:
    type: any
  omit:
    type: any
  ansible_version:
    type: any
  ansible_check_mode:
    type: any
  ansible_diff_mode:
    type: any
  ansible_forks:
    type: any
  ansible_inventory_sources:
    type: any
  ansible_skip_tags:
    type: any
  ansible_limit:
    type: any
  ansible_run_tags:
    type: any
  ansible_verbosity:
    type: any
  eosconfig:
    type: dict
  default_connected_endpoints_keys:
    type: dict
  default_node_type_keys:
    type: dict
  default_platform_settings:
    type: list
  default_templates:
    type: dict
  fabric_dir_name:
    type: str
  fabric_dir:
    type: str
  evpn_ebgp_gateway_inter_domain:
    type: bool
  isis_maximum_paths:
    type: int
  custom_structured_configuration_prefix:
    type: list
    convert_types:
      - str
  custom_structured_configuration_list_merge:
    type: str
  templates:
    type: dict
  avd_data_conversion_mode:
    type: str
  avd_data_validation_mode:
    type: str
  ptp_profiles:
    type: list
  eos_designs_documentation:
    type: dict
  avd_switch_facts:
    type: dict
  avd_overlay_peers:
    type: dict
  avd_topology_peers:
    type: dict
  role_schema_dir_name:
    type: str
  role_schema_dir:
    type: str
  role_schema_file_name:
    type: str
  role_schema_path:
    type: str
  role_schema_fragments_dir_name:
    type: str
  role_schema_fragments_dir:
    type: str
  role_schema_fragments_file_glob:
    type: str
  role_schema_fragments_glob:
    type: str
  role_schema_json_schema_file_name:
    type: str
  role_schema_json_schema_path:
    type: str
  structured_config_schema_path:
    type: str
  avd_requirements:
    type: dict
  ansible_role_names:
    type: any
  ansible_play_role_names:
    type: any
  ansible_dependent_role_names:
    type: any
  role_names:
    type: any
  ansible_play_name:
    type: any
  role_name:
    type: any
  role_path:
    type: any
  role_uuid:
    type: any
  ansible_collection_name:
    type: any
  ansible_role_name:
    type: any
  ansible_play_hosts_all:
    type: any
  ansible_play_hosts:
    type: any
  ansible_play_batch:
    type: any
  play_hosts:
    type: any
  hostvars:
    type: any
  environment:
    type: any
  vars:
    type: any
  ansible_delegated_vars:
    type: any
  ansible_current_hosts:
    type: any
  ansible_failed_hosts:
    type: any
  ansible_search_path:
    type: any
  ansible_timeout:
    type: any
  ansible_shell_executable:
    type: any
  ansible_host:
    type: any
  ansible_connection:
    type: any
  ansible_module_compression:
    type: any
  ansible_pipelining:
    type: any
  ansible_shell_type:
    type: any
  switch:
    type: dict
  hardware_counters:
    type: dict
  ntp:
    type: dict
  spine_platform:
    type: any
  spine_bgp_defaults:
    type: any
  boot:
    type: any
  tenant_a:
    type: any
  tenant_b:
    type: any
  tenant_c:
    type: any
  tenant_d:
    type: any
  mgmt_interface_description:
    type: str
  ipv6_mgmt_gateway:
    type: str
  ipv6_mgmt_destination_networks:
    type: list
  overlay_cvx_servers:
    type: any
  serial_number:
    type: any
  underlay_filter_redistribute_connected:
    type: bool
  ip_offset_10:
    type: any
  ip_offset_20:
    type: any
  description_prefix:
    type: any
  my_dci_ethernet_interfaces:
    type: any
  override_ntp:
    type: any
  my_special_dci_ethernet_interfaces:
    type: any
  override_ip_name_servers:
    type: any
  template_timezone:
    type: any
  my_mac_address_table:
    type: any
  override_mac_address_table:
    type: any
  is_deployed:
    type: any
  ansible_httpapi_port:
    type: any
  ansible_httpapi_host:
    type: any
  ansible_httpapi_use_ssl:
    type: any
  ansible_httpapi_validate_certs:
    type: any
  ansible_network_os:
    type: any
  ansible_user:
    type: any
  ansible_ssh_pass:
    type: any
  ansible_become:
    type: any
  ansible_become_method:
    type: any
  ansible_port:
    type: any
  fabric_evpn_encapsulation:
    type: any
  queue_monitor_length:
    type: any
  vxlan_vlan_aware_bundles:
    type: any
  eos_cli_config_gen_configuration:
    type: any
  eos_cli_config_gen_documentation:
    type: any
  custom_structured_configuration_router_general:
    type: any
  aaa_authorization:
    type: any
  ansible_password:
    type: any
  role_documentation_dir_name:
    type: any
  role_documentation_dir:
    type: any
  aaa_authentication:
    type: any
  eos_config_deploy_eapi_pre_running_config_backup:
    type: any
  post_running_config_backup_filename:
    type: any
  post_running_config_backup_dir_name:
    type: any
  post_running_config_backup_dir:
    type: any
  pre_running_config_backup_filename:
    type: any
  pre_running_config_backup_dir_name:
    type: any
  pre_running_config_backup_dir:
    type: any
chetryan commented 1 year ago

Isn't isis_maximum_paths already defined in : https://github.com/aristanetworks/ansible-avd/blob/58bacf3f7a8b0746221b1a24c87bc81777fe35c1/ansible_collections/arista/avd/roles/eos_designs/schemas/schema_fragments/defs_node_type.schema.yml#L364 ?

ClausHolbechArista commented 1 year ago

Isn't isis_maximum_paths already defined in :

https://github.com/aristanetworks/ansible-avd/blob/58bacf3f7a8b0746221b1a24c87bc81777fe35c1/ansible_collections/arista/avd/roles/eos_designs/schemas/schema_fragments/defs_node_type.schema.yml#L364

?

No, that key you refer to is nested under

l3leaf:
  defaults:
    isis_maximum_paths: <int>

where the one we need the schema for is at the root level

isis_maximum_paths: <int>

You can use a $ref to point in to the correct schema. Make sure to point to the $defs/node_type/... path.