Spec-Zone.ru › Ansible

Модуль cisco.intersight.intersight_port_policy_info — сбор информации о политиках портов Cisco Intersight

Примечание

Этот модуль входит в коллекцию cisco.intersight (версия 2.18.0).

Возможно, эта коллекция уже установлена, если вы используете пакет ansible. Она не входит в ansible-core. Чтобы проверить, установлена ли она, выполните ansible-galaxy collection list.

Для установки используйте: ansible-galaxy collection install cisco.intersight.

Чтобы использовать её в плейбуке, укажите: cisco.intersight.intersight_port_policy_info.

  • Краткое описание
  • Параметры
  • Примеры
  • Возвращаемые значения

Краткое описание

  • Собирает информацию о политиках портов и связанных с ними ресурсах в Cisco Intersight.
  • Получает подробную информацию, включая порты с разделением, серверные порты, каналы портов восходящей линии связи, группы закрепления и все остальные конфигурации портов.
  • Поддерживает фильтрацию по имени политики и организации.
  • Дополнительные сведения см. в документации Cisco Intersight.

Параметры

Параметр

Комментарии

api_key_id

string / обязательный

Идентификатор открытого API-ключа, связанного с закрытым ключом.

Если значение не задано, используется значение переменной окружения INTERSIGHT_API_KEY_ID.

api_private_key

path / обязательный

Имя файла (абсолютный путь) или строка с данными закрытого ключа в формате PEM для аутентификации в API Intersight.

Если используется строка, для её шифрования следует использовать Ansible Vault.

Например: ansible-vault encrypt_string --vault-id tme@/Users/dsoper/Documents/vault_password_file ‘-----BEGIN EC PRIVATE KEY-----

<your private key data>

-----END EC PRIVATE KEY-----’

Если значение не задано, используется значение переменной окружения INTERSIGHT_API_PRIVATE_KEY.

api_uri

string

URI для доступа к API Intersight.

Если значение не задано, используется значение переменной окружения INTERSIGHT_API_URI.

По умолчанию: "https://intersight.com/api/v1"

name

string

Имя политики портов, сведения о которой нужно получить.

Если имя не указано, будут возвращены сведения обо всех политиках портов.

organization

string

Имя организации для фильтрации политик.

Если имя не указано, будут возвращены политики из всех доступных организаций.

use_proxy

boolean

Если no, прокси-сервер использоваться не будет, даже если он задан в переменной окружения на целевых узлах.

Варианты:

  • false
  • true ← (по умолчанию)

validate_certs

boolean

Логический параметр, управляющий проверкой TLS-сертификата api_uri.

Варианты:

  • false
  • true ← (по умолчанию)

Примеры

- name: Get information about all Port Policies
  cisco.intersight.intersight_port_policy_info:
    api_private_key: "{{ api_private_key }}"
    api_key_id: "{{ api_key_id }}"
  register: all_port_policies

- name: Get information about a specific Port Policy
  cisco.intersight.intersight_port_policy_info:
    api_private_key: "{{ api_private_key }}"
    api_key_id: "{{ api_key_id }}"
    name: "port-policy-example"
  register: specific_policy

- name: Get information about Port Policies in a specific organization
  cisco.intersight.intersight_port_policy_info:
    api_private_key: "{{ api_private_key }}"
    api_key_id: "{{ api_key_id }}"
    organization: "production"
  register: org_policies

- name: Get information about a specific Port Policy in a specific organization
  cisco.intersight.intersight_port_policy_info:
    api_private_key: "{{ api_private_key }}"
    api_key_id: "{{ api_key_id }}"
    name: "port-policy-example"
    organization: "production"
  register: specific_org_policy

Возвращаемые значения

Общие возвращаемые значения описаны здесь; далее приведены поля, относящиеся только к этому модулю:

Ключ

Описание

api_response

list / элементы=словарь

Список сведений о политиках портов со всеми связанными ресурсами

Возвращается: всегда

Пример: [{"AppliancePcRoles": [], "ApplianceRoles": [], "BreakoutPorts": [{"CustomMode": "BreakoutEthernet25G", "Moid": "5dee1d736972652d321d26b6", "ObjectType": "fabric.PortMode", "PortId": 49, "SlotId": 1}], "Description": "Example port policy with various configurations", "DeviceModel": "UCS-FI-6454", "FcPortModes": [{"CustomMode": "FibreChannel", "Moid": "5dee1d736972652d321d26b7", "ObjectType": "fabric.PortMode", "PortIdEnd": 16, "PortIdStart": 1, "SlotId": 1}], "FcStorageRoles": [], "FcUplinkPortChannels": [{"AdminSpeed": "16Gbps", "Moid": "5dee1d736972652d321d26be", "ObjectType": "fabric.FcUplinkPcRole", "PcId": 13, "Ports": [{"AggregatePortId": 0, "PortId": 17, "SlotId": 1}, {"AggregatePortId": 0, "PortId": 18, "SlotId": 1}], "SlotId": 1, "UserLabel": "FC Uplink PC 13", "VsanId": 1}], "FcUplinkRoles": [{"AdminSpeed": "16Gbps", "Moid": "5dee1d736972652d321d26bf", "ObjectType": "fabric.FcUplinkRole", "PortId": 19, "SlotId": 1, "UserLabel": "FC Uplink 19", "VsanId": 1}], "FcoeUplinkPcRoles": [], "FcoeUplinkRoles": [], "LanPinGroups": [{"Moid": "5dee1d736972652d321d26c1", "Name": "pin-group-1", "ObjectType": "fabric.LanPinGroup", "PinTargetInterfaceRole": {"Moid": "5dee1d736972652d321d26c2", "ObjectType": "fabric.UplinkPcRole"}}], "Moid": "5dee1d736972652d321d26b5", "Name": "port-policy-example", "ObjectType": "fabric.PortPolicy", "Organization": {"Moid": "5dee1d736972652d321d26b5", "Name": "default", "ObjectType": "organization.Organization"}, "SanPinGroups": [{"Moid": "5dee1d736972652d321d26c3", "Name": "san-pin-group-1", "ObjectType": "fabric.SanPinGroup", "PinTargetInterfaceRole": {"Moid": "5dee1d736972652d321d26c4", "ObjectType": "fabric.FcUplinkPcRole"}}], "ServerRoles": [{"AggregatePortId": 49, "Fec": "Auto", "Moid": "5dee1d736972652d321d26b8", "ObjectType": "fabric.ServerRole", "PortId": 1, "PreferredDeviceId": 1, "PreferredDeviceType": "Chassis", "SlotId": 1, "UserLabel": "Server Port 1"}], "Tags": [{"Key": "Environment", "Value": "Production"}], "UplinkPcRoles": [{"AdminSpeed": "25Gbps", "EthNetworkGroupPolicy": [{"Moid": "5dee1d736972652d321d26ba", "ObjectType": "fabric.EthNetworkGroupPolicy"}], "Fec": "Auto", "FlowControlPolicy": {"Moid": "5dee1d736972652d321d26bb", "ObjectType": "fabric.FlowControlPolicy"}, "LinkAggregationPolicy": {"Moid": "5dee1d736972652d321d26bc", "ObjectType": "fabric.LinkAggregationPolicy"}, "LinkControlPolicy": {"Moid": "5dee1d736972652d321d26bd", "ObjectType": "fabric.LinkControlPolicy"}, "Moid": "5dee1d736972652d321d26b9", "ObjectType": "fabric.UplinkPcRole", "PcId": 123, "Ports": [{"AggregatePortId": 0, "PortId": 1, "SlotId": 1}, {"AggregatePortId": 0, "PortId": 2, "SlotId": 1}], "SlotId": 1, "UserLabel": "Uplink PC 123"}], "UplinkRoles": [{"AdminSpeed": "25Gbps", "Fec": "Auto", "Moid": "5dee1d736972652d321d26c0", "ObjectType": "fabric.UplinkRole", "PortId": 3, "SlotId": 1, "UserLabel": "Ethernet Uplink 3"}]}]

Авторы

  • Ron Gershburg (@rgershbu)

Ссылки на коллекцию

  • Отслеживание проблем
  • Репозиторий (исходный код)

© 2012–2018 Michael DeHaan
© 2018–2025 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/projects/ansible/latest/collections/cisco/intersight/intersight_port_policy_info_module.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API